Sha256: 1bc7a786065966b0ae85b38735b5b21f83f9107fde227ed086d38449998d0a56

Contents?: true

Size: 594 Bytes

Versions: 4

Compression:

Stored size: 594 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
  end

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
onnxruntime-0.3.1 lib/onnxruntime.rb
onnxruntime-0.3.0 lib/onnxruntime.rb
onnxruntime-0.2.3 lib/onnxruntime.rb
onnxruntime-0.2.2 lib/onnxruntime.rb