load static method
Loads the ONNX Runtime library from the specified path.
Throws OnnxLoadException if the library cannot be loaded.
Implementation
static OnnxFfi load(String libraryPath) {
try {
final lib = DynamicLibrary.open(libraryPath);
final ffi = OnnxFfi._(lib);
ffi._bindFunctions();
return ffi;
} on ArgumentError catch (e) {
throw OnnxLoadException(
'Failed to load ONNX Runtime from $libraryPath: $e',
);
}
}