numThreads property

int numThreads
final

Number of threads for XNNPACK's internal thread pool.

  • 0 (default): uses the session-level intra_op_num_threads setting.
  • > 0: overrides with the specified thread count.

If not explicitly set and no user override is provided, defaults to Platform.numberOfProcessors for optimal performance on the device.

Implementation

final int numThreads;