XnnpackOptions class

Configuration options for the XNNPACK execution provider.

XNNPACK is a highly optimized library for neural network inference on ARM and x86 CPUs. It uses SIMD instructions (NEON on ARM, SSE/AVX on x86) for maximum throughput.

OrtSessionWrapper.createWithProviders(
  modelPath,
  providers: [OrtProvider.xnnpack, OrtProvider.cpu],
  providerOptions: {
    OrtProvider.xnnpack: XnnpackOptions(numThreads: 4).toMap(),
  },
);

Constructors

XnnpackOptions({int numThreads = 0})
const
XnnpackOptions.fromMap(Map<String, String> map)
Creates XnnpackOptions from a provider options map.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
numThreads int
Number of threads for XNNPACK's internal thread pool.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() Map<String, String>
Converts to the key-value map expected by the ONNX Runtime generic API.
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited