onnxruntime 0.9.4-aarch64-linux → 0.10.0-aarch64-linux

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9544eb4f8df1fd611ba42ce3b3687af10d226434202e42caac7e03dd3926162d
4
- data.tar.gz: 9176e3659227243408ed5f5eab6508b719ccfbdddb37a2d173f6ebcb26ce490d
3
+ metadata.gz: 63c3880cb27601251c1e5f4ba8da03ba2a81aa3b7336205c0d1bfe85ecce3b54
4
+ data.tar.gz: '086e5ab987918620bfc17e5be5c65136a11ad0a46b2602c8266448ba4149701e'
5
5
  SHA512:
6
- metadata.gz: 255f60ce409099e1ef8b4bbf820360903785b0690c26fd540511c839185ba8abfde9eee1a67ffb3ff1c38d1a36c1910b9b05626da98eb1b6119eddc1b18036ee
7
- data.tar.gz: 177f73d9d97856c34c9f5dccb19a9428776421a54edf2b65349411eae556783ce24d5375f06b1a6ff12449c5c894ce12f0ffd566880e0263ae9ea67aa474ac3b
6
+ metadata.gz: 37f07766244ec17bb4cd0ff8bc2711118fb1b4eae08f933b7428a923df02128504d5639306a1e6b5a425e77e824f8e2c4a8aca9544086f2aab0b0f2e795e225c
7
+ data.tar.gz: d46924ba93cae57f6f0f3bda864dad8f59cd9d1d119f669d8e40afe038c43201f3712a33bb8b903e537091b99b5e241f35d0d831a69dec323bee4262e6203da4
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 0.10.0 (2025-05-11)
2
+
3
+ - Updated ONNX Runtime to 1.22.0
4
+ - Dropped support for Ruby < 3.2
5
+
1
6
  ## 0.9.4 (2025-03-08)
2
7
 
3
8
  - Updated ONNX Runtime to 1.21.0
data/LICENSE.txt CHANGED
@@ -1,7 +1,7 @@
1
1
  MIT License
2
2
 
3
3
  Copyright (c) Microsoft Corporation
4
- Copyright (c) 2019-2024 Andrew Kane
4
+ Copyright (c) 2019-2025 Andrew Kane
5
5
 
6
6
  Permission is hereby granted, free of charge, to any person obtaining a copy
7
7
  of this software and associated documentation files (the "Software"), to deal
@@ -147,7 +147,7 @@ module OnnxRuntime
147
147
  :FillStringTensorElement, callback(%i[pointer string size_t], :pointer),
148
148
  :AddSessionConfigEntry, callback(%i[pointer string string], :pointer),
149
149
  :CreateAllocator, callback(%i[], :pointer),
150
- :ReleaseAllocator, callback(%i[], :pointer),
150
+ :ReleaseAllocator, callback(%i[pointer], :pointer),
151
151
  :RunWithBinding, callback(%i[], :pointer),
152
152
  :CreateIoBinding, callback(%i[], :pointer),
153
153
  :ReleaseIoBinding, callback(%i[], :pointer),
@@ -249,7 +249,7 @@ module OnnxRuntime
249
249
  def self.api
250
250
  @api ||= begin
251
251
  api = self.OrtGetApiBase[:GetApi].call(ORT_API_VERSION)
252
- api = Api.by_ref.from_native(api, nil) if RUBY_PLATFORM == "java"
252
+ api = Api.by_ref.from_native(api, nil) if RUBY_ENGINE == "jruby"
253
253
  api
254
254
  end
255
255
  end
@@ -6,52 +6,54 @@ module OnnxRuntime
6
6
  # session options
7
7
  session_options = ::FFI::MemoryPointer.new(:pointer)
8
8
  check_status api[:CreateSessionOptions].call(session_options)
9
+ session_options = ::FFI::AutoPointer.new(session_options.read_pointer, api[:ReleaseSessionOptions])
10
+
9
11
  if enable_cpu_mem_arena
10
- check_status api[:EnableCpuMemArena].call(session_options.read_pointer)
12
+ check_status api[:EnableCpuMemArena].call(session_options)
11
13
  else
12
- check_status api[:DisableCpuMemArena].call(session_options.read_pointer)
14
+ check_status api[:DisableCpuMemArena].call(session_options)
13
15
  end
14
16
  if enable_mem_pattern
15
- check_status api[:EnableMemPattern].call(session_options.read_pointer)
17
+ check_status api[:EnableMemPattern].call(session_options)
16
18
  else
17
- check_status api[:DisableMemPattern].call(session_options.read_pointer)
19
+ check_status api[:DisableMemPattern].call(session_options)
18
20
  end
19
21
  if enable_profiling
20
- check_status api[:EnableProfiling].call(session_options.read_pointer, ort_string(profile_file_prefix || "onnxruntime_profile_"))
22
+ check_status api[:EnableProfiling].call(session_options, ort_string(profile_file_prefix || "onnxruntime_profile_"))
21
23
  else
22
- check_status api[:DisableProfiling].call(session_options.read_pointer)
24
+ check_status api[:DisableProfiling].call(session_options)
23
25
  end
24
26
  if execution_mode
25
27
  execution_modes = {sequential: 0, parallel: 1}
26
28
  mode = execution_modes[execution_mode]
27
29
  raise ArgumentError, "Invalid execution mode" unless mode
