Pinning the process to specific cores when inferencing using onnx runtime #10916
-
|
Hi, I am trying to pin the process to specific cores using 'taskset' when inferencing using onnx runtime. PFB the inference timing table <style> </style>
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
ONNX Runtime doesn't work well with "taskset" if you didn't explicitly set the number of threads which onnxruntime should create. So, did you set the option? /** \brief Sets the number of threads used to parallelize the execution within nodes
*
* When running a single node operation, ex. add, this sets the maximum number of threads to use.
*
* \note If built with OpenMP, this has no effect on the number of threads used. In this case
* use the OpenMP env variables to configure the number of intra op num threads.
*
* \param[in] options
* \param[in] intra_op_num_threads Number of threads to use<br>
* A value of 0 will use the default number of threads<br>
*
* \snippet{doc} snippets.dox OrtStatus Return Value
*/
ORT_API2_STATUS(SetIntraOpNumThreads, _Inout_ OrtSessionOptions* options, int intra_op_num_threads); |
Beta Was this translation helpful? Give feedback.
ONNX Runtime doesn't work well with "taskset" if you didn't explicitly set the number of threads which onnxruntime should create. So, did you set the option?