Versions in this module Expand all Collapse all v0 v0.1.0 Nov 2, 2026 Changes in this version + const ArenaAllocator + const DefaultEnvName + const DefaultMemType + const DeviceAllocator + const ProviderCPU + const ProviderCUDA + const ProviderTensorRT + func DefaultLibraryPath() string + func GetTensorData[T Number](v *Value) ([]T, error) + type AllocatorHandle uintptr + type AllocatorType int32 + type CUDAProviderOptionsV2Handle uintptr + type Engine struct + func NewEngine(options ...Option) (*Engine, error) + func (e *Engine) APIVersion() uint32 + func (e *Engine) Destroy() + func (e *Engine) GetAvailableProviders() []string + func (e *Engine) IsProviderAvailable(name string) bool + func (e *Engine) NewSession(modelPath string, opts *SessionOptions) (*Session, error) + func (e *Engine) NewSessionFromBytes(data []byte, opts *SessionOptions) (*Session, error) + func (e *Engine) NewSessionOptions() (*SessionOptions, error) + func (e *Engine) NewTensor(shape []int64, data any) (*Value, error) + func (e *Engine) Version() Version + func (e *Engine) VersionString() string + type EnvHandle uintptr + type ErrorCode int32 + const ErrEngineError + const ErrExternalDataNotAccessible + const ErrFail + const ErrFileExists + const ErrInvalidArgument + const ErrInvalidFileFormat + const ErrInvalidProtobuf + const ErrModelLoaded + const ErrNoModelLoaded + const ErrNoSuchFile + const ErrNotImplemented + const ErrOK + const ErrPermissionDenied + const ErrRuntimeException + const ErrRuntimeOptimizationUnavailable + type ExecutionMode int32 + const ExecutionModeParallel + const ExecutionModeSequential + type GraphOptimizationLevel int32 + const GraphOptimizationLevelAll + const GraphOptimizationLevelBasic + const GraphOptimizationLevelEnableAll + const GraphOptimizationLevelExtended + const GraphOptimizationLevelNone + type LoggingLevel int32 + const LogError + const LogFatal + const LogInfo + const LogVerbose + const LogWarning + type MemType int32 + type MemoryInfoHandle uintptr + type Number interface + type OnnxType int32 + const OnnxTypeMap + const OnnxTypeOpaque + const OnnxTypeOptional + const OnnxTypeSequence + const OnnxTypeSparseTensor + const OnnxTypeTensor + const OnnxTypeUnknown + type Option func(*engineConfig) + func WithEnvName(name string) Option + func WithLibraryPath(path string) Option + func WithStrictVersion(strict bool) Option + type RunOptionsHandle uintptr + type Session struct + Inputs []TensorInfo + Outputs []TensorInfo + func (s *Session) Destroy() + func (s *Session) Run(inputs map[string]*Value) (map[string]*Value, error) + type SessionHandle uintptr + type SessionOptions struct + func (o *SessionOptions) AddConfigEntry(key, value string) error + func (o *SessionOptions) AddFreeDimensionOverride(denotation string, dim int64) error + func (o *SessionOptions) AddFreeDimensionOverrideByName(name string, dim int64) error + func (o *SessionOptions) Destroy() + func (o *SessionOptions) EnableCUDA(options map[string]string) error + func (o *SessionOptions) EnableTensorRT(options map[string]string) error + func (o *SessionOptions) SetCpuMemArena(useArena bool) error + func (o *SessionOptions) SetExecutionMode(mode ExecutionMode) error + func (o *SessionOptions) SetGraphOptimizationLevel(level GraphOptimizationLevel) error + func (o *SessionOptions) SetInterOpNumThreads(num int32) error + func (o *SessionOptions) SetIntraOpNumThreads(num int32) error + func (o *SessionOptions) SetLogSeverityLevel(level LoggingLevel) error + type SessionOptionsHandle uintptr + type StatusHandle uintptr + type TensorElementDataType int32 + const TensorElementDataTypeBFloat16 + const TensorElementDataTypeBool + const TensorElementDataTypeComplex128 + const TensorElementDataTypeComplex64 + const TensorElementDataTypeDouble + const TensorElementDataTypeFloat + const TensorElementDataTypeFloat16 + const TensorElementDataTypeFloat4E2M1 + const TensorElementDataTypeFloat8E4M3FN + const TensorElementDataTypeFloat8E4M3FNUZ + const TensorElementDataTypeFloat8E5M2 + const TensorElementDataTypeFloat8E5M2FNUZ + const TensorElementDataTypeInt16 + const TensorElementDataTypeInt32 + const TensorElementDataTypeInt4 + const TensorElementDataTypeInt64 + const TensorElementDataTypeInt8 + const TensorElementDataTypeString + const TensorElementDataTypeUint16 + const TensorElementDataTypeUint32 + const TensorElementDataTypeUint4 + const TensorElementDataTypeUint64 + const TensorElementDataTypeUint8 + const TensorElementDataTypeUndefined + type TensorInfo struct + DataType TensorElementDataType + Name string + Shape []int64 + func (t TensorInfo) ElementCount() (int64, bool) + type TensorRTProviderOptionsV2Handle uintptr + type TensorTypeAndShapeInfoHandle uintptr + type TypeInfoHandle uintptr + type Value struct + func NewTensor(shape []int64, data any) (*Value, error) + func (v *Value) Destroy() + func (v *Value) GetElementCount() (int, error) + func (v *Value) GetShape() ([]int64, error) + type ValueHandle uintptr + type Version struct + Major uint32 + Minor uint32 + Patch uint32 + func (v Version) String() string