28
- check_status api[:SetSessionExecutionMode].call(session_options.read_pointer, mode)
30
+ check_status api[:SetSessionExecutionMode].call(session_options, mode)
29
31
  end
30
32
  if free_dimension_overrides_by_denotation
31
33
  free_dimension_overrides_by_denotation.each do |k, v|
32
- check_status api[:AddFreeDimensionOverride].call(session_options.read_pointer, k.to_s, v)
34
+ check_status api[:AddFreeDimensionOverride].call(session_options, k.to_s, v)
33
35
  end
34
36
  end
35
37
  if free_dimension_overrides_by_name
36
38
  free_dimension_overrides_by_name.each do |k, v|
37
- check_status api[:AddFreeDimensionOverrideByName].call(session_options.read_pointer, k.to_s, v)
39
+ check_status api[:AddFreeDimensionOverrideByName].call(session_options, k.to_s, v)
38
40
  end
39
41
  end
40
42
  if graph_optimization_level
41
43
  optimization_levels = {none: 0, basic: 1, extended: 2, all: 99}
42
44
  level = optimization_levels[graph_optimization_level]
43
45
  raise ArgumentError, "Invalid graph optimization level" unless level
44
- check_status api[:SetSessionGraphOptimizationLevel].call(session_options.read_pointer, level)
46
+ check_status api[:SetSessionGraphOptimizationLevel].call(session_options, level)
45
47
  end
46
- check_status api[:SetInterOpNumThreads].call(session_options.read_pointer, inter_op_num_threads) if inter_op_num_threads
47
- check_status api[:SetIntraOpNumThreads].call(session_options.read_pointer, intra_op_num_threads) if intra_op_num_threads
48
- check_status api[:SetSessionLogSeverityLevel].call(session_options.read_pointer, log_severity_level) if log_severity_level
49
- check_status api[:SetSessionLogVerbosityLevel].call(session_options.read_pointer, log_verbosity_level) if log_verbosity_level
50
- check_status api[:SetSessionLogId].call(session_options.read_pointer, logid) if logid
51
- check_status api[:SetOptimizedModelFilePath].call(session_options.read_pointer, ort_string(optimized_model_filepath)) if optimized_model_filepath
48
+ check_status api[:SetInterOpNumThreads].call(session_options, inter_op_num_threads) if inter_op_num_threads
49
+ check_status api[:SetIntraOpNumThreads].call(session_options, intra_op_num_threads) if intra_op_num_threads
50
+ check_status api[:SetSessionLogSeverityLevel].call(session_options, log_severity_level) if log_severity_level
51
+ check_status api[:SetSessionLogVerbosityLevel].call(session_options, log_verbosity_level) if log_verbosity_level
52
+ check_status api[:SetSessionLogId].call(session_options, logid) if logid
53
+ check_status api[:SetOptimizedModelFilePath].call(session_options, ort_string(optimized_model_filepath)) if optimized_model_filepath
52
54
  if session_config_entries
53
55
  session_config_entries.each do |k, v|
54
- check_status api[:AddSessionConfigEntry].call(session_options.read_pointer, k.to_s, v.to_s)
56
+ check_status api[:AddSessionConfigEntry].call(session_options, k.to_s, v.to_s)
55
57
  end
56
58
  end
57
59
  providers.each do |provider|
@@ -64,15 +66,15 @@ module OnnxRuntime
64
66
  when "CUDAExecutionProvider"
65
67
  cuda_options = ::FFI::MemoryPointer.new(:pointer)
66
68
  check_status api[:CreateCUDAProviderOptions].call(cuda_options)
67
- check_status api[:SessionOptionsAppendExecutionProvider_CUDA_V2].call(session_options.read_pointer, cuda_options.read_pointer)
68
- release :CUDAProviderOptions, cuda_options
69
+ cuda_options = ::FFI::AutoPointer.new(cuda_options.read_pointer, api[:ReleaseCUDAProviderOptions])
70
+ check_status api[:SessionOptionsAppendExecutionProvider_CUDA_V2].call(session_options, cuda_options)
69
71
  when "CoreMLExecutionProvider"
70
72
  unless FFI.respond_to?(:OrtSessionOptionsAppendExecutionProvider_CoreML)
71
73
  raise ArgumentError, "Provider not available: #{provider}"
72
74
  end
73
75
 
74
76
  coreml_flags = 0
75
- check_status FFI.OrtSessionOptionsAppendExecutionProvider_CoreML(session_options.read_pointer, coreml_flags)
77
+ check_status FFI.OrtSessionOptionsAppendExecutionProvider_CoreML(session_options, coreml_flags)
76
78
  when "CPUExecutionProvider"
77
79
  break
78
80
  else
@@ -81,13 +83,9 @@ module OnnxRuntime
81
83
  end
82
84
 
83
85
  @session = load_session(path_or_bytes, session_options)
84
- ObjectSpace.define_finalizer(@session, self.class.finalize(read_pointer.to_i))
85
-
86
86
  @allocator = Utils.allocator
87
87
  @inputs = load_inputs
88
88
  @outputs = load_outputs
89
- ensure
90
- release :SessionOptions, session_options
91
89
  end
92
90
 
93
91
  def run(output_names, input_feed, log_severity_level: nil, log_verbosity_level: nil, logid: nil, terminate: nil, output_type: :ruby)
@@ -119,51 +117,57 @@ module OnnxRuntime
119
117
  # run options
120
118
  run_options = ::FFI::MemoryPointer.new(:pointer)
