From f869cc57105d2f7e9f7ec13af5d7c6ba3b33be2d Mon Sep 17 00:00:00 2001 From: David Rohr Date: Wed, 26 Feb 2025 22:19:50 +0100 Subject: [PATCH 1/3] GPU: Fix typo in debug message --- GPU/GPUTracking/Base/GPUReconstruction.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GPU/GPUTracking/Base/GPUReconstruction.cxx b/GPU/GPUTracking/Base/GPUReconstruction.cxx index 6ce07f67c3645..a7e0c2cb827f1 100644 --- a/GPU/GPUTracking/Base/GPUReconstruction.cxx +++ b/GPU/GPUTracking/Base/GPUReconstruction.cxx @@ -568,7 +568,7 @@ size_t GPUReconstruction::AllocateRegisteredMemoryHelper(GPUMemoryResource* res, memorypool = (void*)((char*)memorypool + GPUProcessor::getAlignment(memorypool)); } if (memorypoolend ? (memorypool > memorypoolend) : ((size_t)ptrDiff(memorypool, memorybase) > memorysize)) { - std::cerr << "Memory pool size exceeded (" << device << ") (" << res->mName << ": " << (memorypoolend ? (memorysize + ptrDiff(memorypool, memorypoolend)) : ptrDiff(memorypool, memorybase)) << " < " << memorysize << "\n"; + std::cerr << "Memory pool size exceeded (" << device << ") (" << res->mName << ": " << (memorypoolend ? (memorysize + ptrDiff(memorypool, memorypoolend)) : ptrDiff(memorypool, memorybase)) << " > " << memorysize << "\n"; throw std::bad_alloc(); } if (mProcessingSettings.allocDebugLevel >= 2) { From 02684cb53f80d7b1af28c5847e99265a04e3286c Mon Sep 17 00:00:00 2001 From: David Rohr Date: Wed, 26 Feb 2025 22:37:59 +0100 Subject: [PATCH 2/3] GPU Standalone: Add sanity check for benchmark to warn about incompatible options --- GPU/GPUTracking/Standalone/Benchmark/standalone.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/GPU/GPUTracking/Standalone/Benchmark/standalone.cxx b/GPU/GPUTracking/Standalone/Benchmark/standalone.cxx index 58866224943c0..682e6913d58d4 100644 --- a/GPU/GPUTracking/Standalone/Benchmark/standalone.cxx +++ b/GPU/GPUTracking/Standalone/Benchmark/standalone.cxx @@ -223,6 +223,10 @@ int32_t ReadConfiguration(int argc, char** argv) } } if (configStandalone.setO2Settings) { + if (!(configStandalone.inputcontrolmem && configStandalone.outputcontrolmem)) { + printf("setO2Settings requires the usage of --inputMemory and --outputMemory as in O2\n"); + return 1; + } if (configStandalone.runGPU) { configStandalone.proc.forceHostMemoryPoolSize = 1024 * 1024 * 1024; } From 637cbe0aee3775311237620d99a3c756ff2ff1e2 Mon Sep 17 00:00:00 2001 From: David Rohr Date: Wed, 26 Feb 2025 22:40:42 +0100 Subject: [PATCH 3/3] GPU TBB: Fix threading in case nThreadsAdjusted becomes 1 --- GPU/GPUTracking/Base/GPUReconstructionProcessing.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/GPU/GPUTracking/Base/GPUReconstructionProcessing.cxx b/GPU/GPUTracking/Base/GPUReconstructionProcessing.cxx index 51da17fe58628..51c48ebbfc0b2 100644 --- a/GPU/GPUTracking/Base/GPUReconstructionProcessing.cxx +++ b/GPU/GPUTracking/Base/GPUReconstructionProcessing.cxx @@ -51,7 +51,9 @@ void GPUReconstructionProcessing::runParallelOuterLoop(bool doGPU, uint32_t nThr tbb::parallel_for(0, nThreads, lambda, tbb::simple_partitioner()); }); } else { - lambda(0); + for (uint32_t i = 0; i < nThreads; i++) { + lambda(i); + } } }