From f0c03df05db70b2c4d22ec0bbf08be65a08d4ee2 Mon Sep 17 00:00:00 2001 From: Giulio Eulisse <10544+ktf@users.noreply.github.com> Date: Mon, 29 Jun 2026 16:10:42 +0200 Subject: [PATCH] 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. --- Generators/src/TPCLoopers.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Generators/src/TPCLoopers.cxx b/Generators/src/TPCLoopers.cxx index 6e5af7c0c84d8..f8d001588b8f3 100644 --- a/Generators/src/TPCLoopers.cxx +++ b/Generators/src/TPCLoopers.cxx @@ -78,10 +78,10 @@ std::vector Scaler::jsonArrayToVector(const rapidjson::Value& jsonArray) // This class loads the ONNX model and generates samples using it. ONNXGenerator::ONNXGenerator(Ort::Env& shared_env, const std::string& model_path) - : env(shared_env), session(env, model_path.c_str(), Ort::SessionOptions{}) + : env(shared_env), session(nullptr) { - // Create session options Ort::SessionOptions session_options; + session_options.SetIntraOpNumThreads(1); session = Ort::Session(env, model_path.c_str(), session_options); }