121
119
  check_status api[:CreateRunOptions].call(run_options)
122
- check_status api[:RunOptionsSetRunLogSeverityLevel].call(run_options.read_pointer, log_severity_level) if log_severity_level
123
- check_status api[:RunOptionsSetRunLogVerbosityLevel].call(run_options.read_pointer, log_verbosity_level) if log_verbosity_level
124
- check_status api[:RunOptionsSetRunTag].call(run_options.read_pointer, logid) if logid
125
- check_status api[:RunOptionsSetTerminate].call(run_options.read_pointer) if terminate
120
+ run_options = ::FFI::AutoPointer.new(run_options.read_pointer, api[:ReleaseRunOptions])
126
121
 
127
- check_status api[:Run].call(read_pointer, run_options.read_pointer, input_node_names, input_tensor, input_feed.size, output_node_names, output_names.size, output_tensor)
122
+ check_status api[:RunOptionsSetRunLogSeverityLevel].call(run_options, log_severity_level) if log_severity_level
123
+ check_status api[:RunOptionsSetRunLogVerbosityLevel].call(run_options, log_verbosity_level) if log_verbosity_level
124
+ check_status api[:RunOptionsSetRunTag].call(run_options, logid) if logid
125
+ check_status api[:RunOptionsSetTerminate].call(run_options) if terminate
128
126
 
129
- output_names.size.times.map { |i| OrtValue.new(output_tensor[i]) }
130
- ensure
131
- release :RunOptions, run_options
127
+ check_status api[:Run].call(@session, run_options, input_node_names, input_tensor, input_feed.size, output_node_names, output_names.size, output_tensor)
128
+
129
+ output_names.size.times.map { |i| OrtValue.new(output_tensor[i].read_pointer) }
132
130
  end
133
131
 
134
132
  def modelmeta
133
+ metadata = ::FFI::MemoryPointer.new(:pointer)
134
+ check_status api[:SessionGetModelMetadata].call(@session, metadata)
135
+ metadata = ::FFI::AutoPointer.new(metadata.read_pointer, api[:ReleaseModelMetadata])
136
+
135
137
  keys = ::FFI::MemoryPointer.new(:pointer)
136
138
  num_keys = ::FFI::MemoryPointer.new(:int64_t)
137
- description = ::FFI::MemoryPointer.new(:string)
138
- domain = ::FFI::MemoryPointer.new(:string)
139
- graph_name = ::FFI::MemoryPointer.new(:string)
140
- graph_description = ::FFI::MemoryPointer.new(:string)
141
- producer_name = ::FFI::MemoryPointer.new(:string)
142
- version = ::FFI::MemoryPointer.new(:int64_t)
143
-
144
- metadata = ::FFI::MemoryPointer.new(:pointer)
145
- check_status api[:SessionGetModelMetadata].call(read_pointer, metadata)
139
+ check_status api[:ModelMetadataGetCustomMetadataMapKeys].call(metadata, @allocator, keys, num_keys)
140
+ keys = keys.read_pointer
146
141
 
147
142
  custom_metadata_map = {}
148
- check_status api[:ModelMetadataGetCustomMetadataMapKeys].call(metadata.read_pointer, @allocator.read_pointer, keys, num_keys)
149
143
  num_keys.read(:int64_t).times do |i|
150
- key_ptr = keys.read_pointer[i * ::FFI::Pointer.size]
151
- key = key_ptr.read_pointer.read_string
152
- value = ::FFI::MemoryPointer.new(:string)
153
- check_status api[:ModelMetadataLookupCustomMetadataMap].call(metadata.read_pointer, @allocator.read_pointer, key, value)
144
+ key_ptr = keys.get_pointer(i * ::FFI::Pointer.size)
145
+ key = key_ptr.read_string
146
+ value = ::FFI::MemoryPointer.new(:pointer)
147
+ check_status api[:ModelMetadataLookupCustomMetadataMap].call(metadata, @allocator, key, value)
154
148
  custom_metadata_map[key] = value.read_pointer.read_string
155
149
 
156
150
  allocator_free key_ptr
157
- allocator_free value
151
+ allocator_free value.read_pointer
158
152
  end
159
- allocator_free keys
160
153
 
161
- check_status api[:ModelMetadataGetDescription].call(metadata.read_pointer, @allocator.read_pointer, description)
162
- check_status api[:ModelMetadataGetDomain].call(metadata.read_pointer, @allocator.read_pointer, domain)
163
- check_status api[:ModelMetadataGetGraphName].call(metadata.read_pointer, @allocator.read_pointer, graph_name)
164
- check_status api[:ModelMetadataGetGraphDescription].call(metadata.read_pointer, @allocator.read_pointer, graph_description)
165
- check_status api[:ModelMetadataGetProducerName].call(metadata.read_pointer, @allocator.read_pointer, producer_name)
166
- check_status api[:ModelMetadataGetVersion].call(metadata.read_pointer, version)
154
+ description = ::FFI::MemoryPointer.new(:pointer)
155
+ check_status api[:ModelMetadataGetDescription].call(metadata, @allocator, description)
156
+
157
+ domain = ::FFI::MemoryPointer.new(:pointer)
158
+ check_status api[:ModelMetadataGetDomain].call(metadata, @allocator, domain)
159
+
160
+ graph_name = ::FFI::MemoryPointer.new(:pointer)
161
+ check_status api[:ModelMetadataGetGraphName].call(metadata, @allocator, graph_name)
162
+
163
+ graph_description = ::FFI::MemoryPointer.new(:pointer)
164
+ check_status api[:ModelMetadataGetGraphDescription].call(metadata, @allocator, graph_description)
165
+
166
+ producer_name = ::FFI::MemoryPointer.new(:pointer)
167
+ check_status api[:ModelMetadataGetProducerName].call(metadata, @allocator, producer_name)
168
+
169
+ version = ::FFI::MemoryPointer.new(:int64_t)
170
+ check_status api[:ModelMetadataGetVersion].call(metadata, version)
167
171
 
168
172
  {
169
173
  custom_metadata_map: custom_metadata_map,
@@ -175,19 +179,23 @@ module OnnxRuntime
175
179
  version: version.read(:int64_t)
176
180
  }
177
181
  ensure
178
- release :ModelMetadata, metadata
179
- allocator_free description
180
- allocator_free domain
181
- allocator_free graph_name
182
- allocator_free graph_description
183
- allocator_free producer_name
182
+ allocator_free keys
183
+ allocator_free description.read_pointer
184
+ allocator_free domain.read_pointer
185
+ allocator_free graph_name.read_pointer
186
+ allocator_free graph_description.read_pointer
187
+ allocator_free producer_name.read_pointer
184
188
  end
185
189
 
186
190
  # return value has double underscore like Python
187
191
  def end_profiling
188
- out = ::FFI::MemoryPointer.new(:string)
189
- check_status api[:SessionEndProfiling].call(read_pointer, @allocator.read_pointer, out)
190
- out.read_pointer.read_string
192
+ out = ::FFI::MemoryPointer.new(:pointer)
193
+ check_status api[:SessionEndProfiling].call(@session, @allocator, out)
194
+ begin
195
+ out.read_pointer.read_string
196
+ ensure
197
+ allocator_free out.read_pointer
198
+ end
191
199
  end
192
200
 
193
201
  # no way to set providers with C API yet
@@ -197,10 +205,7 @@ module OnnxRuntime
197
205
  length_ptr = ::FFI::MemoryPointer.new(:int)
198
206
  check_status api[:GetAvailableProviders].call(out_ptr, length_ptr)
199
207
  length = length_ptr.read_int
200
- providers = []
201
- length.times do |i|
202
- providers << out_ptr.read_pointer[i * ::FFI::Pointer.size].read_pointer.read_string
203
- end
208
+ providers = out_ptr.read_pointer.read_array_of_pointer(length).map(&:read_string)
204
209
  api[:ReleaseAvailableProviders].call(out_ptr.read_pointer, length)
205
210
  providers
206
211
  end
@@ -208,7 +213,6 @@ module OnnxRuntime
208
213
  private
209
214
 
210
215
  def load_session(path_or_bytes, session_options)
211
- session = ::FFI::MemoryPointer.new(:pointer)
212
216
  from_memory =
213
217
  if path_or_bytes.respond_to?(:read)
214
218
  path_or_bytes = path_or_bytes.read
@@ -218,44 +222,49 @@ module OnnxRuntime
218
222
  false
219
223
  end
220
224
 
225
+ session = ::FFI::MemoryPointer.new(:pointer)
221
226
  if from_memory
222
- check_status api[:CreateSessionFromArray].call(env.read_pointer, path_or_bytes, path_or_bytes.bytesize, session_options.read_pointer, session)
227
+ check_status api[:CreateSessionFromArray].call(env, path_or_bytes, path_or_bytes.bytesize, session_options, session)
223
228
  else
224
- check_status api[:CreateSession].call(env.read_pointer, ort_string(path_or_bytes), session_options.read_pointer, session)
229
+ check_status api[:CreateSession].call(env, ort_string(path_or_bytes), session_options, session)
225
230
  end
226
- session
231
+ ::FFI::AutoPointer.new(session.read_pointer, api[:ReleaseSession])
227
232
  end
228
233
 
229
234
  def load_inputs
230
- inputs = []
231
235
  num_input_nodes = ::FFI::MemoryPointer.new(:size_t)
232
- check_status api[:SessionGetInputCount].call(read_pointer, num_input_nodes)
233
- num_input_nodes.read(:size_t).times do |i|
234
- name_ptr = ::FFI::MemoryPointer.new(:string)
235
- check_status api[:SessionGetInputName].call(read_pointer, i, @allocator.read_pointer, name_ptr)
236
- # freed in node_info
236
+ check_status api[:SessionGetInputCount].call(@session, num_input_nodes)
237
+
238
+ num_input_nodes.read(:size_t).times.map do |i|
239
+ name_ptr = ::FFI::MemoryPointer.new(:pointer)
240
+ check_status api[:SessionGetInputName].call(@session, i, @allocator, name_ptr)
241
+ name_str = name_ptr.read_pointer.read_string
242
+ allocator_free name_ptr.read_pointer
243
+
237
244
  typeinfo = ::FFI::MemoryPointer.new(:pointer)
238
- check_status api[:SessionGetInputTypeInfo].call(read_pointer, i, typeinfo)
239
- inputs << {name: name_ptr.read_pointer.read_string}.merge(Utils.node_info(typeinfo))
240
- allocator_free name_ptr
245
+ check_status api[:SessionGetInputTypeInfo].call(@session, i, typeinfo)
246
+ typeinfo = ::FFI::AutoPointer.new(typeinfo.read_pointer, api[:ReleaseTypeInfo])
247
+
248
+ {name: name_str}.merge(Utils.node_info(typeinfo))
241
249
  end
