com.github.asus4.onnxruntime 0.2.0 → 0.2.2

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.
Files changed (52) hide show
  1. package/Plugins/Android/onnxruntime-android.aar +0 -0
  2. package/Plugins/Linux/x64/libonnxruntime.so +0 -0
  3. package/Plugins/Windows/x64/onnxruntime.dll +0 -0
  4. package/Plugins/iOS~/onnxruntime.xcframework/Info.plist +8 -8
  5. package/Plugins/iOS~/onnxruntime.xcframework/ios-arm64/onnxruntime.framework/Headers/coreml_provider_factory.h +6 -1
  6. package/Plugins/iOS~/onnxruntime.xcframework/ios-arm64/onnxruntime.framework/Headers/onnxruntime_c_api.h +92 -7
  7. package/Plugins/iOS~/onnxruntime.xcframework/ios-arm64/onnxruntime.framework/Headers/onnxruntime_cxx_api.h +48 -0
  8. package/Plugins/iOS~/onnxruntime.xcframework/ios-arm64/onnxruntime.framework/Headers/onnxruntime_cxx_inline.h +42 -0
  9. package/Plugins/iOS~/onnxruntime.xcframework/ios-arm64/onnxruntime.framework/Headers/onnxruntime_float16.h +0 -5
  10. package/Plugins/iOS~/onnxruntime.xcframework/ios-arm64/onnxruntime.framework/Headers/onnxruntime_session_options_config_keys.h +10 -0
  11. package/Plugins/iOS~/onnxruntime.xcframework/ios-arm64/onnxruntime.framework/Info.plist +2 -2
  12. package/Plugins/iOS~/onnxruntime.xcframework/ios-arm64/onnxruntime.framework/onnxruntime +0 -0
  13. package/Plugins/iOS~/onnxruntime.xcframework/ios-arm64_x86_64-simulator/onnxruntime.framework/Headers/coreml_provider_factory.h +6 -1
  14. package/Plugins/iOS~/onnxruntime.xcframework/ios-arm64_x86_64-simulator/onnxruntime.framework/Headers/onnxruntime_c_api.h +92 -7
  15. package/Plugins/iOS~/onnxruntime.xcframework/ios-arm64_x86_64-simulator/onnxruntime.framework/Headers/onnxruntime_cxx_api.h +48 -0
  16. package/Plugins/iOS~/onnxruntime.xcframework/ios-arm64_x86_64-simulator/onnxruntime.framework/Headers/onnxruntime_cxx_inline.h +42 -0
  17. package/Plugins/iOS~/onnxruntime.xcframework/ios-arm64_x86_64-simulator/onnxruntime.framework/Headers/onnxruntime_float16.h +0 -5
  18. package/Plugins/iOS~/onnxruntime.xcframework/ios-arm64_x86_64-simulator/onnxruntime.framework/Headers/onnxruntime_session_options_config_keys.h +10 -0
  19. package/Plugins/iOS~/onnxruntime.xcframework/ios-arm64_x86_64-simulator/onnxruntime.framework/Info.plist +2 -2
  20. package/Plugins/iOS~/onnxruntime.xcframework/ios-arm64_x86_64-simulator/onnxruntime.framework/onnxruntime +0 -0
  21. package/Plugins/iOS~/onnxruntime.xcframework/macos-arm64_x86_64/onnxruntime.framework/Versions/A/Headers/coreml_provider_factory.h +6 -1
  22. package/Plugins/iOS~/onnxruntime.xcframework/macos-arm64_x86_64/onnxruntime.framework/Versions/A/Headers/onnxruntime_c_api.h +92 -7
  23. package/Plugins/iOS~/onnxruntime.xcframework/macos-arm64_x86_64/onnxruntime.framework/Versions/A/Headers/onnxruntime_cxx_api.h +48 -0
  24. package/Plugins/iOS~/onnxruntime.xcframework/macos-arm64_x86_64/onnxruntime.framework/Versions/A/Headers/onnxruntime_cxx_inline.h +42 -0
  25. package/Plugins/iOS~/onnxruntime.xcframework/macos-arm64_x86_64/onnxruntime.framework/Versions/A/Headers/onnxruntime_float16.h +0 -5
  26. package/Plugins/iOS~/onnxruntime.xcframework/macos-arm64_x86_64/onnxruntime.framework/Versions/A/Headers/onnxruntime_session_options_config_keys.h +10 -0
  27. package/Plugins/iOS~/onnxruntime.xcframework/macos-arm64_x86_64/onnxruntime.framework/Versions/A/Resources/Info.plist +2 -2
  28. package/Plugins/iOS~/onnxruntime.xcframework/macos-arm64_x86_64/onnxruntime.framework/Versions/A/onnxruntime +0 -0
  29. package/Plugins/macOS/libonnxruntime.dylib +0 -0
  30. package/README.md +5 -5
  31. package/Runtime/AssemblyInfo.shared.cs +1 -2
  32. package/Runtime/DisposableNamedOnnxValue.shared.cs +4 -4
  33. package/Runtime/FixedBufferOnnxValue.shared.cs +2 -2
  34. package/Runtime/InferenceSession.shared.cs +2 -3
  35. package/Runtime/ManagedProjections.shared.cs +1 -1
  36. package/Runtime/NamedOnnxValue.shared.cs +6 -17
  37. package/Runtime/NativeMethods.shared.cs +87 -10
  38. package/Runtime/NativeOnnxValueHelper.shared.cs +1 -1
  39. package/Runtime/OrtEnv.shared.cs +1 -1
  40. package/Runtime/OrtFloat16.shared.cs +42 -39
  41. package/Runtime/OrtIoBinding.shared.cs +1 -1
  42. package/Runtime/OrtLoraAdapter.shared.cs +81 -0
  43. package/Runtime/OrtLoraAdapter.shared.cs.meta +11 -0
  44. package/Runtime/OrtValue.shared.cs +3 -3
  45. package/Runtime/OrtValueTensor.shared.cs +1 -1
  46. package/Runtime/ProviderOptions.shared.cs +8 -5
  47. package/Runtime/RunOptions.shared.cs +12 -0
  48. package/Runtime/SessionOptions.shared.cs +5 -5
  49. package/Runtime/Tensors/ArrayTensorExtensions.shared.cs +1 -1
  50. package/Runtime/Training/NativeTrainingMethods.shared.cs +1 -1
  51. package/Runtime/Training/TrainingSession.shared.cs +2 -2
  52. package/package.json +1 -1
