module

Onnx::RT

Loads libonnxruntime through dlopen and exposes the OrtApi struct.

Constants

DEFAULT_LIBS = ["libonnxruntime.so.1.21", "libonnxruntime.so.1", "libonnxruntime.so"] of ::String

Class methods

allocator
Source
api?

Cached api without loading (safe from finalizers).

Source
check(status : Pointer(LibOnnx::OrtStatus)) : Nil

Raises Onnx::Error with the message from an OrtStatus and releases it.

Source
lib_paths
Source
library_symbol(handle : Pointer(Void), name : String, what : String = "library") : Pointer(Void)

Resolves a symbol in a library handle; raises when missing.

Source
memory_info
Source
open_library(paths : Array(String), what : String = "library") : Pointer(Void)

Loads the first library in paths that opens successfully (dlopen on Unix, LoadLibraryA on Windows). Raises with the full candidate list otherwise — the shared entry point used by this shard and by examples binding their own libraries (espeak-ng, ...).

Source
reset!

Resets the cached handle (useful in specs).

Source