242
- inputs
243
250
  end
244
251
 
245
252
  def load_outputs
246
- outputs = []
247
253
  num_output_nodes = ::FFI::MemoryPointer.new(:size_t)
248
- check_status api[:SessionGetOutputCount].call(read_pointer, num_output_nodes)
249
- num_output_nodes.read(:size_t).times do |i|
250
- name_ptr = ::FFI::MemoryPointer.new(:string)
251
- check_status api[:SessionGetOutputName].call(read_pointer, i, @allocator.read_pointer, name_ptr)
252
- # freed in node_info
254
+ check_status api[:SessionGetOutputCount].call(@session, num_output_nodes)
255
+
256
+ num_output_nodes.read(:size_t).times.map do |i|
257
+ name_ptr = ::FFI::MemoryPointer.new(:pointer)
258
+ check_status api[:SessionGetOutputName].call(@session, i, @allocator, name_ptr)
259
+ name_str = name_ptr.read_pointer.read_string
260
+ allocator_free name_ptr.read_pointer
261
+
253
262
  typeinfo = ::FFI::MemoryPointer.new(:pointer)
254
- check_status api[:SessionGetOutputTypeInfo].call(read_pointer, i, typeinfo)
255
- outputs << {name: name_ptr.read_pointer.read_string}.merge(Utils.node_info(typeinfo))
256
- allocator_free name_ptr
263
+ check_status api[:SessionGetOutputTypeInfo].call(@session, i, typeinfo)
264
+ typeinfo = ::FFI::AutoPointer.new(typeinfo.read_pointer, api[:ReleaseTypeInfo])
265
+
266
+ {name: name_str}.merge(Utils.node_info(typeinfo))
257
267
  end
258
- outputs
259
268
  end
260
269
 
261
270
  def create_input_tensor(input_feed)
@@ -285,10 +294,6 @@ module OnnxRuntime
285
294
  ptr
286
295
  end
287
296
 
288
- def read_pointer
289
- @session.read_pointer
290
- end
291
-
292
297
  def check_status(status)
293
298
  Utils.check_status(status)
294
299
  end
@@ -301,27 +306,14 @@ module OnnxRuntime
301
306
  self.class.api
302
307
  end
303
308
 
304
- def release(*args)
305
- self.class.release(*args)
306
- end
307
-
308
309
  def allocator_free(ptr)
309
- api[:AllocatorFree].call(@allocator.read_pointer, ptr.read_pointer)
310
+ api[:AllocatorFree].call(@allocator, ptr)
310
311
  end
311
312
 
312
313
  def self.api
313
314
  FFI.api
314
315
  end
315
316
 
316
- def self.release(type, pointer)
317
- Utils.release(type, pointer)
318
- end
319
-
320
- def self.finalize(addr)
321
- # must use proc instead of stabby lambda
322
- proc { api[:ReleaseSession].call(::FFI::Pointer.new(:pointer, addr)) }
323
- end
324
-
325
317
  # wide string on Windows
326
318
  # char string on Linux
327
319
  # see ORTCHAR_T in onnxruntime_c_api.h
@@ -333,7 +325,8 @@ module OnnxRuntime
333
325
  raise Error, "Expected mbstowcs to return #{str.size}, got #{ret}" if ret != str.size
334
326
  dest
335
327
  else
336
- str
328
+ # prevent frozen string literal warnings
329
+ +str
337
330
  end
338
331
  end
339
332
 
@@ -343,7 +336,7 @@ module OnnxRuntime
343
336
  @@env ||= begin
344
337
  env = ::FFI::MemoryPointer.new(:pointer)
345
338
  check_status api[:CreateEnv].call(3, "Default", env)
346
- at_exit { release :Env, env }
339
+ env = ::FFI::AutoPointer.new(env.read_pointer, api[:ReleaseEnv])
347
340
  # disable telemetry
348
341
  # https://github.com/microsoft/onnxruntime/blob/master/docs/Privacy.md
349
342
  check_status api[:DisableTelemetryEvents].call(env)
@@ -1,9 +1,8 @@
1
1
  module OnnxRuntime
2
2
  class OrtValue
3
3
  def initialize(ptr, ref = nil)
4
- @ptr = ptr.read_pointer
4
+ @ptr = ::FFI::AutoPointer.new(ptr, FFI.api[:ReleaseValue])
5
5
  @ref = ref # keep reference to data
6
- ObjectSpace.define_finalizer(@ptr, self.class.finalize(@ptr.to_i))
7
6
  end
8
7
 
9
8
  def self.from_numo(numo_obj)
@@ -27,14 +26,14 @@ module OnnxRuntime
27
26
  if element_type == :string
28
27
  # keep reference to _str_ptrs until FillStringTensor call
29
28
  input_tensor_values, _str_ptrs = create_input_strings(input)
30
- Utils.check_status FFI.api[:CreateTensorAsOrtValue].call(Utils.allocator.read_pointer, input_node_dims, shape.size, type_enum, ptr)
29
+ Utils.check_status FFI.api[:CreateTensorAsOrtValue].call(Utils.allocator, input_node_dims, shape.size, type_enum, ptr)
31
30
  Utils.check_status FFI.api[:FillStringTensor].call(ptr.read_pointer, input_tensor_values, input_tensor_values.size / input_tensor_values.type_size)