@@ -17,6 +17,5 @@
17
17
 
18
18
  // Making these assembly's internals visible to the internal Test assembly
19
19
  [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("Microsoft.ML.OnnxRuntime.Tests.Common, PublicKey=002400000480000094000000060200000024000052534131000400000100010059013e94e4bc70136ca4c35f33acd6b62974536b698f9c7a21cee18d805c7ad860ad9eebfdc47a96ba2f8d03f4cf1c36b9d30787e276c7b9833b5bf2a6eba7e919e6b90083078a352262aed1d842e5f70a3085cbcf4c56ae851b161137920961c23fcc246598d61d258ccc615c927b2441359eea666a99ce1c3c07dca18fb0e1")]
20
- [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("Microsoft.ML.OnnxRuntime.Tests.Droid, PublicKey=002400000480000094000000060200000024000052534131000400000100010059013e94e4bc70136ca4c35f33acd6b62974536b698f9c7a21cee18d805c7ad860ad9eebfdc47a96ba2f8d03f4cf1c36b9d30787e276c7b9833b5bf2a6eba7e919e6b90083078a352262aed1d842e5f70a3085cbcf4c56ae851b161137920961c23fcc246598d61d258ccc615c927b2441359eea666a99ce1c3c07dca18fb0e1")]
21
- [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("Microsoft.ML.OnnxRuntime.Tests.iOS, PublicKey=002400000480000094000000060200000024000052534131000400000100010059013e94e4bc70136ca4c35f33acd6b62974536b698f9c7a21cee18d805c7ad860ad9eebfdc47a96ba2f8d03f4cf1c36b9d30787e276c7b9833b5bf2a6eba7e919e6b90083078a352262aed1d842e5f70a3085cbcf4c56ae851b161137920961c23fcc246598d61d258ccc615c927b2441359eea666a99ce1c3c07dca18fb0e1")]
22
20
  [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("Microsoft.ML.OnnxRuntime.Tests.NetCoreApp, PublicKey=002400000480000094000000060200000024000052534131000400000100010059013e94e4bc70136ca4c35f33acd6b62974536b698f9c7a21cee18d805c7ad860ad9eebfdc47a96ba2f8d03f4cf1c36b9d30787e276c7b9833b5bf2a6eba7e919e6b90083078a352262aed1d842e5f70a3085cbcf4c56ae851b161137920961c23fcc246598d61d258ccc615c927b2441359eea666a99ce1c3c07dca18fb0e1")]
21
+ [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("Microsoft.ML.OnnxRuntime.Tests.MAUI, PublicKey=002400000480000094000000060200000024000052534131000400000100010059013e94e4bc70136ca4c35f33acd6b62974536b698f9c7a21cee18d805c7ad860ad9eebfdc47a96ba2f8d03f4cf1c36b9d30787e276c7b9833b5bf2a6eba7e919e6b90083078a352262aed1d842e5f70a3085cbcf4c56ae851b161137920961c23fcc246598d61d258ccc615c927b2441359eea666a99ce1c3c07dca18fb0e1")]
@@ -83,7 +83,7 @@ namespace Microsoft.ML.OnnxRuntime
83
83
  /// Ctor
84
84
  /// </summary>
85
85
  /// <param name="name">Name of the output value</param>
86
- /// <param name="value">Managed object created to represent output value, such as DenseTensor<T>
86
+ /// <param name="value">Managed object created to represent output value, such as DenseTensor{T};
87
87
  /// List or Dictionary
88
88
  /// </param>
89
89
  /// <param name="elementType">Tensor element type if value type is a Tensor</param>
@@ -133,7 +133,7 @@ namespace Microsoft.ML.OnnxRuntime
133
133
  public TensorElementType ElementType { get; }
134
134
 
135
135
  /// <summary>
136
- /// Overrides the base class method. With respect to pinnedMemoryHandle, it has no operation
136
+ /// Overrides the base class method. With respect to memoryHolder, it has no operation
137
137
  /// to do, as this class maintains a native buffer via _ortValueHolder and the memory will be
138
138
  /// disposed by it. This is the case when we are dealing with an OrtValue that is backed by native memory
139
139
  /// and not by pinned managed memory.
@@ -142,7 +142,7 @@ namespace Microsoft.ML.OnnxRuntime
142
142
  /// but the interface (derived from NamedOnnxValue) allows it to be passed as output and one of the test
143
143
  /// cases does it. Unless we deprecate and re-do the interface, we must support it.
144
144
  /// </summary>
145
- /// <param name="pinnedMemoryHandle">always set to null</param>
145
+ /// <param name="memoryHolder">always set to null</param>
146
146
  /// <returns>Native OrtValue handle</returns>
147
147
  internal override IntPtr InputToOrtValueHandle(NodeMetadata metadata, out IDisposable memoryHolder)
148
148
  {
@@ -150,7 +150,7 @@ namespace Microsoft.ML.OnnxRuntime
150
150
  {
151
151
  throw new InvalidOperationException("The instance of this class does not own an OrtValue");
152
152
  }
153
- // PinnedMemoryHandle holds the default value as DisposableNamedOnnxValue
153
+ // memoryHolder holds the default value as DisposableNamedOnnxValue
154
154
  // doesn't hold any managed buffer (that needs to be pinned)
155
155
  memoryHolder = null;
156
156
  // Return non-owning instance of OrtValue
@@ -76,9 +76,9 @@ namespace Microsoft.ML.OnnxRuntime
76
76
  ///
77
77
  /// var memInfo = OrtMemoryInfo.DefaultInstance; // CPU
78
78
  ///
79
- /// using(var fixedBufferInput = FixedBufferOnnxvalue.CreateFromMemory<Half>(memInfo,
79
+ /// using(var fixedBufferInput = FixedBufferOnnxvalue.CreateFromMemory{Half}(memInfo,
80
80
  /// input, TensorElementType.Float16, input_shape, input.Length * sizeof(ushort))
81
- /// using(var fixedBufferOutput = FixedBufferOnnxvalue.CreateFromMemory<Half>(memInfo,
81
+ /// using(var fixedBufferOutput = FixedBufferOnnxvalue.CreateFromMemory{Half}(memInfo,
82
82
  /// output, TensorElementType.Float16, output_shape, output.Length * sizeof(ushort))
83
83
  /// {
84
84
  /// FixedBufferOnnxvalue[] inputValues = new FixedBufferOnnxvalue[]{fixedBufferInput};
@@ -908,7 +908,7 @@ namespace Microsoft.ML.OnnxRuntime
908
908
  /// </summary>
909
909
  /// <param name="values">names to convert to zero terminated utf8 and pin</param>
910
910
  /// <param name="nameExtractor">extractor functor that helps extracting names from inputs</param>
911
- /// <param name="metaDict">inputs/outputs metadata</param>
911
+ /// <param name="metaLookup">inputs/outputs metadata</param>
912
912
  /// <returns></returns>
913
913
  private static IntPtr[] LookupUtf8Names<T>(IReadOnlyCollection<T> values, NameExtractor<T> nameExtractor,
914
914
  MetadataLookup metaLookup)
@@ -1222,7 +1222,6 @@ namespace Microsoft.ML.OnnxRuntime
1222
1222
  /// Initializes the session object with a native session handle
1223
1223
  /// </summary>
1224
1224
  /// <param name="session">Value of a native session object</param>
1225
- /// <param name="options">Session options</param>
1226
1225
  private void InitWithSessionHandle(IntPtr session)
1227
1226
  {
1228
1227
  _nativeHandle = session;
@@ -2075,7 +2074,7 @@ namespace Microsoft.ML.OnnxRuntime
2075
2074
  /// <summary>
2076
2075
  /// Custom metadata key/value pairs
2077
2076
  /// </summary>
2078
- /// <value>An instance of a Dictionary<string,string></value>
2077
+ /// <value>An instance of a Dictionary{string,string}</value>
2079
2078
  public Dictionary<string, string> CustomMetadataMap
2080
2079
  {
2081
2080
  get
@@ -65,7 +65,7 @@ namespace Microsoft.ML.OnnxRuntime
65
65
  /// The function creates OrtValue objects for each element of the sequence
66
66
  /// and then creates an OrtValue for the whole sequence.
67
67
  /// </summary>
68
- /// <param name="namedOnnxValue">NamedOnnxValue containing a IEnumerable<NameOnnValue></param>
68
+ /// <param name="namedOnnxValue">NamedOnnxValue containing a IEnumerable{NamedOnnxValue}</param>
69
69
  /// <param name="metadata">sequence metadata</param>
70
70
  /// <returns>OrtValue that represents a sequence</returns>
71
71
  /// <exception cref="OnnxRuntimeException"></exception>
@@ -53,13 +53,13 @@ namespace Microsoft.ML.OnnxRuntime
53
53
  /// Other sequences and maps. Although the OnnxValueType is exposed,
54
54
  /// the caller is supposed to know the actual data type contained.
55
55
  ///
56
- /// The convention is that for tensors, it would contain a DenseTensor<T> instance or
57
- /// anything derived from Tensor<T>.
56
+ /// The convention is that for tensors, it would contain a DenseTensor{T} instance or
57
+ /// anything derived from Tensor{T}.
58
58
  ///
59
- /// For sequences, it would contain a IList<T> where T is an instance of NamedOnnxValue that
59
+ /// For sequences, it would contain a IList{T} where T is an instance of NamedOnnxValue that
60
60
  /// would contain a tensor or another type.
61
61
  ///
62
- /// For Maps, it would contain a IDictionary<K, V> where K,V are primitive types or strings.
62
+ /// For Maps, it would contain a IDictionary{K, V} where K,V are primitive types or strings.
63
63
  ///
64
64
  /// </summary>
65
65
  public class NamedOnnxValue
@@ -153,7 +153,7 @@ namespace Microsoft.ML.OnnxRuntime
153
153
  }
154
154
 
155
155
  /// <summary>
156
- /// Instantiates NamedOnnxValue that contains IDictionary<K, V>
156
+ /// Instantiates NamedOnnxValue that contains IDictionary{K, V}
157
157
  /// </summary>
158
158
  /// <typeparam name="K">Keys type</typeparam>
159
159
  /// <typeparam name="V">Values type</typeparam>
@@ -225,7 +225,7 @@ namespace Microsoft.ML.OnnxRuntime
225
225
  /// based on the pinned managed memory. The caller is responsible for Disposing
226
226
  /// both OrtValue and pinnedMemoryHandle
227
227
  /// </summary>
228
- /// <param name="pinnedMemoryHandle">dispose after returned OrtValus is disposed</param>
228
+ /// <param name="memoryOwner">dispose after returned OrtValue is disposed</param>
229
229
  /// <returns>The native OrtValue handle</returns>
230
230
  internal virtual IntPtr InputToOrtValueHandle(NodeMetadata metadata, out IDisposable memoryOwner)
231
231
  {
@@ -272,12 +272,6 @@ namespace Microsoft.ML.OnnxRuntime
272
272
  $" Use Run() overloads that return DisposableNamedOnnxValue to get access to all Onnx value types that may be returned as output.");
273
273
  }
274
274
 
275
- /// <summary>
276
- /// This method is used internally to feed dictionary keys
277
- /// to create an OrtValue for map keys
278
- /// </summary>
279
- /// <typeparam name="K"></typeparam>
280
- /// <returns>DenseTensor<K>"</returns>
281
275
  internal TensorBase GetDictionaryKeys()
282
276
  {
283
277
  if (ValueType != OnnxValueType.ONNX_TYPE_MAP)
@@ -289,11 +283,6 @@ namespace Microsoft.ML.OnnxRuntime
289
283
  return _mapHelper.Keys;
290
284
  }
291
285
 
292
- /// <summary>
293
- ///
294
- /// </summary>
295
- /// <typeparam name="V"></typeparam>
296
- /// <returns>DenseTensor<V>"</returns>
297
286
  internal TensorBase GetDictionaryValues()
298
287
  {
299
288
  if (ValueType != OnnxValueType.ONNX_TYPE_MAP)
@@ -314,6 +314,29 @@ namespace Microsoft.ML.OnnxRuntime
314
314
  public IntPtr ReleaseROCMProviderOptions;
315
315
  public IntPtr CreateAndRegisterAllocatorV2;
316
316
  public IntPtr RunAsync;
317
+ public IntPtr UpdateTensorRTProviderOptionsWithValue;
318
+ public IntPtr GetTensorRTProviderOptionsByName;
319
+ public IntPtr UpdateCUDAProviderOptionsWithValue;
320
+ public IntPtr GetCUDAProviderOptionsByName;
321
+ public IntPtr KernelContext_GetResource;
322
+ public IntPtr SetUserLoggingFunction;
323
+ public IntPtr ShapeInferContext_GetInputCount;
324
+ public IntPtr ShapeInferContext_GetInputTypeShape;
325
+ public IntPtr ShapeInferContext_GetAttribute;
326
+ public IntPtr ShapeInferContext_SetOutputTypeShape;
327
+ public IntPtr SetSymbolicDimensions;
328
+ public IntPtr ReadOpAttr;
329
+ public IntPtr SetDeterministicCompute;
330
+ public IntPtr KernelContext_ParallelFor;
331
+ public IntPtr SessionOptionsAppendExecutionProvider_OpenVINO_V2;
332
+ public IntPtr SessionOptionsAppendExecutionProvider_VitisAI;
333
+ public IntPtr KernelContext_GetScratchBuffer;
334
+ public IntPtr KernelInfoGetAllocator;
335
+ public IntPtr AddExternalInitializersFromFilesInMemory;
336
+ public IntPtr CreateLoraAdapter;
337
+ public IntPtr CreateLoraAdapterFromArray;
338
+ public IntPtr ReleaseLoraAdapter;
339
+ public IntPtr RunOptionsAddActiveLoraAdapter;
317
340
  }
318
341
 
319
342
  internal static class NativeMethods
@@ -552,6 +575,13 @@ namespace Microsoft.ML.OnnxRuntime
552
575
  OrtReleaseROCMProviderOptions = (DOrtReleaseROCMProviderOptions)Marshal.GetDelegateForFunctionPointer(api_.ReleaseROCMProviderOptions, typeof(DOrtReleaseROCMProviderOptions));
553
576
  OrtCreateAndRegisterAllocatorV2 = (DCreateAndRegisterAllocatorV2)Marshal.GetDelegateForFunctionPointer(api_.CreateAndRegisterAllocatorV2, typeof(DCreateAndRegisterAllocatorV2));
554
577
  OrtRunAsync = (DOrtRunAsync)Marshal.GetDelegateForFunctionPointer(api_.RunAsync, typeof(DOrtRunAsync));
578
+ CreateLoraAdapter = (DCreateLoraAdapter)Marshal.GetDelegateForFunctionPointer(api_.CreateLoraAdapter,
579
+ typeof(DCreateLoraAdapter));
580
+ CreateLoraAdapterFromArray = (DCreateLoraAdapterFromArray)Marshal.GetDelegateForFunctionPointer (api_.CreateLoraAdapterFromArray, typeof(DCreateLoraAdapterFromArray));
581
+ ReleaseLoraAdapter = (DReleaseLoraAdapter)Marshal.GetDelegateForFunctionPointer(api_.ReleaseLoraAdapter,
582
+ typeof(DReleaseLoraAdapter));
583
+ OrtRunOptionsAddActiveLoraAdapter = (DOrtRunOptionsAddActiveLoraAdapter)Marshal.GetDelegateForFunctionPointer(
584
+ api_.RunOptionsAddActiveLoraAdapter, typeof(DOrtRunOptionsAddActiveLoraAdapter));
555
585
  }
556
586
 
557
587
  internal class NativeLib
@@ -1275,7 +1305,49 @@ namespace Microsoft.ML.OnnxRuntime
1275
1305
 
1276
1306
  #endregion
1277
1307
 
1278
- #region RunOptions API
1308
+ #region LoraAdapter API
1309
+ /// <summary>
1310
+ /// Memory maps the adapter file, wraps it into the adapter object
1311
+ /// and returns it.
1312
+ /// </summary>
1313
+ /// <param name="adapter_path">absolute path to the adapter file</param>
1314
+ /// <param name="allocator">optional device allocator or null</param>
1315
+ /// <param name="lora_adapter">New LoraAdapter object</param>
1316
+ /// <returns></returns>
1317
+ [UnmanagedFunctionPointer(CallingConvention.Winapi)]
1318
+ public delegate IntPtr /*(OrtStatus*)*/ DCreateLoraAdapter(
1319
+ byte[] adapter_path, // This takes const ORTCHAR_T* use GetPlatformSerializedString
1320
+ IntPtr /* OrtAllocator */ allocator, // optional
1321
+ out IntPtr lora_adapter
1322
+ );
1323
+ public static DCreateLoraAdapter CreateLoraAdapter;
1324
+
1325
+ /// <summary>
1326
+ /// Creates LoraAdapter instance from a byte array that must
1327
+ /// represents a valid LoraAdapter formst.
1328
+ /// </summary>
1329
+ /// <param name="bytes">bytes</param>
1330
+ /// <param name="size">size in bytes</param>
1331
+ /// <param name="allocator">optional device allocator</param>
1332
+ /// <param name="lora_adapter">resuling LoraAdapter instance</param>
1333
+ /// <returns></returns>
1334
+ [UnmanagedFunctionPointer(CallingConvention.Winapi)]
1335
+ public delegate IntPtr /*(OrtStatus*)*/ DCreateLoraAdapterFromArray(
1336
+ byte[] bytes,
1337
+ UIntPtr size,
1338
+ IntPtr /* OrtAllocator */ allocator, // optional
1339
+ out IntPtr lora_adapter
1340
+ );
1341
+ public static DCreateLoraAdapterFromArray CreateLoraAdapterFromArray;
1342
+
1343
+
1344
+ [UnmanagedFunctionPointer(CallingConvention.Winapi)]
1345
+ public delegate void DReleaseLoraAdapter(IntPtr /* OrtLoraAdapter* */ lora_adapter);
1346
+ public static DReleaseLoraAdapter ReleaseLoraAdapter;
1347
+
1348
+ #endregion
1349
+
1350
+ #region RunOptions API
1279
1351
 
1280
1352
  [UnmanagedFunctionPointer(CallingConvention.Winapi)]
1281
1353
  public delegate IntPtr /*(OrtStatus*)*/ DOrtCreateRunOptions(out IntPtr /* OrtRunOptions** */ runOptions);
@@ -1320,6 +1392,12 @@ namespace Microsoft.ML.OnnxRuntime
1320
1392
  public delegate IntPtr /*(OrtStatus*)*/ DOrtRunOptionsUnsetTerminate(IntPtr /* OrtRunOptions* */ options);
1321
1393
  public static DOrtRunOptionsUnsetTerminate OrtRunOptionsUnsetTerminate;
1322
1394
 
1395
+ [UnmanagedFunctionPointer(CallingConvention.Winapi)]
1396
+ public delegate IntPtr /*(OrtStatus*)*/ DOrtRunOptionsAddActiveLoraAdapter(
1397
+ IntPtr /* OrtRunOptions* */ options,
1398
+ IntPtr /* OrtLoraAdapter* */ lora_adapter);
1399
+ public static DOrtRunOptionsAddActiveLoraAdapter OrtRunOptionsAddActiveLoraAdapter;
1400
+
1323
1401
  /// <summary>
1324
1402
  /// Add run config entry
1325
1403
  /// </summary>
