-
Hi, opts = onnxruntime.SessionOptions()
opts.inter_op_num_threads = 1
opts.intra_op_num_threads = 1
if force_onnx_cpu and 'CPUExecutionProvider' in onnxruntime.get_available_providers():
self.session = onnxruntime.InferenceSession(path, providers=['CPUExecutionProvider'], sess_options=opts) And browsing the ONNX documentation ( link ), they say if these are set to 0, then ONNX will decide how many CPU cores to use. Thanks |
Beta Was this translation helpful? Give feedback.
Answered by
snakers4
Nov 6, 2024
Replies: 1 comment 3 replies
-
Hi,
It is best to keep it at 1 for two reasons:
|
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
snakers4
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
It is best to keep it at 1 for two reasons: