Skip to content

Commit f0c03df

Browse files
committed
TPCLoopers: single threaded by default
Without this, a worker pool for all the cores is instanciated and spends 1.42% of the FST waiting to do nothing.
1 parent ee0b597 commit f0c03df

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Generators/src/TPCLoopers.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ std::vector<double> Scaler::jsonArrayToVector(const rapidjson::Value& jsonArray)
7878
// This class loads the ONNX model and generates samples using it.
7979

8080
ONNXGenerator::ONNXGenerator(Ort::Env& shared_env, const std::string& model_path)
81-
: env(shared_env), session(env, model_path.c_str(), Ort::SessionOptions{})
81+
: env(shared_env), session(nullptr)
8282
{
83-
// Create session options
8483
Ort::SessionOptions session_options;
84+
session_options.SetIntraOpNumThreads(1);
8585
session = Ort::Session(env, model_path.c_str(), session_options);
8686
}
8787

0 commit comments

Comments
 (0)