@@ -1518,7 +1596,7 @@ namespace Microsoft.ML.OnnxRuntime
1518
1596
  /// <summary>
1519
1597
  /// Destroy OrtIoBinding instance created by OrtCreateIoBinding
1520
1598
  /// </summary>
1521
- /// <param name="io_bidning">instance of OrtIoBinding</param>
1599
+ /// <param name="io_binding">instance of OrtIoBinding</param>
1522
1600
  [UnmanagedFunctionPointer(CallingConvention.Winapi)]
1523
1601
  public delegate void DOrtReleaseIoBinding(IntPtr /*(OrtIoBinding)*/ io_binding);
1524
1602
 
@@ -1528,7 +1606,7 @@ namespace Microsoft.ML.OnnxRuntime
1528
1606
  /// Bind OrtValue to the model input with the specified name
1529
1607
  /// If binding with the specified name already exists, it will be replaced
1530
1608
  /// </summary>
1531
- /// <param name="io_bidning">instance of OrtIoBinding</param>
1609
+ /// <param name="io_binding">instance of OrtIoBinding</param>
1532
1610
  /// <param name="name">model input name (utf-8)</param>
1533
1611
  /// <param name="ort_value">OrtValue that is used for input (may wrap arbitrary memory).
1534
1612
  /// The param instance is copied internally so this argument may be released.
@@ -1556,7 +1634,7 @@ namespace Microsoft.ML.OnnxRuntime
1556
1634
  /// Bind OrtValue to the model output with the specified name
1557
1635
  /// If binding with the specified name already exists, it will be replaced
1558
1636
  /// </summary>
1559
- /// <param name="io_bidning">instance of OrtIoBinding</param>
1637
+ /// <param name="io_binding">instance of OrtIoBinding</param>
1560
1638
  /// <param name="name">model output name (utf-8)</param>
1561
1639
  /// <param name="ort_value">OrtValue that is used for output (may wrap arbitrary memory).
1562
1640
  /// The param instance is copied internally so this argument may be released.
@@ -1617,7 +1695,7 @@ namespace Microsoft.ML.OnnxRuntime
1617
1695
  /// The function returns output values after the model has been run with RunWithBinding()