32
31
  else
33
32
  input_tensor_values = create_input_data(input, element_type)
34
- Utils.check_status FFI.api[:CreateTensorWithDataAsOrtValue].call(allocator_info.read_pointer, input_tensor_values, input_tensor_values.size, input_node_dims, shape.size, type_enum, ptr)
33
+ Utils.check_status FFI.api[:CreateTensorWithDataAsOrtValue].call(allocator_info, input_tensor_values, input_tensor_values.size, input_node_dims, shape.size, type_enum, ptr)
35
34
  end
36
35
 
37
- new(ptr, input_tensor_values)
36
+ new(ptr.read_pointer, input_tensor_values)
38
37
  end
39
38
 
40
39
  def self.from_shape_and_type(shape, element_type)
@@ -45,9 +44,9 @@ module OnnxRuntime
45
44
  input_node_dims.write_array_of_int64(shape)
46
45
 
47
46
  ptr = ::FFI::MemoryPointer.new(:pointer)
48
- Utils.check_status FFI.api[:CreateTensorAsOrtValue].call(Utils.allocator.read_pointer, input_node_dims, shape.size, type_enum, ptr)
47
+ Utils.check_status FFI.api[:CreateTensorAsOrtValue].call(Utils.allocator, input_node_dims, shape.size, type_enum, ptr)
49
48
 
50
- new(ptr)
49
+ new(ptr.read_pointer)
51
50
  end
52
51
 
53
52
  def self.create_input_data(input, tensor_type)
@@ -88,6 +87,7 @@ module OnnxRuntime
88
87
  @data_type ||= begin
89
88
  typeinfo = ::FFI::MemoryPointer.new(:pointer)
90
89
  Utils.check_status FFI.api[:GetTypeInfo].call(@ptr, typeinfo)
90
+ typeinfo = ::FFI::AutoPointer.new(typeinfo.read_pointer, FFI.api[:ReleaseTypeInfo])
91
91
  Utils.node_info(typeinfo)[:type]
92
92
  end
93
93
  end
@@ -134,13 +134,10 @@ module OnnxRuntime
134
134
 
135
135
  def type_and_shape_info
136
136
  @type_and_shape_info ||= begin
137
- begin
138
- typeinfo = ::FFI::MemoryPointer.new(:pointer)
139
- Utils.check_status FFI.api[:GetTensorTypeAndShape].call(@ptr, typeinfo)
140
- Utils.tensor_type_and_shape(typeinfo)
141
- ensure
142
- Utils.release :TensorTypeAndShapeInfo, typeinfo
143
- end
137
+ typeinfo = ::FFI::MemoryPointer.new(:pointer)
138
+ Utils.check_status FFI.api[:GetTensorTypeAndShape].call(@ptr, typeinfo)
139
+ typeinfo = ::FFI::AutoPointer.new(typeinfo.read_pointer, FFI.api[:ReleaseTensorTypeAndShapeInfo])
140
+ Utils.tensor_type_and_shape(typeinfo)
144
141
  end
145
142
  end
146
143
 
@@ -153,6 +150,7 @@ module OnnxRuntime
153
150
  when :tensor
154
151
  typeinfo = ::FFI::MemoryPointer.new(:pointer)
155
152
  Utils.check_status FFI.api[:GetTensorTypeAndShape].call(out_ptr, typeinfo)
153
+ typeinfo = ::FFI::AutoPointer.new(typeinfo.read_pointer, FFI.api[:ReleaseTensorTypeAndShapeInfo])
156
154
 
157
155
  type, shape = Utils.tensor_type_and_shape(typeinfo)
158
156
 
@@ -160,11 +158,9 @@ module OnnxRuntime
160
158
  Utils.check_status FFI.api[:GetTensorMutableData].call(out_ptr, tensor_data)
161
159
 
162
160
  out_size = ::FFI::MemoryPointer.new(:size_t)
163
- Utils.check_status FFI.api[:GetTensorShapeElementCount].call(typeinfo.read_pointer, out_size)
161
+ Utils.check_status FFI.api[:GetTensorShapeElementCount].call(typeinfo, out_size)
164
162
  output_tensor_size = out_size.read(:size_t)
165
163
 
166
- Utils.release :TensorTypeAndShapeInfo, typeinfo
167
-
168
164
  # TODO support more types
169
165
  type = FFI::TensorElementDataType[type]
170
166
 
@@ -203,20 +199,22 @@ module OnnxRuntime
203
199
 
204
200
  out.read(:size_t).times.map do |i|
205
201
  seq = ::FFI::MemoryPointer.new(:pointer)
206
- Utils.check_status FFI.api[:GetValue].call(out_ptr, i, Utils.allocator.read_pointer, seq)
202
+ Utils.check_status FFI.api[:GetValue].call(out_ptr, i, Utils.allocator, seq)
207
203
  create_from_onnx_value(seq.read_pointer, output_type)
208
204
  end
209
205
  when :map
210
- type_shape = ::FFI::MemoryPointer.new(:pointer)
211
206
  map_keys = ::FFI::MemoryPointer.new(:pointer)
207
+ Utils.check_status FFI.api[:GetValue].call(out_ptr, 0, Utils.allocator, map_keys)
208
+
212
209
  map_values = ::FFI::MemoryPointer.new(:pointer)
