com.github.asus4.onnxruntime 0.1.11 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Plugins/Android/onnxruntime-android.aar +0 -0
- package/Plugins/Linux/x64/libonnxruntime.so +0 -0
- package/Plugins/Windows/x64/onnxruntime.dll +0 -0
- package/Plugins/iOS~/onnxruntime.xcframework/Info.plist +17 -4
- package/Plugins/iOS~/onnxruntime.xcframework/ios-arm64/onnxruntime.framework/Headers/onnxruntime_c_api.h +182 -15
- package/Plugins/iOS~/onnxruntime.xcframework/ios-arm64/onnxruntime.framework/Headers/onnxruntime_cxx_api.h +110 -4
- package/Plugins/iOS~/onnxruntime.xcframework/ios-arm64/onnxruntime.framework/Headers/onnxruntime_cxx_inline.h +189 -0
- package/Plugins/iOS~/onnxruntime.xcframework/ios-arm64/onnxruntime.framework/Headers/onnxruntime_run_options_config_keys.h +32 -0
- package/Plugins/iOS~/onnxruntime.xcframework/ios-arm64/onnxruntime.framework/Headers/onnxruntime_session_options_config_keys.h +258 -0
- package/Plugins/iOS~/onnxruntime.xcframework/ios-arm64/onnxruntime.framework/Info.plist +2 -2
- package/Plugins/iOS~/onnxruntime.xcframework/ios-arm64/onnxruntime.framework/onnxruntime +0 -0
- package/Plugins/iOS~/onnxruntime.xcframework/ios-arm64_x86_64-simulator/onnxruntime.framework/Headers/onnxruntime_c_api.h +182 -15
- package/Plugins/iOS~/onnxruntime.xcframework/ios-arm64_x86_64-simulator/onnxruntime.framework/Headers/onnxruntime_cxx_api.h +110 -4
- package/Plugins/iOS~/onnxruntime.xcframework/ios-arm64_x86_64-simulator/onnxruntime.framework/Headers/onnxruntime_cxx_inline.h +189 -0
- package/Plugins/iOS~/onnxruntime.xcframework/ios-arm64_x86_64-simulator/onnxruntime.framework/Headers/onnxruntime_run_options_config_keys.h +32 -0
- package/Plugins/iOS~/onnxruntime.xcframework/ios-arm64_x86_64-simulator/onnxruntime.framework/Headers/onnxruntime_session_options_config_keys.h +258 -0
- package/Plugins/iOS~/onnxruntime.xcframework/ios-arm64_x86_64-simulator/onnxruntime.framework/Info.plist +2 -2
- package/Plugins/iOS~/onnxruntime.xcframework/ios-arm64_x86_64-simulator/onnxruntime.framework/onnxruntime +0 -0
- package/Plugins/iOS~/onnxruntime.xcframework/macos-arm64_x86_64/onnxruntime.framework/Headers/coreml_provider_factory.h +45 -0
- package/Plugins/iOS~/onnxruntime.xcframework/macos-arm64_x86_64/onnxruntime.framework/Headers/cpu_provider_factory.h +19 -0
- package/Plugins/iOS~/onnxruntime.xcframework/macos-arm64_x86_64/onnxruntime.framework/Headers/onnxruntime_c_api.h +4717 -0
- package/Plugins/iOS~/onnxruntime.xcframework/macos-arm64_x86_64/onnxruntime.framework/Headers/onnxruntime_cxx_api.h +2372 -0
- package/Plugins/iOS~/onnxruntime.xcframework/macos-arm64_x86_64/onnxruntime.framework/Headers/onnxruntime_cxx_inline.h +2075 -0
- package/Plugins/iOS~/onnxruntime.xcframework/macos-arm64_x86_64/onnxruntime.framework/Headers/onnxruntime_float16.h +540 -0
- package/Plugins/iOS~/onnxruntime.xcframework/macos-arm64_x86_64/onnxruntime.framework/Headers/onnxruntime_run_options_config_keys.h +32 -0
- package/Plugins/iOS~/onnxruntime.xcframework/macos-arm64_x86_64/onnxruntime.framework/Headers/onnxruntime_session_options_config_keys.h +258 -0
- package/Plugins/iOS~/onnxruntime.xcframework/macos-arm64_x86_64/onnxruntime.framework/Info.plist +20 -0
- package/Plugins/iOS~/onnxruntime.xcframework/macos-arm64_x86_64/onnxruntime.framework/onnxruntime +0 -0
- package/Plugins/macOS/libonnxruntime.dylib +0 -0
- package/README.md +14 -8
- package/Runtime/NativeMethods.shared.cs +270 -276
- package/Runtime/OrtValue.shared.cs +7 -3
- package/Runtime/Training/NativeTrainingMethods.shared.cs +2 -2
- package/package.json +1 -1
|
@@ -385,7 +385,7 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
385
385
|
OrtAddSessionConfigEntry = (DOrtAddSessionConfigEntry)Marshal.GetDelegateForFunctionPointer(api_.AddSessionConfigEntry, typeof(DOrtAddSessionConfigEntry));
|
|
386
386
|
OrtAddInitializer = (DOrtAddInitializer)Marshal.GetDelegateForFunctionPointer(api_.AddInitializer, typeof(DOrtAddInitializer));
|
|
387
387
|
SessionOptionsAppendExecutionProvider_TensorRT = (DSessionOptionsAppendExecutionProvider_TensorRT)Marshal.GetDelegateForFunctionPointer(
|
|
388
|
-
|
|
388
|
+
api_.SessionOptionsAppendExecutionProvider_TensorRT, typeof(DSessionOptionsAppendExecutionProvider_TensorRT));
|
|
389
389
|
|
|
390
390
|
OrtCreateRunOptions = (DOrtCreateRunOptions)Marshal.GetDelegateForFunctionPointer(api_.CreateRunOptions, typeof(DOrtCreateRunOptions));
|
|
391
391
|
OrtReleaseRunOptions = (DOrtReleaseRunOptions)Marshal.GetDelegateForFunctionPointer(api_.ReleaseRunOptions, typeof(DOrtReleaseRunOptions));
|
|
@@ -499,27 +499,26 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
499
499
|
OrtReleasePrepackedWeightsContainer = (DOrtReleasePrepackedWeightsContainer)Marshal.GetDelegateForFunctionPointer(api_.ReleasePrepackedWeightsContainer, typeof(DOrtReleasePrepackedWeightsContainer));
|
|
500
500
|
|
|
501
501
|
SessionOptionsAppendExecutionProvider_TensorRT_V2 = (DSessionOptionsAppendExecutionProvider_TensorRT_V2)Marshal.GetDelegateForFunctionPointer(
|
|
502
|
-
|
|
502
|
+
api_.SessionOptionsAppendExecutionProvider_TensorRT_V2, typeof(DSessionOptionsAppendExecutionProvider_TensorRT_V2));
|
|
503
503
|
OrtCreateTensorRTProviderOptions = (DOrtCreateTensorRTProviderOptions)Marshal.GetDelegateForFunctionPointer(api_.CreateTensorRTProviderOptions, typeof(DOrtCreateTensorRTProviderOptions));
|
|
504
504
|
OrtUpdateTensorRTProviderOptions = (DOrtUpdateTensorRTProviderOptions)Marshal.GetDelegateForFunctionPointer(api_.UpdateTensorRTProviderOptions, typeof(DOrtUpdateTensorRTProviderOptions));
|
|
505
505
|
OrtGetTensorRTProviderOptionsAsString = (DOrtGetTensorRTProviderOptionsAsString)Marshal.GetDelegateForFunctionPointer(api_.GetTensorRTProviderOptionsAsString, typeof(DOrtGetTensorRTProviderOptionsAsString));
|
|
506
506
|
OrtReleaseTensorRTProviderOptions = (DOrtReleaseTensorRTProviderOptions)Marshal.GetDelegateForFunctionPointer(api_.ReleaseTensorRTProviderOptions, typeof(DOrtReleaseTensorRTProviderOptions));
|
|
507
507
|
|
|
508
508
|
SessionOptionsAppendExecutionProvider_CUDA = (DSessionOptionsAppendExecutionProvider_CUDA)Marshal.GetDelegateForFunctionPointer(
|
|
509
|
-
|
|
509
|
+
api_.SessionOptionsAppendExecutionProvider_CUDA, typeof(DSessionOptionsAppendExecutionProvider_CUDA));
|
|
510
510
|
SessionOptionsAppendExecutionProvider_CUDA_V2 = (DSessionOptionsAppendExecutionProvider_CUDA_V2)Marshal.GetDelegateForFunctionPointer(
|
|
511
|
-
|
|
511
|
+
api_.SessionOptionsAppendExecutionProvider_CUDA_V2, typeof(DSessionOptionsAppendExecutionProvider_CUDA_V2));
|
|
512
512
|
OrtCreateCUDAProviderOptions = (DOrtCreateCUDAProviderOptions)Marshal.GetDelegateForFunctionPointer(api_.CreateCUDAProviderOptions, typeof(DOrtCreateCUDAProviderOptions));
|
|
513
513
|
OrtUpdateCUDAProviderOptions = (DOrtUpdateCUDAProviderOptions)Marshal.GetDelegateForFunctionPointer(api_.UpdateCUDAProviderOptions, typeof(DOrtUpdateCUDAProviderOptions));
|
|
514
514
|
OrtGetCUDAProviderOptionsAsString = (DOrtGetCUDAProviderOptionsAsString)Marshal.GetDelegateForFunctionPointer(api_.GetCUDAProviderOptionsAsString, typeof(DOrtGetCUDAProviderOptionsAsString));
|
|
515
515
|
OrtReleaseCUDAProviderOptions = (DOrtReleaseCUDAProviderOptions)Marshal.GetDelegateForFunctionPointer(api_.ReleaseCUDAProviderOptions, typeof(DOrtReleaseCUDAProviderOptions));
|
|
516
|
-
SessionOptionsAppendExecutionProvider
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
typeof(DSessionOptionsAppendExecutionProvider));
|
|
516
|
+
SessionOptionsAppendExecutionProvider = (DSessionOptionsAppendExecutionProvider)Marshal.GetDelegateForFunctionPointer(
|
|
517
|
+
api_.SessionOptionsAppendExecutionProvider,
|
|
518
|
+
typeof(DSessionOptionsAppendExecutionProvider));
|
|
520
519
|
OrtUpdateEnvWithCustomLogLevel = (DOrtUpdateEnvWithCustomLogLevel)Marshal.GetDelegateForFunctionPointer(api_.UpdateEnvWithCustomLogLevel, typeof(DOrtUpdateEnvWithCustomLogLevel));
|
|
521
520
|
SessionOptionsAppendExecutionProvider_ROCM = (DSessionOptionsAppendExecutionProvider_ROCM)Marshal.GetDelegateForFunctionPointer(
|
|
522
|
-
|
|
521
|
+
api_.SessionOptionsAppendExecutionProvider_ROCM, typeof(DSessionOptionsAppendExecutionProvider_ROCM));
|
|
523
522
|
OrtCreateROCMProviderOptions = (DOrtCreateROCMProviderOptions)Marshal.GetDelegateForFunctionPointer(api_.CreateROCMProviderOptions, typeof(DOrtCreateROCMProviderOptions));
|
|
524
523
|
OrtUpdateROCMProviderOptions = (DOrtUpdateROCMProviderOptions)Marshal.GetDelegateForFunctionPointer(api_.UpdateROCMProviderOptions, typeof(DOrtUpdateROCMProviderOptions));
|
|
525
524
|
OrtGetROCMProviderOptionsAsString = (DOrtGetROCMProviderOptionsAsString)Marshal.GetDelegateForFunctionPointer(api_.GetROCMProviderOptionsAsString, typeof(DOrtGetROCMProviderOptionsAsString));
|
|
@@ -544,10 +543,10 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
544
543
|
[DllImport(NativeLib.DllName, CharSet = CharSet.Ansi)]
|
|
545
544
|
public static extern ref OrtApiBase OrtGetApiBase();
|
|
546
545
|
|
|
547
|
-
|
|
546
|
+
#region Runtime / Environment API
|
|
548
547
|
|
|
549
548
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
550
|
-
public delegate IntPtr /* OrtStatus* */DOrtCreateEnv(
|
|
549
|
+
public delegate IntPtr /* OrtStatus* */ DOrtCreateEnv(
|
|
551
550
|
OrtLoggingLevel defaultLoggingLevel,
|
|
552
551
|
byte[] /*const char* */ logId,
|
|
553
552
|
out IntPtr /*(OrtEnv*)*/ env);
|
|
@@ -555,7 +554,7 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
555
554
|
public static DOrtCreateEnv OrtCreateEnv;
|
|
556
555
|
|
|
557
556
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
558
|
-
public delegate IntPtr /* OrtStatus* */DOrtCreateEnvWithCustomLogger(
|
|
557
|
+
public delegate IntPtr /* OrtStatus* */ DOrtCreateEnvWithCustomLogger(
|
|
559
558
|
IntPtr /* (OrtLoggingFunction*) */ loggingFunction,
|
|
560
559
|
IntPtr /* (void*) */ loggerParam,
|
|
561
560
|
OrtLoggingLevel defaultLoggingLevel,
|
|
@@ -565,7 +564,7 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
565
564
|
public static DOrtCreateEnvWithCustomLogger OrtCreateEnvWithCustomLogger;
|
|
566
565
|
|
|
567
566
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
568
|
-
public delegate IntPtr /* OrtStatus* */DOrtCreateEnvWithGlobalThreadPools(
|
|
567
|
+
public delegate IntPtr /* OrtStatus* */ DOrtCreateEnvWithGlobalThreadPools(
|
|
569
568
|
OrtLoggingLevel defaultWarningLevel,
|
|
570
569
|
byte[] /*const char* */ logId,
|
|
571
570
|
IntPtr /*(const OrtThreadingOptions *) */ threadingOptions,
|
|
@@ -576,7 +575,7 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
576
575
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
577
576
|
public delegate IntPtr /* OrtStatus* */ DOrtCreateEnvWithCustomLoggerAndGlobalThreadPools(
|
|
578
577
|
IntPtr /* OrtLoggingFunction */ loggingFunction,
|
|
579
|
-
IntPtr /* void* */loggerParam,
|
|
578
|
+
IntPtr /* void* */ loggerParam,
|
|
580
579
|
OrtLoggingLevel logSeverityLevel,
|
|
581
580
|
byte[] /* const char* */ logId,
|
|
582
581
|
IntPtr /*(const OrtThreadingOptions *) */ threadingOptions,
|
|
@@ -590,27 +589,27 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
590
589
|
public static DOrtReleaseEnv OrtReleaseEnv;
|
|
591
590
|
|
|
592
591
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
593
|
-
public delegate IntPtr /* OrtStatus* */DOrtEnableTelemetryEvents(IntPtr /*(OrtEnv*)*/ env);
|
|
592
|
+
public delegate IntPtr /* OrtStatus* */ DOrtEnableTelemetryEvents(IntPtr /*(OrtEnv*)*/ env);
|
|
594
593
|
public static DOrtEnableTelemetryEvents OrtEnableTelemetryEvents;
|
|
595
594
|
|
|
596
595
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
597
|
-
public delegate IntPtr /* OrtStatus* */DOrtDisableTelemetryEvents(IntPtr /*(OrtEnv*)*/ env);
|
|
596
|
+
public delegate IntPtr /* OrtStatus* */ DOrtDisableTelemetryEvents(IntPtr /*(OrtEnv*)*/ env);
|
|
598
597
|
public static DOrtDisableTelemetryEvents OrtDisableTelemetryEvents;
|
|
599
598
|
|
|
600
599
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
601
|
-
public delegate IntPtr /* OrtStatus* */DOrtUpdateEnvWithCustomLogLevel(IntPtr /*(OrtEnv*)*/ env, OrtLoggingLevel custom_log_level);
|
|
600
|
+
public delegate IntPtr /* OrtStatus* */ DOrtUpdateEnvWithCustomLogLevel(IntPtr /*(OrtEnv*)*/ env, OrtLoggingLevel custom_log_level);
|
|
602
601
|
public static DOrtUpdateEnvWithCustomLogLevel OrtUpdateEnvWithCustomLogLevel;
|
|
603
602
|
|
|
604
|
-
|
|
603
|
+
#endregion Runtime / Environment API
|
|
605
604
|
|
|
606
|
-
|
|
605
|
+
#region Provider Options API
|
|
607
606
|
|
|
608
607
|
/// <summary>
|
|
609
608
|
/// Creates native OrtTensorRTProviderOptions instance
|
|
610
609
|
/// </summary>
|
|
611
610
|
/// <param name="trtProviderOptionsInstance">(output) native instance of OrtTensorRTProviderOptions</param>
|
|
612
611
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
613
|
-
public delegate IntPtr /* OrtStatus* */DOrtCreateTensorRTProviderOptions(
|
|
612
|
+
public delegate IntPtr /* OrtStatus* */ DOrtCreateTensorRTProviderOptions(
|
|
614
613
|
out IntPtr /*(OrtTensorRTProviderOptions**)*/ trtProviderOptionsInstance);
|
|
615
614
|
public static DOrtCreateTensorRTProviderOptions OrtCreateTensorRTProviderOptions;
|
|
616
615
|
|
|
@@ -622,7 +621,7 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
622
621
|
/// <param name="providerOptionsValues">configuration values of OrtTensorRTProviderOptions</param>
|
|
623
622
|
/// <param name="numKeys">number of configuration keys</param>
|
|
624
623
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
625
|
-
public delegate IntPtr /* OrtStatus* */DOrtUpdateTensorRTProviderOptions(
|
|
624
|
+
public delegate IntPtr /* OrtStatus* */ DOrtUpdateTensorRTProviderOptions(
|
|
626
625
|
IntPtr /*(OrtTensorRTProviderOptions*)*/ trtProviderOptionsInstance,
|
|
627
626
|
IntPtr[] /*(const char* const *)*/ providerOptionsKeys,
|
|
628
627
|
IntPtr[] /*(const char* const *)*/ providerOptionsValues,
|
|
@@ -635,10 +634,10 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
635
634
|
/// <param name="allocator">instance of OrtAllocator</param>
|
|
636
635
|
/// <param name="ptr">is a UTF-8 null terminated string allocated using 'allocator'</param>
|
|
637
636
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
638
|
-
public delegate IntPtr /* OrtStatus* */DOrtGetTensorRTProviderOptionsAsString(
|
|
637
|
+
public delegate IntPtr /* OrtStatus* */ DOrtGetTensorRTProviderOptionsAsString(
|
|
639
638
|
IntPtr /*(OrtTensorRTProviderOptionsV2**)*/ trtProviderOptionsInstance,
|
|
640
639
|
IntPtr /*(OrtAllocator*)*/ allocator,
|
|
641
|
-
out IntPtr /*(char**)*/ptr);
|
|
640
|
+
out IntPtr /*(char**)*/ ptr);
|
|
642
641
|
public static DOrtGetTensorRTProviderOptionsAsString OrtGetTensorRTProviderOptionsAsString;
|
|
643
642
|
|
|
644
643
|
/// <summary>
|
|
@@ -654,7 +653,7 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
654
653
|
/// </summary>
|
|
655
654
|
/// <param name="cudaProviderOptionsInstance">(output) native instance of OrtCUDAProviderOptions</param>
|
|
656
655
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
657
|
-
public delegate IntPtr /* OrtStatus* */DOrtCreateCUDAProviderOptions(
|
|
656
|
+
public delegate IntPtr /* OrtStatus* */ DOrtCreateCUDAProviderOptions(
|
|
658
657
|
out IntPtr /*(OrtCUDAProviderOptions**)*/ cudaProviderOptionsInstance);
|
|
659
658
|
public static DOrtCreateCUDAProviderOptions OrtCreateCUDAProviderOptions;
|
|
660
659
|
|
|
@@ -666,7 +665,7 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
666
665
|
/// <param name="providerOptionsValues">configuration values of OrtCUDAProviderOptions</param>
|
|
667
666
|
/// <param name="numKeys">number of configuration keys</param>
|
|
668
667
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
669
|
-
public delegate IntPtr /* OrtStatus* */DOrtUpdateCUDAProviderOptions(
|
|
668
|
+
public delegate IntPtr /* OrtStatus* */ DOrtUpdateCUDAProviderOptions(
|
|
670
669
|
IntPtr /*(OrtCUDAProviderOptions*)*/ cudaProviderOptionsInstance,
|
|
671
670
|
IntPtr[] /*(const char* const *)*/ providerOptionsKeys,
|
|
672
671
|
IntPtr[] /*(const char* const *)*/ providerOptionsValues,
|
|
@@ -679,10 +678,10 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
679
678
|
/// <param name="allocator">instance of OrtAllocator</param>
|
|
680
679
|
/// <param name="ptr">is a UTF-8 null terminated string allocated using 'allocator'</param>
|
|
681
680
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
682
|
-
public delegate IntPtr /* OrtStatus* */DOrtGetCUDAProviderOptionsAsString(
|
|
681
|
+
public delegate IntPtr /* OrtStatus* */ DOrtGetCUDAProviderOptionsAsString(
|
|
683
682
|
IntPtr /*(OrtCUDAProviderOptionsV2**)*/ cudaProviderOptionsInstance,
|
|
684
683
|
IntPtr /*(OrtAllocator*)*/ allocator,
|
|
685
|
-
out IntPtr /*(char**)*/ptr);
|
|
684
|
+
out IntPtr /*(char**)*/ ptr);
|
|
686
685
|
public static DOrtGetCUDAProviderOptionsAsString OrtGetCUDAProviderOptionsAsString;
|
|
687
686
|
|
|
688
687
|
/// <summary>
|
|
@@ -698,7 +697,7 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
698
697
|
/// </summary>
|
|
699
698
|
/// <param name="rocmProviderOptionsInstance">(output) native instance of OrtROCMProviderOptions</param>
|
|
700
699
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
701
|
-
public delegate IntPtr /* OrtStatus* */DOrtCreateROCMProviderOptions(
|
|
700
|
+
public delegate IntPtr /* OrtStatus* */ DOrtCreateROCMProviderOptions(
|
|
702
701
|
out IntPtr /*(OrtROCMProviderOptions**)*/ rocmProviderOptionsInstance);
|
|
703
702
|
public static DOrtCreateROCMProviderOptions OrtCreateROCMProviderOptions;
|
|
704
703
|
|
|
@@ -710,7 +709,7 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
710
709
|
/// <param name="providerOptionsValues">configuration values of OrtROCMProviderOptions</param>
|
|
711
710
|
/// <param name="numKeys">number of configuration keys</param>
|
|
712
711
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
713
|
-
public delegate IntPtr /* OrtStatus* */DOrtUpdateROCMProviderOptions(
|
|
712
|
+
public delegate IntPtr /* OrtStatus* */ DOrtUpdateROCMProviderOptions(
|
|
714
713
|
IntPtr /*(OrtROCMProviderOptions*)*/ rocmProviderOptionsInstance,
|
|
715
714
|
IntPtr[] /*(const char* const *)*/ providerOptionsKeys,
|
|
716
715
|
IntPtr[] /*(const char* const *)*/ providerOptionsValues,
|
|
@@ -723,10 +722,10 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
723
722
|
/// <param name="allocator">instance of OrtAllocator</param>
|
|
724
723
|
/// <param name="ptr">is a UTF-8 null terminated string allocated using 'allocator'</param>
|
|
725
724
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
726
|
-
public delegate IntPtr /* OrtStatus* */DOrtGetROCMProviderOptionsAsString(
|
|
725
|
+
public delegate IntPtr /* OrtStatus* */ DOrtGetROCMProviderOptionsAsString(
|
|
727
726
|
IntPtr /*(OrtROCMProviderOptions**)*/ rocmProviderOptionsInstance,
|
|
728
727
|
IntPtr /*(OrtAllocator*)*/ allocator,
|
|
729
|
-
out IntPtr /*(char**)*/ptr);
|
|
728
|
+
out IntPtr /*(char**)*/ ptr);
|
|
730
729
|
public static DOrtGetROCMProviderOptionsAsString OrtGetROCMProviderOptionsAsString;
|
|
731
730
|
|
|
732
731
|
/// <summary>
|
|
@@ -737,34 +736,34 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
737
736
|
public delegate void DOrtReleaseROCMProviderOptions(IntPtr /*(OrtROCMProviderOptions*)*/ rocmProviderOptionsInstance);
|
|
738
737
|
public static DOrtReleaseROCMProviderOptions OrtReleaseROCMProviderOptions;
|
|
739
738
|
|
|
740
|
-
|
|
739
|
+
#endregion
|
|
741
740
|
|
|
742
|
-
|
|
741
|
+
#region Status API
|
|
743
742
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
744
|
-
public delegate ErrorCode DOrtGetErrorCode(IntPtr /*(OrtStatus*)*/status);
|
|
743
|
+
public delegate ErrorCode DOrtGetErrorCode(IntPtr /*(OrtStatus*)*/ status);
|
|
745
744
|
public static DOrtGetErrorCode OrtGetErrorCode;
|
|
746
745
|
|
|
747
746
|
// returns char*, need to convert to string by the caller.
|
|
748
747
|
// does not free the underlying OrtStatus*
|
|
749
748
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
750
|
-
public delegate IntPtr /* char* */DOrtGetErrorMessage(IntPtr /* (OrtStatus*) */status);
|
|
749
|
+
public delegate IntPtr /* char* */ DOrtGetErrorMessage(IntPtr /* (OrtStatus*) */ status);
|
|
751
750
|
public static DOrtGetErrorMessage OrtGetErrorMessage;
|
|
752
751
|
|
|
753
752
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
754
753
|
public delegate void DOrtReleaseStatus(IntPtr /*(OrtStatus*)*/ statusPtr);
|
|
755
754
|
public static DOrtReleaseStatus OrtReleaseStatus;
|
|
756
755
|
|
|
757
|
-
|
|
756
|
+
#endregion Status API
|
|
758
757
|
|
|
759
|
-
|
|
758
|
+
#region InferenceSession API
|
|
760
759
|
|
|
761
760
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
762
|
-
public delegate IntPtr /* OrtStatus* */DOrtCreateSession(
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
761
|
+
public delegate IntPtr /* OrtStatus* */ DOrtCreateSession(
|
|
762
|
+
IntPtr /* (OrtEnv*) */ environment,
|
|
763
|
+
//[MarshalAs(UnmanagedType.LPStr)]string modelPath
|
|
764
|
+
byte[] modelPath,
|
|
765
|
+
IntPtr /* (OrtSessionOptions*) */ sessopnOptions,
|
|
766
|
+
out IntPtr /**/ session);
|
|
768
767
|
|
|
769
768
|
public static DOrtCreateSession OrtCreateSession;
|
|
770
769
|
|
|
@@ -777,22 +776,22 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
777
776
|
/// <param name="prepackedWeightsContainer">Native OrtPrepackedWeightsContainer instance</param>
|
|
778
777
|
/// <param name="session">(Output) Created native OrtSession instance</param>
|
|
779
778
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
780
|
-
public delegate IntPtr /* OrtStatus* */DOrtCreateSessionWithPrepackedWeightsContainer(
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
779
|
+
public delegate IntPtr /* OrtStatus* */ DOrtCreateSessionWithPrepackedWeightsContainer(
|
|
780
|
+
IntPtr /* (OrtEnv*) */ environment,
|
|
781
|
+
byte[] modelPath,
|
|
782
|
+
IntPtr /* (OrtSessionOptions*) */ sessionOptions,
|
|
783
|
+
IntPtr /* (OrtPrepackedWeightsContainer*) */ prepackedWeightsContainer,
|
|
784
|
+
out IntPtr /* (OrtSession**) */ session);
|
|
786
785
|
|
|
787
786
|
public static DOrtCreateSessionWithPrepackedWeightsContainer OrtCreateSessionWithPrepackedWeightsContainer;
|
|
788
787
|
|
|
789
788
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
790
|
-
public delegate IntPtr /* OrtStatus* */DOrtCreateSessionFromArray(
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
789
|
+
public delegate IntPtr /* OrtStatus* */ DOrtCreateSessionFromArray(
|
|
790
|
+
IntPtr /* (OrtEnv*) */ environment,
|
|
791
|
+
byte[] modelData,
|
|
792
|
+
UIntPtr modelSize,
|
|
793
|
+
IntPtr /* (OrtSessionOptions*) */ sessionOptions,
|
|
794
|
+
out IntPtr /**/ session);
|
|
796
795
|
public static DOrtCreateSessionFromArray OrtCreateSessionFromArray;
|
|
797
796
|
|
|
798
797
|
/// <summary>
|
|
@@ -805,169 +804,167 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
805
804
|
/// <param name="prepackedWeightsContainer">Native OrtPrepackedWeightsContainer instance</param>
|
|
806
805
|
/// <param name="session">(Output) Created native OrtSession instance</param>
|
|
807
806
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
808
|
-
public delegate IntPtr /* OrtStatus* */DOrtCreateSessionFromArrayWithPrepackedWeightsContainer(
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
807
|
+
public delegate IntPtr /* OrtStatus* */ DOrtCreateSessionFromArrayWithPrepackedWeightsContainer(
|
|
808
|
+
IntPtr /* (OrtEnv*) */ environment,
|
|
809
|
+
byte[] /* (void*) */ modelData,
|
|
810
|
+
UIntPtr /* (size_t) */ modelSize,
|
|
811
|
+
IntPtr /* (OrtSessionOptions*) */ sessionOptions,
|
|
812
|
+
IntPtr /* (OrtPrepackedWeightsContainer*) */ prepackedWeightsContainer,
|
|
813
|
+
out IntPtr /* (OrtSession**) */ session);
|
|
815
814
|
public static DOrtCreateSessionFromArrayWithPrepackedWeightsContainer OrtCreateSessionFromArrayWithPrepackedWeightsContainer;
|
|
816
815
|
|
|
817
816
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
818
817
|
public delegate IntPtr /*(ONNStatus*)*/ DOrtRun(
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
818
|
+
IntPtr /*(OrtSession*)*/ session,
|
|
819
|
+
IntPtr /*(OrtSessionRunOptions*)*/ runOptions, // can be null to use the default options
|
|
820
|
+
IntPtr[] inputNames,
|
|
821
|
+
IntPtr[] /* (OrtValue*[])*/ inputValues,
|
|
822
|
+
UIntPtr inputCount,
|
|
823
|
+
IntPtr[] outputNames,
|
|
824
|
+
UIntPtr outputCount,
|
|
825
|
+
IntPtr[] outputValues /* An array of output value pointers. Array must be allocated by the caller */
|
|
826
|
+
);
|
|
828
827
|
|
|
829
828
|
public static DOrtRun OrtRun;
|
|
830
829
|
|
|
831
830
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
832
831
|
public delegate IntPtr /*(ONNStatus*)*/ DOrtRunWithBinding(
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
);
|
|
832
|
+
IntPtr /*(OrtSession*)*/ session,
|
|
833
|
+
IntPtr /*(OrtSessionRunOptions*)*/ runOptions, // can not be null
|
|
834
|
+
IntPtr /*(const OrtIoBinding*)*/ io_binding);
|
|
837
835
|
|
|
838
836
|
public static DOrtRunWithBinding OrtRunWithBinding;
|
|
839
837
|
|
|
840
838
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
841
839
|
public delegate IntPtr /*(OrtStatus*)*/ DOrtSessionGetInputCount(
|
|
842
|
-
|
|
843
|
-
|
|
840
|
+
IntPtr /*(OrtSession*)*/ session,
|
|
841
|
+
out UIntPtr count);
|
|
844
842
|
|
|
845
843
|
public static DOrtSessionGetInputCount OrtSessionGetInputCount;
|
|
846
844
|
|
|
847
845
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
848
846
|
public delegate IntPtr /*(OrtStatus*)*/ DOrtSessionGetOutputCount(
|
|
849
|
-
|
|
850
|
-
|
|
847
|
+
IntPtr /*(OrtSession*)*/ session,
|
|
848
|
+
out UIntPtr count);
|
|
851
849
|
|
|
852
850
|
public static DOrtSessionGetOutputCount OrtSessionGetOutputCount;
|
|
853
851
|
|
|
854
852
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
855
853
|
public delegate IntPtr /*(OrtStatus*)*/ DOrtSessionGetOverridableInitializerCount(
|
|
856
|
-
|
|
857
|
-
|
|
854
|
+
IntPtr /*(OrtSession*)*/ session,
|
|
855
|
+
out UIntPtr count);
|
|
858
856
|
|
|
859
857
|
public static DOrtSessionGetOverridableInitializerCount OrtSessionGetOverridableInitializerCount;
|
|
860
858
|
|
|
861
859
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
862
|
-
public delegate IntPtr /*(OrtStatus*)*/DOrtSessionGetInputName(
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
860
|
+
public delegate IntPtr /*(OrtStatus*)*/ DOrtSessionGetInputName(
|
|
861
|
+
IntPtr /*(OrtSession*)*/ session,
|
|
862
|
+
UIntPtr index,
|
|
863
|
+
IntPtr /*(OrtAllocator*)*/ allocator,
|
|
864
|
+
out IntPtr /*(char**)*/ name);
|
|
867
865
|
|
|
868
866
|
public static DOrtSessionGetInputName OrtSessionGetInputName;
|
|
869
867
|
|
|
870
868
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
871
|
-
public delegate IntPtr /*(OrtStatus*)*/DOrtSessionGetOutputName(
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
869
|
+
public delegate IntPtr /*(OrtStatus*)*/ DOrtSessionGetOutputName(
|
|
870
|
+
IntPtr /*(OrtSession*)*/ session,
|
|
871
|
+
UIntPtr index,
|
|
872
|
+
IntPtr /*(OrtAllocator*)*/ allocator,
|
|
873
|
+
out IntPtr /*(char**)*/ name);
|
|
876
874
|
|
|
877
875
|
public static DOrtSessionGetOutputName OrtSessionGetOutputName;
|
|
878
876
|
|
|
879
877
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
880
|
-
public delegate IntPtr /*(OrtStatus*)*/DOrtSessionEndProfiling(
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
878
|
+
public delegate IntPtr /*(OrtStatus*)*/ DOrtSessionEndProfiling(
|
|
879
|
+
IntPtr /*(const OrtSession*)*/ session,
|
|
880
|
+
IntPtr /*(OrtAllocator*)*/ allocator,
|
|
881
|
+
out IntPtr /*(char**)*/ profile_file);
|
|
884
882
|
|
|
885
883
|
public static DOrtSessionEndProfiling OrtSessionEndProfiling;
|
|
886
884
|
|
|
887
885
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
888
|
-
public delegate IntPtr /*(OrtStatus*)*/DOrtSessionGetOverridableInitializerName(
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
886
|
+
public delegate IntPtr /*(OrtStatus*)*/ DOrtSessionGetOverridableInitializerName(
|
|
887
|
+
IntPtr /*(OrtSession*)*/ session,
|
|
888
|
+
UIntPtr index,
|
|
889
|
+
IntPtr /*(OrtAllocator*)*/ allocator,
|
|
890
|
+
out IntPtr /*(char**)*/ name);
|
|
893
891
|
|
|
894
892
|
public static DOrtSessionGetOverridableInitializerName OrtSessionGetOverridableInitializerName;
|
|
895
893
|
|
|
896
894
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
897
|
-
public delegate IntPtr /*(OrtStatus*)*/DOrtSessionGetInputTypeInfo(
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
895
|
+
public delegate IntPtr /*(OrtStatus*)*/ DOrtSessionGetInputTypeInfo(
|
|
896
|
+
IntPtr /*(const OrtSession*)*/ session,
|
|
897
|
+
UIntPtr index,
|
|
898
|
+
out IntPtr /*(struct OrtTypeInfo**)*/ typeInfo);
|
|
901
899
|
|
|
902
900
|
public static DOrtSessionGetInputTypeInfo OrtSessionGetInputTypeInfo;
|
|
903
901
|
|
|
904
902
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
905
|
-
public delegate IntPtr /*(OrtStatus*)*/DOrtSessionGetOutputTypeInfo(
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
903
|
+
public delegate IntPtr /*(OrtStatus*)*/ DOrtSessionGetOutputTypeInfo(
|
|
904
|
+
IntPtr /*(const OrtSession*)*/ session,
|
|
905
|
+
UIntPtr index,
|
|
906
|
+
out IntPtr /* (struct OrtTypeInfo**)*/ typeInfo);
|
|
909
907
|
|
|
910
908
|
public static DOrtSessionGetOutputTypeInfo OrtSessionGetOutputTypeInfo;
|
|
911
909
|
|
|
912
910
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
913
|
-
public delegate IntPtr /*(OrtStatus*)*/DOrtSessionGetOverridableInitializerTypeInfo(
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
911
|
+
public delegate IntPtr /*(OrtStatus*)*/ DOrtSessionGetOverridableInitializerTypeInfo(
|
|
912
|
+
IntPtr /*(const OrtSession*)*/ session,
|
|
913
|
+
UIntPtr index,
|
|
914
|
+
out IntPtr /* (struct OrtTypeInfo**)*/ typeInfo);
|
|
917
915
|
|
|
918
916
|
public static DOrtSessionGetOverridableInitializerTypeInfo OrtSessionGetOverridableInitializerTypeInfo;
|
|
919
917
|
|
|
920
918
|
// release the typeinfo using OrtReleaseTypeInfo
|
|
921
919
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
922
|
-
public delegate void DOrtReleaseTypeInfo(IntPtr /*(OrtTypeInfo*)*/session);
|
|
920
|
+
public delegate void DOrtReleaseTypeInfo(IntPtr /*(OrtTypeInfo*)*/ session);
|
|
923
921
|
public static DOrtReleaseTypeInfo OrtReleaseTypeInfo;
|
|
924
922
|
|
|
925
923
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
926
|
-
public delegate void DOrtReleaseSession(IntPtr /*(OrtSession*)*/session);
|
|
924
|
+
public delegate void DOrtReleaseSession(IntPtr /*(OrtSession*)*/ session);
|
|
927
925
|
public static DOrtReleaseSession OrtReleaseSession;
|
|
928
926
|
|
|
929
927
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
930
928
|
public delegate IntPtr /*(OrtStatus*)*/ DOrtSessionGetProfilingStartTimeNs(
|
|
931
|
-
|
|
932
|
-
|
|
929
|
+
IntPtr /*(const OrtSession*)*/ session,
|
|
930
|
+
out UIntPtr /*(ulong* out)*/ startTime);
|
|
933
931
|
public static DOrtSessionGetProfilingStartTimeNs OrtSessionGetProfilingStartTimeNs;
|
|
934
932
|
|
|
935
933
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
936
934
|
public delegate IntPtr /*(ONNStatus*)*/ DCreateAndRegisterAllocatorV2(
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
935
|
+
IntPtr /* (OrtEnv*) */ environment,
|
|
936
|
+
IntPtr /*(char*)*/ provider_type,
|
|
937
|
+
IntPtr /*(OrtMemoryInfo*)*/ mem_info,
|
|
938
|
+
IntPtr /*(OrtArenaCfg*)*/ arena_cfg,
|
|
939
|
+
IntPtr /*(char**)*/ provider_options_keys,
|
|
940
|
+
IntPtr /*(char**)*/ provider_options_values,
|
|
941
|
+
UIntPtr /*(size_t)*/ num_keys);
|
|
944
942
|
public static DCreateAndRegisterAllocatorV2 OrtCreateAndRegisterAllocatorV2;
|
|
945
943
|
|
|
946
944
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
947
945
|
public delegate IntPtr /*(ONNStatus*)*/ DOrtRunAsync(
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
);
|
|
946
|
+
IntPtr /*(OrtSession*)*/ session,
|
|
947
|
+
IntPtr /*(OrtSessionRunOptions*)*/ runOptions, // can be null to use the default options
|
|
948
|
+
IntPtr[] /*(char**)*/ inputNames,
|
|
949
|
+
IntPtr[] /*(OrtValue*[])*/ inputValues,
|
|
950
|
+
UIntPtr /*(size_t)*/ inputCount,
|
|
951
|
+
IntPtr[] /*(char**)*/ outputNames,
|
|
952
|
+
UIntPtr /*(size_t)*/ outputCount,
|
|
953
|
+
IntPtr[] /*(OrtValue*[])*/ outputValues,
|
|
954
|
+
IntPtr /*(void (*RunAsyncCallbackFn)(void* user_data, OrtValue** outputs, size_t num_outputs, OrtStatusPtr status))*/ callback, // callback function
|
|
955
|
+
IntPtr /*(void*)*/ user_data);
|
|
959
956
|
public static DOrtRunAsync OrtRunAsync;
|
|
960
957
|
|
|
961
|
-
|
|
958
|
+
#endregion InferenceSession API
|
|
962
959
|
|
|
963
|
-
|
|
960
|
+
#region SessionOptions API
|
|
964
961
|
|
|
965
962
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
966
963
|
public delegate IntPtr /*(OrtStatus*)*/ DOrtCreateSessionOptions(out IntPtr /*(OrtSessionOptions**)*/ sessionOptions);
|
|
967
964
|
public static DOrtCreateSessionOptions OrtCreateSessionOptions;
|
|
968
965
|
|
|
969
966
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
970
|
-
public delegate void DOrtReleaseSessionOptions(IntPtr /*(OrtSessionOptions*)*/session);
|
|
967
|
+
public delegate void DOrtReleaseSessionOptions(IntPtr /*(OrtSessionOptions*)*/ session);
|
|
971
968
|
public static DOrtReleaseSessionOptions OrtReleaseSessionOptions;
|
|
972
969
|
|
|
973
970
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
@@ -976,7 +973,7 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
976
973
|
|
|
977
974
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
978
975
|
public delegate IntPtr /*(OrtStatus*)*/ DOrtSetSessionExecutionMode(IntPtr /*(OrtSessionOptions*)*/ options,
|
|
979
|
-
|
|
976
|
+
ExecutionMode execution_mode);
|
|
980
977
|
public static DOrtSetSessionExecutionMode OrtSetSessionExecutionMode;
|
|
981
978
|
|
|
982
979
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
@@ -1008,7 +1005,7 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
1008
1005
|
public static DOrtDisableCpuMemArena OrtDisableCpuMemArena;
|
|
1009
1006
|
|
|
1010
1007
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1011
|
-
public delegate IntPtr /*(OrtStatus*)*/ DOrtSetSessionLogId(IntPtr /* OrtSessionOptions* */ options, byte[] /* const char* */logId);
|
|
1008
|
+
public delegate IntPtr /*(OrtStatus*)*/ DOrtSetSessionLogId(IntPtr /* OrtSessionOptions* */ options, byte[] /* const char* */ logId);
|
|
1012
1009
|
public static DOrtSetSessionLogId OrtSetSessionLogId;
|
|
1013
1010
|
|
|
1014
1011
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
@@ -1039,7 +1036,7 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
1039
1036
|
/// <param name="configValue">Config value</param>
|
|
1040
1037
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1041
1038
|
public delegate IntPtr /*(OrtStatus*)*/ DOrtAddSessionConfigEntry(IntPtr /* OrtSessionOptions* */ options,
|
|
1042
|
-
byte[] /* const char* */configKey,
|
|
1039
|
+
byte[] /* const char* */ configKey,
|
|
1043
1040
|
byte[] /* const char* */ configValue);
|
|
1044
1041
|
public static DOrtAddSessionConfigEntry OrtAddSessionConfigEntry;
|
|
1045
1042
|
|
|
@@ -1102,9 +1099,9 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
1102
1099
|
/// <param name="options">Native OrtSessionOptions instance</param>
|
|
1103
1100
|
/// <param name="trtProviderOptions">Native OrtTensorRTProviderOptions instance</param>
|
|
1104
1101
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1105
|
-
public delegate IntPtr /*(OrtStatus*)*/DSessionOptionsAppendExecutionProvider_TensorRT(
|
|
1106
|
-
|
|
1107
|
-
|
|
1102
|
+
public delegate IntPtr /*(OrtStatus*)*/ DSessionOptionsAppendExecutionProvider_TensorRT(
|
|
1103
|
+
IntPtr /*(OrtSessionOptions*)*/ options,
|
|
1104
|
+
IntPtr /*(const OrtTensorRTProviderOptions*)*/ trtProviderOptions);
|
|
1108
1105
|
|
|
1109
1106
|
public static DSessionOptionsAppendExecutionProvider_TensorRT SessionOptionsAppendExecutionProvider_TensorRT;
|
|
1110
1107
|
|
|
@@ -1114,9 +1111,9 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
1114
1111
|
/// <param name="options">Native OrtSessionOptions instance</param>
|
|
1115
1112
|
/// <param name="trtProviderOptions">Native OrtTensorRTProviderOptionsV2 instance</param>
|
|
1116
1113
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1117
|
-
public delegate IntPtr /*(OrtStatus*)*/DSessionOptionsAppendExecutionProvider_TensorRT_V2(
|
|
1118
|
-
|
|
1119
|
-
|
|
1114
|
+
public delegate IntPtr /*(OrtStatus*)*/ DSessionOptionsAppendExecutionProvider_TensorRT_V2(
|
|
1115
|
+
IntPtr /*(OrtSessionOptions*)*/ options,
|
|
1116
|
+
IntPtr /*(const OrtTensorRTProviderOptionsV2*)*/ trtProviderOptions);
|
|
1120
1117
|
|
|
1121
1118
|
public static DSessionOptionsAppendExecutionProvider_TensorRT_V2 SessionOptionsAppendExecutionProvider_TensorRT_V2;
|
|
1122
1119
|
|
|
@@ -1126,9 +1123,9 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
1126
1123
|
/// <param name="options">Native OrtSessionOptions instance</param>
|
|
1127
1124
|
/// <param name="cudaProviderOptions">Native OrtCUDAProviderOptions instance</param>
|
|
1128
1125
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1129
|
-
public delegate IntPtr /*(OrtStatus*)*/DSessionOptionsAppendExecutionProvider_CUDA(
|
|
1130
|
-
|
|
1131
|
-
|
|
1126
|
+
public delegate IntPtr /*(OrtStatus*)*/ DSessionOptionsAppendExecutionProvider_CUDA(
|
|
1127
|
+
IntPtr /*(OrtSessionOptions*)*/ options,
|
|
1128
|
+
IntPtr /*(const OrtCUDAProviderOptions*)*/ cudaProviderOptions);
|
|
1132
1129
|
|
|
1133
1130
|
public static DSessionOptionsAppendExecutionProvider_CUDA SessionOptionsAppendExecutionProvider_CUDA;
|
|
1134
1131
|
|
|
@@ -1138,9 +1135,9 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
1138
1135
|
/// <param name="options">Native OrtSessionOptions instance</param>
|
|
1139
1136
|
/// <param name="cudaProviderOptions">Native OrtCUDAProviderOptionsV2 instance</param>
|
|
1140
1137
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1141
|
-
public delegate IntPtr /*(OrtStatus*)*/DSessionOptionsAppendExecutionProvider_CUDA_V2(
|
|
1142
|
-
|
|
1143
|
-
|
|
1138
|
+
public delegate IntPtr /*(OrtStatus*)*/ DSessionOptionsAppendExecutionProvider_CUDA_V2(
|
|
1139
|
+
IntPtr /*(OrtSessionOptions*)*/ options,
|
|
1140
|
+
IntPtr /*(const OrtCUDAProviderOptionsV2*)*/ cudaProviderOptions);
|
|
1144
1141
|
|
|
1145
1142
|
public static DSessionOptionsAppendExecutionProvider_CUDA_V2 SessionOptionsAppendExecutionProvider_CUDA_V2;
|
|
1146
1143
|
|
|
@@ -1150,9 +1147,9 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
1150
1147
|
/// <param name="options">Native OrtSessionOptions instance</param>
|
|
1151
1148
|
/// <param name="rocmProviderOptions">Native OrtROCMProviderOptions instance</param>
|
|
1152
1149
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1153
|
-
public delegate IntPtr /*(OrtStatus*)*/DSessionOptionsAppendExecutionProvider_ROCM(
|
|
1154
|
-
|
|
1155
|
-
|
|
1150
|
+
public delegate IntPtr /*(OrtStatus*)*/ DSessionOptionsAppendExecutionProvider_ROCM(
|
|
1151
|
+
IntPtr /*(OrtSessionOptions*)*/ options,
|
|
1152
|
+
IntPtr /*(const OrtROCMProviderOptions*)*/ rocmProviderOptions);
|
|
1156
1153
|
|
|
1157
1154
|
public static DSessionOptionsAppendExecutionProvider_ROCM SessionOptionsAppendExecutionProvider_ROCM;
|
|
1158
1155
|
|
|
@@ -1163,9 +1160,9 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
1163
1160
|
/// <param name="dimDenotation">Dimension denotation</param>
|
|
1164
1161
|
/// <param name="dimValue">Dimension value</param>
|
|
1165
1162
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1166
|
-
public delegate IntPtr /*(OrtStatus*)*/DOrtAddFreeDimensionOverride(IntPtr /*(OrtSessionOptions*)*/ options,
|
|
1167
|
-
|
|
1168
|
-
|
|
1163
|
+
public delegate IntPtr /*(OrtStatus*)*/ DOrtAddFreeDimensionOverride(IntPtr /*(OrtSessionOptions*)*/ options,
|
|
1164
|
+
byte[] /*(const char*)*/ dimDenotation,
|
|
1165
|
+
long dimValue);
|
|
1169
1166
|
|
|
1170
1167
|
public static DOrtAddFreeDimensionOverride OrtAddFreeDimensionOverride;
|
|
1171
1168
|
|
|
@@ -1176,9 +1173,9 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
1176
1173
|
/// <param name="dimName">Dimension name</param>
|
|
1177
1174
|
/// <param name="dimValue">Dimension value</param>
|
|
1178
1175
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1179
|
-
public delegate IntPtr /*(OrtStatus*)*/DOrtAddFreeDimensionOverrideByName(IntPtr /*(OrtSessionOptions*)*/ options,
|
|
1180
|
-
|
|
1181
|
-
|
|
1176
|
+
public delegate IntPtr /*(OrtStatus*)*/ DOrtAddFreeDimensionOverrideByName(IntPtr /*(OrtSessionOptions*)*/ options,
|
|
1177
|
+
byte[] /*(const char*)*/ dimName,
|
|
1178
|
+
long dimValue);
|
|
1182
1179
|
|
|
1183
1180
|
public static DOrtAddFreeDimensionOverrideByName OrtAddFreeDimensionOverrideByName;
|
|
1184
1181
|
|
|
@@ -1189,9 +1186,9 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
1189
1186
|
/// <param name="libraryPath">Library path</param>
|
|
1190
1187
|
/// <param name="libraryHandle">(out) Native library handle</param>
|
|
1191
1188
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1192
|
-
public delegate IntPtr /*(OrtStatus*)*/DOrtRegisterCustomOpsLibrary(IntPtr /*(OrtSessionOptions*) */ options,
|
|
1193
|
-
|
|
1194
|
-
|
|
1189
|
+
public delegate IntPtr /*(OrtStatus*)*/ DOrtRegisterCustomOpsLibrary(IntPtr /*(OrtSessionOptions*) */ options,
|
|
1190
|
+
byte[] /*(const char*)*/ libraryPath,
|
|
1191
|
+
out IntPtr /*(void**)*/ libraryHandle);
|
|
1195
1192
|
|
|
1196
1193
|
public static DOrtRegisterCustomOpsLibrary OrtRegisterCustomOpsLibrary;
|
|
1197
1194
|
|
|
@@ -1201,8 +1198,8 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
1201
1198
|
/// <param name="options">Native SessionOptions instance</param>
|
|
1202
1199
|
/// <param name="libraryPath">Library path</param>
|
|
1203
1200
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1204
|
-
public delegate IntPtr /*(OrtStatus*)*/DOrtRegisterCustomOpsLibrary_V2(IntPtr /*(OrtSessionOptions*) */ options,
|
|
1205
|
-
|
|
1201
|
+
public delegate IntPtr /*(OrtStatus*)*/ DOrtRegisterCustomOpsLibrary_V2(IntPtr /*(OrtSessionOptions*) */ options,
|
|
1202
|
+
byte[] /*(const ORTCHAR_T*)*/ libraryPath);
|
|
1206
1203
|
|
|
1207
1204
|
public static DOrtRegisterCustomOpsLibrary_V2 OrtRegisterCustomOpsLibrary_V2;
|
|
1208
1205
|
|
|
@@ -1213,9 +1210,9 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
1213
1210
|
/// <param name="name">Name of the initializer</param>
|
|
1214
1211
|
/// <param name="ortValue">Native OrtValue instnce</param>
|
|
1215
1212
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1216
|
-
public delegate IntPtr /*(OrtStatus*)*/DOrtAddInitializer(IntPtr /*(OrtSessionOptions*)*/ options,
|
|
1217
|
-
|
|
1218
|
-
|
|
1213
|
+
public delegate IntPtr /*(OrtStatus*)*/ DOrtAddInitializer(IntPtr /*(OrtSessionOptions*)*/ options,
|
|
1214
|
+
byte[] /*(const char*)*/ name,
|
|
1215
|
+
IntPtr /*(OrtValue*)*/ ortValue);
|
|
1219
1216
|
|
|
1220
1217
|
public static DOrtAddInitializer OrtAddInitializer;
|
|
1221
1218
|
|
|
@@ -1232,25 +1229,25 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
1232
1229
|
/// <param name="providerOptionsValues">Configuration values to add</param>
|
|
1233
1230
|
/// <param name="numKeys">Number of configuration keys</param>
|
|
1234
1231
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1235
|
-
public delegate IntPtr /*(OrtStatus*)*/DSessionOptionsAppendExecutionProvider(
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1232
|
+
public delegate IntPtr /*(OrtStatus*)*/ DSessionOptionsAppendExecutionProvider(
|
|
1233
|
+
IntPtr /*(OrtSessionOptions*)*/ options,
|
|
1234
|
+
byte[] /*(const char*)*/ providerName,
|
|
1235
|
+
IntPtr[] /*(const char* const *)*/ providerOptionsKeys,
|
|
1236
|
+
IntPtr[] /*(const char* const *)*/ providerOptionsValues,
|
|
1237
|
+
UIntPtr /*(size_t)*/ numKeys);
|
|
1241
1238
|
|
|
1242
1239
|
public static DSessionOptionsAppendExecutionProvider SessionOptionsAppendExecutionProvider;
|
|
1243
1240
|
|
|
1244
|
-
|
|
1241
|
+
#endregion
|
|
1245
1242
|
|
|
1246
|
-
|
|
1243
|
+
#region RunOptions API
|
|
1247
1244
|
|
|
1248
1245
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1249
1246
|
public delegate IntPtr /*(OrtStatus*)*/ DOrtCreateRunOptions(out IntPtr /* OrtRunOptions** */ runOptions);
|
|
1250
1247
|
public static DOrtCreateRunOptions OrtCreateRunOptions;
|
|
1251
1248
|
|
|
1252
1249
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1253
|
-
public delegate void DOrtReleaseRunOptions(IntPtr /*(OrtRunOptions*)*/options);
|
|
1250
|
+
public delegate void DOrtReleaseRunOptions(IntPtr /*(OrtRunOptions*)*/ options);
|
|
1254
1251
|
public static DOrtReleaseRunOptions OrtReleaseRunOptions;
|
|
1255
1252
|
|
|
1256
1253
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
@@ -1271,11 +1268,11 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
1271
1268
|
|
|
1272
1269
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1273
1270
|
public delegate IntPtr /*(OrtStatus*)*/ DOrtRunOptionsGetRunLogSeverityLevel(IntPtr /* OrtRunOptions* */ options,
|
|
1274
|
-
|
|
1271
|
+
out OrtLoggingLevel severityLevel);
|
|
1275
1272
|
public static DOrtRunOptionsGetRunLogSeverityLevel OrtRunOptionsGetRunLogSeverityLevel;
|
|
1276
1273
|
|
|
1277
1274
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1278
|
-
public delegate IntPtr /*(OrtStatus*)*/ DOrtRunOptionsGetRunTag(IntPtr /* const OrtRunOptions* */options, out IntPtr /* const char** */ runtag);
|
|
1275
|
+
public delegate IntPtr /*(OrtStatus*)*/ DOrtRunOptionsGetRunTag(IntPtr /* const OrtRunOptions* */ options, out IntPtr /* const char** */ runtag);
|
|
1279
1276
|
public static DOrtRunOptionsGetRunTag OrtRunOptionsGetRunTag;
|
|
1280
1277
|
|
|
1281
1278
|
// Set a flag so that any running OrtRun* calls that are using this instance of OrtRunOptions
|
|
@@ -1288,7 +1285,6 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
1288
1285
|
public delegate IntPtr /*(OrtStatus*)*/ DOrtRunOptionsUnsetTerminate(IntPtr /* OrtRunOptions* */ options);
|
|
1289
1286
|
public static DOrtRunOptionsUnsetTerminate OrtRunOptionsUnsetTerminate;
|
|
1290
1287
|
|
|
1291
|
-
|
|
1292
1288
|
/// <summary>
|
|
1293
1289
|
/// Add run config entry
|
|
1294
1290
|
/// </summary>
|
|
@@ -1297,13 +1293,13 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
1297
1293
|
/// <param name="configValue">Config value</param>
|
|
1298
1294
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1299
1295
|
public delegate IntPtr /*(OrtStatus*)*/ DOrtAddRunConfigEntry(IntPtr /* OrtRunOptions* */ options,
|
|
1300
|
-
byte[] /* const char* */configKey,
|
|
1296
|
+
byte[] /* const char* */ configKey,
|
|
1301
1297
|
byte[] /* const char* */ configValue);
|
|
1302
1298
|
public static DOrtAddRunConfigEntry OrtAddRunConfigEntry;
|
|
1303
1299
|
|
|
1304
|
-
|
|
1300
|
+
#endregion
|
|
1305
1301
|
|
|
1306
|
-
|
|
1302
|
+
#region ThreadingOptions API
|
|
1307
1303
|
|
|
1308
1304
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1309
1305
|
public delegate IntPtr /*(OrtStatus*)*/ DOrtCreateThreadingOptions(out IntPtr /* OrtCreateThreadingOptions** */ threadingOptions);
|
|
@@ -1328,27 +1324,26 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
1328
1324
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1329
1325
|
public delegate IntPtr /*(OrtStatus*)*/ DOrtThreadingOptionsSetGlobalSpinControl(IntPtr /* OrtThreadingOptions* */ threadingOptions, int allowSpinning);
|
|
1330
1326
|
public static DOrtThreadingOptionsSetGlobalSpinControl OrtThreadingOptionsSetGlobalSpinControl;
|
|
1331
|
-
|
|
1327
|
+
#endregion
|
|
1332
1328
|
|
|
1333
|
-
|
|
1329
|
+
#region Allocator / MemoryInfo API
|
|
1334
1330
|
|
|
1335
1331
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1336
1332
|
public delegate IntPtr /* (OrtStatus*)*/ DOrtCreateMemoryInfo(
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1333
|
+
byte[] /*(const char*) */ name,
|
|
1334
|
+
OrtAllocatorType allocatorType,
|
|
1335
|
+
int identifier,
|
|
1336
|
+
OrtMemType memType,
|
|
1337
|
+
out IntPtr /*(OrtMemoryInfo*)*/ allocatorInfo // memory ownership transfered to caller
|
|
1338
|
+
);
|
|
1343
1339
|
|
|
1344
1340
|
public static DOrtCreateMemoryInfo OrtCreateMemoryInfo;
|
|
1345
1341
|
|
|
1346
1342
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1347
1343
|
public delegate IntPtr /* (OrtStatus*)*/ DOrtCreateCpuMemoryInfo(
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
);
|
|
1344
|
+
OrtAllocatorType allocatorType,
|
|
1345
|
+
OrtMemType memoryType,
|
|
1346
|
+
out IntPtr /*(OrtMemoryInfo*)*/ allocatorInfo);
|
|
1352
1347
|
|
|
1353
1348
|
public static DOrtCreateCpuMemoryInfo OrtCreateCpuMemoryInfo;
|
|
1354
1349
|
|
|
@@ -1359,15 +1354,15 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
1359
1354
|
|
|
1360
1355
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1361
1356
|
public delegate IntPtr /*(OrtStatus*)*/ DOrtCompareMemoryInfo(
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1357
|
+
IntPtr /*(const OrtMemoryInfo*)*/ info1,
|
|
1358
|
+
IntPtr /*(const OrtMemoryInfo*)*/ info2,
|
|
1359
|
+
out int /*(int* out)*/ result);
|
|
1365
1360
|
|
|
1366
1361
|
public static DOrtCompareMemoryInfo OrtCompareMemoryInfo;
|
|
1367
1362
|
|
|
1368
1363
|
/**
|
|
1369
|
-
|
|
1370
|
-
|
|
1364
|
+
* Do not free the returned value
|
|
1365
|
+
*/
|
|
1371
1366
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1372
1367
|
public delegate IntPtr /*(OrtStatus*)*/ DOrtMemoryInfoGetName(IntPtr /*(const OrtMemoryInfo* ptr)*/ mem_info, out IntPtr /*(const char**)*/ name);
|
|
1373
1368
|
|
|
@@ -1380,26 +1375,25 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
1380
1375
|
|
|
1381
1376
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1382
1377
|
public delegate IntPtr /*(OrtStatus*)*/ DOrtMemoryInfoGetMemType(
|
|
1383
|
-
|
|
1384
|
-
|
|
1378
|
+
IntPtr /*(const OrtMemoryInfo* ptr)*/ mem_info,
|
|
1379
|
+
out OrtMemType /*(OrtMemType*)*/ mem_type);
|
|
1385
1380
|
|
|
1386
1381
|
public static DOrtMemoryInfoGetMemType OrtMemoryInfoGetMemType;
|
|
1387
1382
|
|
|
1388
1383
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1389
1384
|
public delegate IntPtr /*(OrtStatus*)*/ DOrtMemoryInfoGetType(
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
);
|
|
1385
|
+
IntPtr /*(const OrtMemoryInfo* ptr)*/ mem_info,
|
|
1386
|
+
out OrtAllocatorType /*(OrtAllocatorType*)*/ alloc_type);
|
|
1393
1387
|
|
|
1394
1388
|
public static DOrtMemoryInfoGetType OrtMemoryInfoGetType;
|
|
1395
1389
|
|
|
1396
1390
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1397
|
-
public delegate IntPtr /*(OrtStatus*)*/DOrtGetAllocatorWithDefaultOptions(out IntPtr /*(OrtAllocator**)*/ allocator);
|
|
1391
|
+
public delegate IntPtr /*(OrtStatus*)*/ DOrtGetAllocatorWithDefaultOptions(out IntPtr /*(OrtAllocator**)*/ allocator);
|
|
1398
1392
|
|
|
1399
1393
|
public static DOrtGetAllocatorWithDefaultOptions OrtGetAllocatorWithDefaultOptions;
|
|
1400
1394
|
|
|
1401
1395
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1402
|
-
public delegate IntPtr /*(OrtStatus*)*/DOrtAllocatorGetInfo(IntPtr /*(const OrtAllocator*)*/ ptr, out IntPtr /*(const struct OrtMemoryInfo**)*/info);
|
|
1396
|
+
public delegate IntPtr /*(OrtStatus*)*/ DOrtAllocatorGetInfo(IntPtr /*(const OrtAllocator*)*/ ptr, out IntPtr /*(const struct OrtMemoryInfo**)*/ info);
|
|
1403
1397
|
|
|
1404
1398
|
public static DOrtAllocatorGetInfo OrtAllocatorGetInfo;
|
|
1405
1399
|
|
|
@@ -1414,8 +1408,8 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
1414
1408
|
/// <returns>Pointer to a native OrtStatus instance indicating success/failure of config creation</returns>
|
|
1415
1409
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1416
1410
|
public delegate IntPtr /*(OrtStatus*)*/ DOrtCreateArenaCfg(UIntPtr /*(size_t)*/ maxMemory, int /*(int)*/ arenaExtendStrategy,
|
|
1417
|
-
|
|
1418
|
-
|
|
1411
|
+
int /*(int)*/ initialChunkSizeBytes, int /*(int)*/ maxDeadBytesPerChunk,
|
|
1412
|
+
out IntPtr /*(OrtArenaCfg**)*/ arenaCfg);
|
|
1419
1413
|
|
|
1420
1414
|
public static DOrtCreateArenaCfg OrtCreateArenaCfg;
|
|
1421
1415
|
|
|
@@ -1469,9 +1463,9 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
1469
1463
|
|
|
1470
1464
|
public static DOrtAllocatorFree OrtAllocatorFree;
|
|
1471
1465
|
|
|
1472
|
-
|
|
1466
|
+
#endregion Allocator / MemoryInfo API
|
|
1473
1467
|
|
|
1474
|
-
|
|
1468
|
+
#region IoBinding API
|
|
1475
1469
|
|
|
1476
1470
|
/// <summary>
|
|
1477
1471
|
/// Create OrtIoBinding instance that is used to bind memory that is allocated
|
|
@@ -1646,7 +1640,7 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
1646
1640
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1647
1641
|
public delegate IntPtr /*(OrtStatus*)*/ DOrtCreateAndRegisterAllocator(IntPtr /*(OrtEnv*)*/ env,
|
|
1648
1642
|
IntPtr /*(const OrtMemoryInfo*)*/ memInfo,
|
|
1649
|
-
IntPtr/*(const OrtArenaCfg*)*/ arenaCfg);
|
|
1643
|
+
IntPtr /*(const OrtArenaCfg*)*/ arenaCfg);
|
|
1650
1644
|
|
|
1651
1645
|
public static DOrtCreateAndRegisterAllocator OrtCreateAndRegisterAllocator;
|
|
1652
1646
|
|
|
@@ -1656,13 +1650,13 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
1656
1650
|
/// <param name="projection">the source projected language</param>
|
|
1657
1651
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1658
1652
|
public delegate IntPtr /*(OrtStatus*)*/ DOrtSetLanguageProjection(IntPtr /* (OrtEnv*) */ environment,
|
|
1659
|
-
|
|
1653
|
+
int projection);
|
|
1660
1654
|
|
|
1661
1655
|
public static DOrtSetLanguageProjection OrtSetLanguageProjection;
|
|
1662
1656
|
|
|
1663
|
-
|
|
1657
|
+
#endregion IoBinding API
|
|
1664
1658
|
|
|
1665
|
-
|
|
1659
|
+
#region ModelMetadata API
|
|
1666
1660
|
|
|
1667
1661
|
/// <summary>
|
|
1668
1662
|
/// Gets the ModelMetadata associated with an InferenceSession
|
|
@@ -1682,7 +1676,7 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
1682
1676
|
/// <param name="value">(output) producer name from the ModelMetadata instance</param>
|
|
1683
1677
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1684
1678
|
public delegate IntPtr /* (OrtStatus*) */ DOrtModelMetadataGetProducerName(IntPtr /* (const OrtModelMetadata*) */ modelMetadata,
|
|
1685
|
-
|
|
1679
|
+
IntPtr /* (OrtAllocator*) */ allocator, out IntPtr /* (char**) */ value);
|
|
1686
1680
|
|
|
1687
1681
|
public static DOrtModelMetadataGetProducerName OrtModelMetadataGetProducerName;
|
|
1688
1682
|
|
|
@@ -1694,7 +1688,7 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
1694
1688
|
/// <param name="value">(output) graph name from the ModelMetadata instance</param>
|
|
1695
1689
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1696
1690
|
public delegate IntPtr /* (OrtStatus*) */ DOrtModelMetadataGetGraphName(IntPtr /* (const OrtModelMetadata*) */ modelMetadata,
|
|
1697
|
-
|
|
1691
|
+
IntPtr /* (OrtAllocator*) */ allocator, out IntPtr /* (char**) */ value);
|
|
1698
1692
|
|
|
1699
1693
|
public static DOrtModelMetadataGetGraphName OrtModelMetadataGetGraphName;
|
|
1700
1694
|
|
|
@@ -1706,7 +1700,7 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
1706
1700
|
/// <param name="value">(output) domain from the ModelMetadata instance</param>
|
|
1707
1701
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1708
1702
|
public delegate IntPtr /* (OrtStatus*) */ DOrtModelMetadataGetDomain(IntPtr /* (const OrtModelMetadata*) */ modelMetadata,
|
|
1709
|
-
|
|
1703
|
+
IntPtr /* (OrtAllocator*) */ allocator, out IntPtr /* (char**) */ value);
|
|
1710
1704
|
|
|
1711
1705
|
public static DOrtModelMetadataGetDomain OrtModelMetadataGetDomain;
|
|
1712
1706
|
|
|
@@ -1718,7 +1712,7 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
1718
1712
|
/// <param name="value">(output) description from the ModelMetadata instance</param>
|
|
1719
1713
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1720
1714
|
public delegate IntPtr /* (OrtStatus*) */ DOrtModelMetadataGetDescription(IntPtr /* (const OrtModelMetadata*) */ modelMetadata,
|
|
1721
|
-
|
|
1715
|
+
IntPtr /* (OrtAllocator*) */ allocator, out IntPtr /* (char**) */ value);
|
|
1722
1716
|
|
|
1723
1717
|
public static DOrtModelMetadataGetDescription OrtModelMetadataGetDescription;
|
|
1724
1718
|
|
|
@@ -1730,7 +1724,7 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
1730
1724
|
/// <param name="value">(output) graph description from the ModelMetadata instance</param>
|
|
1731
1725
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1732
1726
|
public delegate IntPtr /* (OrtStatus*) */ DOrtModelMetadataGetGraphDescription(IntPtr /* (const OrtModelMetadata*) */ modelMetadata,
|
|
1733
|
-
|
|
1727
|
+
IntPtr /* (OrtAllocator*) */ allocator, out IntPtr /* (char**) */ value);
|
|
1734
1728
|
|
|
1735
1729
|
public static DOrtModelMetadataGetGraphDescription OrtModelMetadataGetGraphDescription;
|
|
1736
1730
|
|
|
@@ -1754,7 +1748,7 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
1754
1748
|
/// <param name="numKeys">(output) number of keys in the custom metadata map</param>
|
|
1755
1749
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1756
1750
|
public delegate IntPtr /* (OrtStatus*) */ DOrtModelMetadataGetCustomMetadataMapKeys(IntPtr /* (const OrtModelMetadata*) */ modelMetadata,
|
|
1757
|
-
|
|
1751
|
+
IntPtr /* (OrtAllocator*) */ allocator, out IntPtr /* (char***) */ keys, out long /* (int64_t*) */ numKeys);
|
|
1758
1752
|
|
|
1759
1753
|
public static DOrtModelMetadataGetCustomMetadataMapKeys OrtModelMetadataGetCustomMetadataMapKeys;
|
|
1760
1754
|
|
|
@@ -1767,7 +1761,7 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
1767
1761
|
/// <param name="value">(output) value for the key in the custom metadata map</param>
|
|
1768
1762
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1769
1763
|
public delegate IntPtr /* (OrtStatus*) */ DOrtModelMetadataLookupCustomMetadataMap(IntPtr /* (const OrtModelMetadata*) */ modelMetadata,
|
|
1770
|
-
|
|
1764
|
+
IntPtr /* (OrtAllocator*) */ allocator, IntPtr /* (const char*) */ key, out IntPtr /* (char**) */ value);
|
|
1771
1765
|
|
|
1772
1766
|
public static DOrtModelMetadataLookupCustomMetadataMap OrtModelMetadataLookupCustomMetadataMap;
|
|
1773
1767
|
|
|
@@ -1780,9 +1774,9 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
1780
1774
|
|
|
1781
1775
|
public static DOrtReleaseModelMetadata OrtReleaseModelMetadata;
|
|
1782
1776
|
|
|
1783
|
-
|
|
1777
|
+
#endregion ModelMetadata API
|
|
1784
1778
|
|
|
1785
|
-
|
|
1779
|
+
#region OrtValue API
|
|
1786
1780
|
|
|
1787
1781
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1788
1782
|
public delegate IntPtr /*(OrtStatus*)*/ DOrtHasValue(IntPtr /*(OrtValue*)*/ value, out IntPtr /*(int*)*/ hasValue);
|
|
@@ -1791,9 +1785,9 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
1791
1785
|
|
|
1792
1786
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1793
1787
|
public delegate IntPtr /*(OrtStatus*)*/ DOrtGetValue(IntPtr /*(OrtValue*)*/ value,
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1788
|
+
int index,
|
|
1789
|
+
IntPtr /*(OrtAllocator*)*/ allocator,
|
|
1790
|
+
out IntPtr /*(OrtValue**)*/ outputValue);
|
|
1797
1791
|
|
|
1798
1792
|
public static DOrtGetValue OrtGetValue;
|
|
1799
1793
|
|
|
@@ -1813,8 +1807,8 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
1813
1807
|
public static DOrtGetValueCount OrtGetValueCount;
|
|
1814
1808
|
|
|
1815
1809
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1816
|
-
public delegate IntPtr/*(OrtStatus*)*/ DOrtCreateValue(IntPtr[] /* const OrtValue* const* in */ values,
|
|
1817
|
-
|
|
1810
|
+
public delegate IntPtr /*(OrtStatus*)*/ DOrtCreateValue(IntPtr[] /* const OrtValue* const* in */ values,
|
|
1811
|
+
UIntPtr /* size_t */ num_values, IntPtr /* (OnnxValueType */ onnxValueType, out IntPtr /* OrtValue** */ ortValue);
|
|
1818
1812
|
|
|
1819
1813
|
public static DOrtCreateValue OrtCreateValue;
|
|
1820
1814
|
|
|
@@ -1825,23 +1819,23 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
1825
1819
|
|
|
1826
1820
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1827
1821
|
public delegate IntPtr /*(OrtStatus*)*/ DOrtCreateTensorAsOrtValue(
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1822
|
+
IntPtr /*_Inout_ OrtAllocator* */ allocator,
|
|
1823
|
+
long[] /*_In_ const int64_t* */ shape,
|
|
1824
|
+
UIntPtr /*size_t*/ shape_len,
|
|
1825
|
+
Tensors.TensorElementType type,
|
|
1826
|
+
out IntPtr /* OrtValue** */ outputValue);
|
|
1833
1827
|
|
|
1834
1828
|
public static DOrtCreateTensorAsOrtValue OrtCreateTensorAsOrtValue;
|
|
1835
1829
|
|
|
1836
1830
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1837
1831
|
public delegate IntPtr /* OrtStatus */ DOrtCreateTensorWithDataAsOrtValue(
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1832
|
+
IntPtr /* (const OrtMemoryInfo*) */ allocatorInfo,
|
|
1833
|
+
IntPtr /* (void*) */ dataBufferHandle,
|
|
1834
|
+
UIntPtr dataLength,
|
|
1835
|
+
long[] shape,
|
|
1836
|
+
UIntPtr shapeLength,
|
|
1837
|
+
Tensors.TensorElementType type,
|
|
1838
|
+
out IntPtr /* OrtValue** */ outputValue);
|
|
1845
1839
|
|
|
1846
1840
|
public static DOrtCreateTensorWithDataAsOrtValue OrtCreateTensorWithDataAsOrtValue;
|
|
1847
1841
|
|
|
@@ -1866,9 +1860,9 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
1866
1860
|
/// \param len total data length, not including the trailing '\0' chars.
|
|
1867
1861
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1868
1862
|
public delegate IntPtr /*(OrtStatus*)*/ DOrtFillStringTensor(
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1863
|
+
IntPtr /* OrtValue */ value,
|
|
1864
|
+
IntPtr[] /* const char* const* */ s,
|
|
1865
|
+
UIntPtr /* size_t */ s_len);
|
|
1872
1866
|
|
|
1873
1867
|
public static DOrtFillStringTensor OrtFillStringTensor;
|
|
1874
1868
|
|
|
@@ -1888,7 +1882,7 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
1888
1882
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1889
1883
|
public delegate IntPtr /*(OrtStatus*)*/ DOrtGetStringTensorContent(
|
|
1890
1884
|
IntPtr /*(OrtValue*)*/ value,
|
|
1891
|
-
byte[] /*(void*)*/
|
|
1885
|
+
byte[] /*(void*)*/ dst_buffer,
|
|
1892
1886
|
UIntPtr dst_buffer_len,
|
|
1893
1887
|
UIntPtr[] offsets,
|
|
1894
1888
|
UIntPtr offsets_len);
|
|
@@ -1925,7 +1919,7 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
1925
1919
|
|
|
1926
1920
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1927
1921
|
public delegate IntPtr /*(OrtStatus*)*/ DOrtGetTensorTypeAndShape(
|
|
1928
|
-
IntPtr /*(OrtValue*)*/ value,
|
|
1922
|
+
IntPtr /*(OrtValue*)*/ value,
|
|
1929
1923
|
out IntPtr /*(struct OrtTensorTypeAndShapeInfo*)*/ typeAndShapeInfo);
|
|
1930
1924
|
|
|
1931
1925
|
public static DOrtGetTensorTypeAndShape OrtGetTensorTypeAndShape;
|
|
@@ -1944,35 +1938,35 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
1944
1938
|
|
|
1945
1939
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1946
1940
|
public delegate IntPtr /*(OrtStatus*)*/ DOrtGetDimensionsCount(
|
|
1947
|
-
IntPtr /*(const struct OrtTensorTypeAndShapeInfo*)*/ typeAndShapeInfo,
|
|
1941
|
+
IntPtr /*(const struct OrtTensorTypeAndShapeInfo*)*/ typeAndShapeInfo,
|
|
1948
1942
|
out UIntPtr output);
|
|
1949
1943
|
|
|
1950
1944
|
public static DOrtGetDimensionsCount OrtGetDimensionsCount;
|
|
1951
1945
|
|
|
1952
1946
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1953
1947
|
public delegate IntPtr /*(OrtStatus*)*/ DOrtGetDimensions(
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1948
|
+
IntPtr /*(const struct OrtTensorTypeAndShapeInfo*)*/ typeAndShapeInfo,
|
|
1949
|
+
long[] dim_values,
|
|
1950
|
+
UIntPtr dim_values_length);
|
|
1957
1951
|
|
|
1958
1952
|
public static DOrtGetDimensions OrtGetDimensions;
|
|
1959
1953
|
|
|
1960
1954
|
/**
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1955
|
+
* Get the symbolic dimension names for dimensions with a value of -1.
|
|
1956
|
+
* Order and number of entries is the same as values returned by GetDimensions.
|
|
1957
|
+
* The name may be empty for an unnamed symbolic dimension.
|
|
1958
|
+
* e.g.
|
|
1959
|
+
* If OrtGetDimensions returns [-1, -1, 2], OrtGetSymbolicDimensions would return an array with 3 entries.
|
|
1960
|
+
* If the values returned were ['batch', '', ''] it would indicate that
|
|
1961
|
+
* - the first dimension was a named symbolic dimension (-1 dim value and name in symbolic dimensions),
|
|
1962
|
+
* - the second dimension was an unnamed symbolic dimension (-1 dim value and empty string),
|
|
1963
|
+
* - the entry for the third dimension should be ignored as it is not a symbolic dimension (dim value >= 0).
|
|
1964
|
+
*/
|
|
1971
1965
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1972
1966
|
public delegate IntPtr /*(OrtStatus*)*/ DOrtGetSymbolicDimensions(
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1967
|
+
IntPtr /*(const struct OrtTensorTypeAndShapeInfo*)*/ typeAndShapeInfo,
|
|
1968
|
+
IntPtr[] dim_params, /* const char* values, converted to string by caller */
|
|
1969
|
+
UIntPtr dim_params_length);
|
|
1976
1970
|
|
|
1977
1971
|
public static DOrtGetSymbolicDimensions OrtGetSymbolicDimensions;
|
|
1978
1972
|
|
|
@@ -1987,15 +1981,15 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
1987
1981
|
*/
|
|
1988
1982
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1989
1983
|
public delegate IntPtr /*(OrtStatus*)*/ DOrtGetTensorShapeElementCount(IntPtr /*(const struct OrtTensorTypeAndShapeInfo*)*/ typeAndShapeInfo,
|
|
1990
|
-
|
|
1984
|
+
out UIntPtr /* size_t */ output);
|
|
1991
1985
|
|
|
1992
1986
|
public static DOrtGetTensorShapeElementCount OrtGetTensorShapeElementCount;
|
|
1993
1987
|
|
|
1994
|
-
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1995
1988
|
// The out ortMemoryInfo must not be destroyed/deallocated. The pointer points to an object owned by
|
|
1996
1989
|
// the contained Tensor/SparseTensor.
|
|
1990
|
+
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
1997
1991
|
public delegate IntPtr /*(OrtStatus*)*/ DOrtGetTensorMemoryInfo(IntPtr /* const OrtValue* */ ortValue,
|
|
1998
|
-
|
|
1992
|
+
out IntPtr /* const OrtMemoryInfo** */ ortMemoryInfo);
|
|
1999
1993
|
|
|
2000
1994
|
public static DOrtGetTensorMemoryInfo OrtGetTensorMemoryInfo;
|
|
2001
1995
|
|
|
@@ -2005,10 +1999,12 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
2005
1999
|
|
|
2006
2000
|
public static DCastTypeInfoToMapTypeInfo OrtCastTypeInfoToMapTypeInfo;
|
|
2007
2001
|
|
|
2002
|
+
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
2008
2003
|
public delegate IntPtr /*(OrtStatus*)*/ DGetMapKeyType(IntPtr /*const OrtMapTypeInfo* */ mapTypeInfo, out IntPtr /*(TensorElementType*)*/ tensorElementType);
|
|
2009
2004
|
|
|
2010
2005
|
public static DGetMapKeyType OrtGetMapKeyType;
|
|
2011
2006
|
|
|
2007
|
+
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
2012
2008
|
public delegate IntPtr /*(OrtStatus*)*/ DGetMapValueType(IntPtr /* const OrtMapTypeInfo* */ map_type_info, out IntPtr /* OrtTypeInfo** */ type_info);
|
|
2013
2009
|
|
|
2014
2010
|
public static DGetMapValueType OrtGetMapValueType;
|
|
@@ -2019,13 +2015,14 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
2019
2015
|
|
|
2020
2016
|
public static DCastTypeInfoToSequenceTypeInfo OrtCastTypeInfoToSequenceTypeInfo;
|
|
2021
2017
|
|
|
2018
|
+
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
2022
2019
|
public delegate IntPtr /*(OrtStatus*)*/ DGetSequenceElementType(IntPtr /* const OrtSequenceTypeInfo* */ sequenceTypeInfo, out IntPtr /* OrtTypeInfo** */ elementTypeInfo);
|
|
2023
2020
|
|
|
2024
2021
|
public static DGetSequenceElementType OrtGetSequenceElementType;
|
|
2025
2022
|
|
|
2026
2023
|
// OptionalTypeInfo
|
|
2027
2024
|
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
|
2028
|
-
public delegate IntPtr /*(OrtStatus*)*/
|
|
2025
|
+
public delegate IntPtr /*(OrtStatus*)*/ DOrtCastTypeInfoToOptionalTypeInfo(IntPtr /*(struct OrtTypeInfo*)*/ typeInfo, out IntPtr /* const struct OrtOptionalTypeInfo** */ optionalTypeInfo);
|
|
2029
2026
|
|
|
2030
2027
|
public static DOrtCastTypeInfoToOptionalTypeInfo OrtCastTypeInfoToOptionalTypeInfo;
|
|
2031
2028
|
|
|
@@ -2039,10 +2036,9 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
2039
2036
|
|
|
2040
2037
|
public static DOrtReleaseValue OrtReleaseValue;
|
|
2041
2038
|
|
|
2042
|
-
|
|
2039
|
+
#endregion
|
|
2043
2040
|
|
|
2044
|
-
|
|
2045
|
-
#region Misc API
|
|
2041
|
+
#region Misc API
|
|
2046
2042
|
|
|
2047
2043
|
/// <summary>
|
|
2048
2044
|
/// Queries all the execution providers supported in the native onnxruntime shared library
|
|
@@ -2082,8 +2078,8 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
2082
2078
|
|
|
2083
2079
|
public static DOrtReleasePrepackedWeightsContainer OrtReleasePrepackedWeightsContainer;
|
|
2084
2080
|
|
|
2085
|
-
|
|
2086
|
-
} //class NativeMethods
|
|
2081
|
+
#endregion
|
|
2082
|
+
} // class NativeMethods
|
|
2087
2083
|
|
|
2088
2084
|
// onnxruntime-extensions helpers to make usage simpler.
|
|
2089
2085
|
// The onnxruntime-extensions nuget package containing the native library can be optionally added to the app.
|
|
@@ -2104,7 +2100,5 @@ namespace Microsoft.ML.OnnxRuntime
|
|
|
2104
2100
|
CallingConvention = CallingConvention.Winapi)]
|
|
2105
2101
|
public static extern IntPtr /* OrtStatus* */ RegisterCustomOps(IntPtr /* OrtSessionOptions* */ sessionOptions,
|
|
2106
2102
|
ref OrtApiBase /* OrtApiBase* */ ortApiBase);
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
2103
|
}
|
|
2110
|
-
} //namespace
|
|
2104
|
+
} // namespace
|