1618
1696
  /// It returns a natively allocated buffer of OrtValue pointers. All of the OrtValues must be individually
1619
1697
  /// released after no longer needed. You may use OrtValue disposable class to wrap the native handle and properly dispose it
1620
- /// in connection with DisposableList<T>. All values are returned in the same order as they were bound.
1698
+ /// in connection with DisposableList{T}. All values are returned in the same order as they were bound.
1621
1699
  /// The buffer that contains OrtValues must deallocated using the same allocator that was specified as an argument.
1622
1700
  /// You may use an instance OrtMemoryAllocation to properly dispose of the native memory.
1623
1701
  /// </summary>
@@ -1655,9 +1733,7 @@ namespace Microsoft.ML.OnnxRuntime
1655
1733
  /// <summary>
1656
1734
  /// Provides element-level access into a tensor.
1657
1735
  /// </summary>
1658
- /// <param name="location_values">a pointer to an array of index values that specify an element's location in the tensor data blob</param>
1659
- /// <param name="location_values_count">length of location_values</param>
1660
- /// <param name="out">a pointer to the element specified by location_values</param>
1736
+ /// <param name="io_binding">instance of OrtIoBinding</param>
1661
1737
  [UnmanagedFunctionPointer(CallingConvention.Winapi)]
1662
1738
  public delegate void DOrtTensorAt(IntPtr /*(OrtIoBinding)*/ io_binding);
1663
1739
 
@@ -1668,10 +1744,11 @@ namespace Microsoft.ML.OnnxRuntime
1668
1744
  /// sharing between multiple sessions that use the same env instance.
1669
1745
  /// Lifetime of the created allocator will be valid for the duration of the environment.
1670
1746
  /// Returns an error if an allocator with the same OrtMemoryInfo is already registered.
1747
+ /// </summary>
1671
1748
  /// <param name="env">Native OrtEnv instance</param>
1672
1749
  /// <param name="memInfo">Native OrtMemoryInfo instance</param>
1673
1750
  /// <param name="arenaCfg">Native OrtArenaCfg instance</param>
1674
- /// <retruns>A pointer to native ortStatus indicating success/failure</retruns>
1751
+ /// <returns>A pointer to native ortStatus indicating success/failure</returns>
1675
1752
  [UnmanagedFunctionPointer(CallingConvention.Winapi)]
1676
1753
  public delegate IntPtr /*(OrtStatus*)*/ DOrtCreateAndRegisterAllocator(IntPtr /*(OrtEnv*)*/ env,
1677
1754
  IntPtr /*(const OrtMemoryInfo*)*/ memInfo,
@@ -1902,7 +1979,7 @@ namespace Microsoft.ML.OnnxRuntime
1902
1979
  public static DOrtFillStringTensor OrtFillStringTensor;
1903
1980
 
1904
1981
  /// \param value A tensor created from OrtCreateTensor... function.
1905
- /// \param index The index of the entry in the tensor to resize. <summary>
1982
+ /// \param index The index of the entry in the tensor to resize.
1906
1983
  /// \param length_in_bytes Length to resize the string to.
1907
1984
  /// \param buffer The resized buffer.
1908
1985
  [UnmanagedFunctionPointer(CallingConvention.Winapi)]
@@ -226,7 +226,7 @@ namespace Microsoft.ML.OnnxRuntime
226
226
  }
227
227
 
228
228
  /// <summary>
229
- // Native allocation (UTF8-8 string length with terminating zero)
229
+ /// Native allocation (UTF8-8 string length with terminating zero)
230
230
  /// </summary>
231
231
  internal int Length { get; private set; }
232
232
 
@@ -126,7 +126,7 @@ namespace Microsoft.ML.OnnxRuntime
126
126
  /// <param name="severity"></param>
127
127
  /// <param name="category"></param>
128
128
  /// <param name="logid"></param>
129
- /// <param name="code_location"></param>
129
+ /// <param name="codeLocation"></param>
130
130
  /// <param name="message"></param>
131
131
  private static void LoggingFunctionThunk(IntPtr param,
132
132
  IntPtr severity,