213
- elem_type = ::FFI::MemoryPointer.new(:int)
210
+ Utils.check_status FFI.api[:GetValue].call(out_ptr, 1, Utils.allocator, map_values)
214
211
 
215
- Utils.check_status FFI.api[:GetValue].call(out_ptr, 0, Utils.allocator.read_pointer, map_keys)
216
- Utils.check_status FFI.api[:GetValue].call(out_ptr, 1, Utils.allocator.read_pointer, map_values)
212
+ type_shape = ::FFI::MemoryPointer.new(:pointer)
217
213
  Utils.check_status FFI.api[:GetTensorTypeAndShape].call(map_keys.read_pointer, type_shape)
218
- Utils.check_status FFI.api[:GetTensorElementType].call(type_shape.read_pointer, elem_type)
219
- Utils.release :TensorTypeAndShapeInfo, type_shape
214
+ type_shape = ::FFI::AutoPointer.new(type_shape.read_pointer, FFI.api[:ReleaseTensorTypeAndShapeInfo])
215
+
216
+ elem_type = ::FFI::MemoryPointer.new(:int)
217
+ Utils.check_status FFI.api[:GetTensorElementType].call(type_shape, elem_type)
220
218
 
221
219
  # TODO support more types
222
220
  elem_type = FFI::TensorElementDataType[elem_type.read_int]
@@ -255,23 +253,17 @@ module OnnxRuntime
255
253
  end
256
254
 
257
255
  def reshape(arr, dims)
258
- arr = arr.flatten
259
256
  dims[1..-1].reverse_each do |dim|
260
257
  arr = arr.each_slice(dim)
261
258
  end
262
259
  arr.to_a
263
260
  end
264
261
 
265
- def self.finalize(addr)
266
- # must use proc instead of stabby lambda
267
- proc { FFI.api[:ReleaseValue].call(::FFI::Pointer.new(:pointer, addr)) }
268
- end
269
-
270
262
  def self.allocator_info
271
263
  @allocator_info ||= begin
272
264
  allocator_info = ::FFI::MemoryPointer.new(:pointer)
273
265
  Utils.check_status FFI.api[:CreateCpuMemoryInfo].call(1, 0, allocator_info)
274
- allocator_info
266
+ ::FFI::AutoPointer.new(allocator_info.read_pointer, FFI.api[:ReleaseMemoryInfo])
275
267
  end
276
268
  end
277
269
  end
@@ -17,28 +17,24 @@ module OnnxRuntime
17
17
  FFI.api
18
18
  end
19
19
 
20
- def self.release(type, pointer)
21
- FFI.api[:"Release#{type}"].call(pointer.read_pointer) if pointer && !pointer.null?
22
- end
23
-
24
20
  def self.unsupported_type(name, type)
25
21
  raise Error, "Unsupported #{name} type: #{type}"
26
22
  end
27
23
 
28
24
  def self.tensor_type_and_shape(tensor_info)
29
25
  type = ::FFI::MemoryPointer.new(:int)
30
- check_status api[:GetTensorElementType].call(tensor_info.read_pointer, type)
26
+ check_status api[:GetTensorElementType].call(tensor_info, type)
31
27
 
32
28
  num_dims_ptr = ::FFI::MemoryPointer.new(:size_t)
33
- check_status api[:GetDimensionsCount].call(tensor_info.read_pointer, num_dims_ptr)
29
+ check_status api[:GetDimensionsCount].call(tensor_info, num_dims_ptr)
34
30
  num_dims = num_dims_ptr.read(:size_t)
35
31
 
36
32
  node_dims = ::FFI::MemoryPointer.new(:int64, num_dims)
37
- check_status api[:GetDimensions].call(tensor_info.read_pointer, node_dims, num_dims)
33
+ check_status api[:GetDimensions].call(tensor_info, node_dims, num_dims)
38
34
  dims = node_dims.read_array_of_int64(num_dims)
39
35
 
40
36
  symbolic_dims = ::FFI::MemoryPointer.new(:pointer, num_dims)
41
- check_status api[:GetSymbolicDimensions].call(tensor_info.read_pointer, symbolic_dims, num_dims)
37
+ check_status api[:GetSymbolicDimensions].call(tensor_info, symbolic_dims, num_dims)
42
38
  named_dims = num_dims.times.map { |i| symbolic_dims[i].read_pointer.read_string }
43
39
  dims = named_dims.zip(dims).map { |n, d| n.empty? ? d : n }
44
40
 
@@ -47,25 +43,28 @@ module OnnxRuntime
47
43
 
48
44
  def self.node_info(typeinfo)
49
45
  onnx_type = ::FFI::MemoryPointer.new(:int)
50
- check_status api[:GetOnnxTypeFromTypeInfo].call(typeinfo.read_pointer, onnx_type)
46
+ check_status api[:GetOnnxTypeFromTypeInfo].call(typeinfo, onnx_type)
51
47
 
52
48
  type = FFI::OnnxType[onnx_type.read_int]
53
49
  case type
54
50
  when :tensor
55
- tensor_info = ::FFI::MemoryPointer.new(:pointer)
56
51
  # don't free tensor_info
57
- check_status api[:CastTypeInfoToTensorInfo].call(typeinfo.read_pointer, tensor_info)
52
+ tensor_info = ::FFI::MemoryPointer.new(:pointer)
53
+ check_status api[:CastTypeInfoToTensorInfo].call(typeinfo, tensor_info)
54
+ type, shape = Utils.tensor_type_and_shape(tensor_info.read_pointer)
58
55
 
