Sha256: 61ecefff9bec091426e5699f94c42a27cdd50a276e6db05cf7af9d6a1816e840

Contents?: true

Size: 563 Bytes

Versions: 2

Compression:

Stored size: 563 Bytes

Contents

# dependencies
require "ffi"

# modules
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

2 entries across 2 versions & 1 rubygems

Version Path
onnxruntime-0.2.1 lib/onnxruntime.rb
onnxruntime-0.2.0 lib/onnxruntime.rb