public static class CpuAccelerationConfig.Builder extends Object
Builder class.
Public Constructor Summary
Builder()
Creates the CPU acceleration config builder.
|
Public Method Summary
CpuAccelerationConfig |
build()
Builds the CPU acceleration config.
|
CpuAccelerationConfig.Builder |
setDisableDefaultDelegates(boolean value)
Sets whether to disable the default delegates (XNNPack).
|
CpuAccelerationConfig.Builder |
setNumThreads(int numThreads)
Sets the number of threads.
|
Inherited Method Summary
Public Constructors
public Builder ()
Creates the CPU acceleration config builder.
Public Methods
public CpuAccelerationConfig build ()
Builds the CPU acceleration config.
Throws
IllegalArgumentException | if number of threads is not -1 or positive |
---|---|
IllegalArgumentException | if default delegates are disabled and XNNPack delegate flag is set |
public CpuAccelerationConfig.Builder setDisableDefaultDelegates (boolean value)
Sets whether to disable the default delegates (XNNPack).
public CpuAccelerationConfig.Builder setNumThreads (int numThreads)
Sets the number of threads. Set to -1
to let the interpreter choose.
Otherwise, must be > 0
.