class
OnnxRuntime::IoBinding
- OnnxRuntime::IoBinding
- Reference
- Object
Overview
IoBinding class provides zero-copy inference and advanced input/output binding. This is a placeholder for future implementation.
Defined in:
onnxruntime/io_binding.crConstructors
-
.new(session : InferenceSession)
Creates a new IoBinding instance.
Instance Method Summary
-
#bind_input(name : String, tensor_ptr : Pointer(LibOnnxRuntime::OrtValue))
Bind input to a tensor
-
#bind_output(name : String, tensor_ptr : Pointer(LibOnnxRuntime::OrtValue))
Bind output to a tensor
-
#finalize
Finalizer to release resources
-
#release
Explicitly release resources
-
#to_unsafe : Pointer(OnnxRuntime::LibOnnxRuntime::OrtIoBinding)
Get the underlying OrtIoBinding pointer
Constructor Detail
Instance Method Detail
def bind_input(name : String, tensor_ptr : Pointer(LibOnnxRuntime::OrtValue))
#
Bind input to a tensor
def bind_output(name : String, tensor_ptr : Pointer(LibOnnxRuntime::OrtValue))
#
Bind output to a tensor
def to_unsafe : Pointer(OnnxRuntime::LibOnnxRuntime::OrtIoBinding)
#
Get the underlying OrtIoBinding pointer