From 2efa26fdb50ac9da10a01844528e85b8e0a7a55a Mon Sep 17 00:00:00 2001 From: leonarski_f Date: Wed, 15 Apr 2026 20:59:21 +0200 Subject: [PATCH] Revert "IndexerThreadPool: Only GPU pinning, no CPU pinning" This reverts commit b5eb24d4e888c6576f5c47cc901558f7c8acbef1. --- image_analysis/indexing/IndexerThreadPool.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/image_analysis/indexing/IndexerThreadPool.cpp b/image_analysis/indexing/IndexerThreadPool.cpp index 1a845497..ee6ff3ff 100644 --- a/image_analysis/indexing/IndexerThreadPool.cpp +++ b/image_analysis/indexing/IndexerThreadPool.cpp @@ -69,11 +69,14 @@ std::future IndexerThreadPool::Run(const DiffractionExperiment &e void IndexerThreadPool::Worker(int32_t threadIndex, const NUMAHWPolicy &numa_policy, const IndexingSettings &settings) { try { - // IndexerThreadPool is bound to GPU, but not to CPU choice #ifdef JFJOCH_USE_CUDA auto gpu_count = get_gpu_count(); if (gpu_count > 0) - set_gpu(threadIndex % gpu_count); + NUMAHWPolicy::SelectGPUAndItsNUMA(threadIndex % gpu_count); + else + numa_policy.Bind(threadIndex); +#else + numa_policy.Bind(threadIndex); #endif } catch (...) { // NUMA policy errors are not critical and should be ignored for the time being.