59
- type, shape = Utils.tensor_type_and_shape(tensor_info)
60
56
  {
61
57
  type: "tensor(#{FFI::TensorElementDataType[type]})",
62
58
  shape: shape
63
59
  }
64
60
  when :sequence
61
+ # don't free sequence_info
65
62
  sequence_type_info = ::FFI::MemoryPointer.new(:pointer)
66
- check_status api[:CastTypeInfoToSequenceTypeInfo].call(typeinfo.read_pointer, sequence_type_info)
63
+ check_status api[:CastTypeInfoToSequenceTypeInfo].call(typeinfo, sequence_type_info)
64
+
67
65
  nested_type_info = ::FFI::MemoryPointer.new(:pointer)
68
66
  check_status api[:GetSequenceElementType].call(sequence_type_info.read_pointer, nested_type_info)
67
+ nested_type_info = ::FFI::AutoPointer.new(nested_type_info.read_pointer, api[:ReleaseTypeInfo])
69
68
  v = node_info(nested_type_info)[:type]
70
69
 
71
70
  {
@@ -73,8 +72,9 @@ module OnnxRuntime
73
72
  shape: []
74
73
  }
75
74
  when :map
75
+ # don't free map_type_info
76
76
  map_type_info = ::FFI::MemoryPointer.new(:pointer)
77
- check_status api[:CastTypeInfoToMapTypeInfo].call(typeinfo.read_pointer, map_type_info)
77
+ check_status api[:CastTypeInfoToMapTypeInfo].call(typeinfo, map_type_info)
78
78
 
79
79
  # key
80
80
  key_type = ::FFI::MemoryPointer.new(:int)
@@ -84,6 +84,7 @@ module OnnxRuntime
84
84
  # value
85
85
  value_type_info = ::FFI::MemoryPointer.new(:pointer)
86
86
  check_status api[:GetMapValueType].call(map_type_info.read_pointer, value_type_info)
87
+ value_type_info = ::FFI::AutoPointer.new(value_type_info.read_pointer, api[:ReleaseTypeInfo])
87
88
  v = node_info(value_type_info)[:type]
88
89
 
89
90
  {
@@ -93,8 +94,6 @@ module OnnxRuntime
93
94
  else
94
95
  Utils.unsupported_type("ONNX", type)
95
96
  end
96
- ensure
97
- release :TypeInfo, typeinfo
98
97
  end
99
98
 
100
99
  def self.numo_array?(obj)
@@ -135,7 +134,7 @@ module OnnxRuntime
135
134
  @allocator ||= begin
136
135
  allocator = ::FFI::MemoryPointer.new(:pointer)
137
136
  check_status api[:GetAllocatorWithDefaultOptions].call(allocator)
138
- allocator
137
+ allocator.read_pointer # do not free default allocator
139
138
  end
140
139
  end
141
140
  end
@@ -1,3 +1,3 @@
1
1
  module OnnxRuntime
2
- VERSION = "0.9.4"
2
+ VERSION = "0.10.0"
3
3
  end
@@ -6080,3 +6080,77 @@ https://dawn.googlesource.com/dawn
6080
6080
  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
6081
6081
  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
6082
6082
  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
6083
+
6084
+ _____
6085
+
6086
+ KleidiAI
6087
+
6088
+ https://gitlab.arm.com/kleidi/kleidiai
6089
+
6090
+ Apache License
6091
+ Version 2.0, January 2004
6092
+ http://www.apache.org/licenses/
6093
+
6094
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6095
+
6096
+ 1. Definitions.
6097
+
6098
+ "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
6099
+
6100
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
6101
+
6102
+ "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
6103
+
6104
+ "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
6105
+
6106
+ "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
6107
+
6108
+ "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
6109
+
6110
+ "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
6111
+
6112
+ "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
6113
+
6114
+ "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
6115
+
6116
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
6117
+
6118
+ 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
6119
+
6120
+ 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
6121
+
6122
+ 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
6123
+
6124
+ (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
6125
+
6126
+ (b) You must cause any modified files to carry prominent notices stating that You changed the files; and
6127
+
6128
+ (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
6129
+
6130
+ (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
6131
+
6132
+ You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
6133
+
6134
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
6135
+
6136
+ 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
6137
+
6138
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
6139
+
6140
+ 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
6141
+
6142
+ 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
6143
+
6144
+ END OF TERMS AND CONDITIONS
6145
+
6146
+ Copyright 2024-2025 Arm Limited and/or its affiliates <open-source-office@arm.com>
6147
+
6148
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
6149
+
6150
+ 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
6151
+
6152
+ 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
6153
+
6154
+ 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
6155
+
6156
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Binary file
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: onnxruntime
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.4
4
+ version: 0.10.0
5
5
  platform: aarch64-linux
6
6
  authors:
7
7
  - Andrew Kane
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-03-08 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: ffi
@@ -53,14 +53,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
53
53
  requirements:
54
54
  - - ">="
55
55
  - !ruby/object:Gem::Version
56
- version: '3'
56
+ version: '3.2'
57
57
  required_rubygems_version: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  requirements: []
63
- rubygems_version: 3.6.2
63
+ rubygems_version: 3.6.7
64
64
  specification_version: 4
65
65
  summary: High performance scoring engine for ML models
66
66
  test_files: []