Sha256: 5138f1911a057307ecc7a470d5af687e5d4598101295e6828686ddf05a7119a8

Contents?: true

Size: 606 Bytes

Versions: 13

Compression:

Stored size: 606 Bytes

Contents

# dependencies
require "ffi"

# modules
require "onnxruntime/datasets"
require "onnxruntime/inference_session"
require "onnxruntime/model"
require "onnxruntime/utils"
require "onnxruntime/version"

module OnnxRuntime
  class Error < StandardError; end

  class << self
    attr_accessor :ffi_lib
  end
  lib_name = ::FFI.map_library_name("onnxruntime")
  vendor_lib = File.expand_path("../vendor/#{lib_name}", __dir__)
  self.ffi_lib = [vendor_lib]

  def self.lib_version
    FFI.OrtGetApiBase[:GetVersionString].call.read_string
  end

  # friendlier error message
  autoload :FFI, "onnxruntime/ffi"
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
onnxruntime-0.6.6 lib/onnxruntime.rb
onnxruntime-0.6.5 lib/onnxruntime.rb
onnxruntime-0.6.4 lib/onnxruntime.rb
onnxruntime-0.6.3 lib/onnxruntime.rb
onnxruntime-0.6.2 lib/onnxruntime.rb
onnxruntime-0.6.1 lib/onnxruntime.rb
onnxruntime-0.6.0 lib/onnxruntime.rb
onnxruntime-0.5.2 lib/onnxruntime.rb
onnxruntime-0.5.1 lib/onnxruntime.rb
onnxruntime-0.5.0 lib/onnxruntime.rb
onnxruntime-0.4.0 lib/onnxruntime.rb
onnxruntime-0.3.3 lib/onnxruntime.rb
onnxruntime-0.3.2 lib/onnxruntime.rb