From 13d37d1fff77dd116c968fb43094756b7b1eaa58 Mon Sep 17 00:00:00 2001 From: Giulio Eulisse <10544+ktf@users.noreply.github.com> Date: Thu, 12 Nov 2026 14:06:37 +0100 Subject: [PATCH] GPU Metal: run the tracklet constructor with 128 threads per group The tracklet constructor needs the most registers a Metal thread can have, which leaves room for 384 threads on a core of an M1 Max, so with 256 threads per group only one group fits. With 128 threads per group two to three groups do, and the kernel takes 20% less time: 516 ms -> 415 ms on a quarter of a 30 kHz Pb-Pb time frame (--debug 1, interleaved runs), with the same number of tracks. 96 and 192 threads are within 2% of 128; 64, 160, 256 and 384 are slower. The kernel loops over its start hits with a grid stride and its shared memory does not depend on the group size. --- GPU/GPUTracking/Definitions/Parameters/GPUParameters.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GPU/GPUTracking/Definitions/Parameters/GPUParameters.csv b/GPU/GPUTracking/Definitions/Parameters/GPUParameters.csv index 0f5d228108f82..330c9a3fa7377 100644 --- a/GPU/GPUTracking/Definitions/Parameters/GPUParameters.csv +++ b/GPU/GPUTracking/Definitions/Parameters/GPUParameters.csv @@ -6,7 +6,7 @@ THREAD_COUNT_DEFAULT,256,,256,256,,,,,,512,512,,512,256,512,512,512,,256 ,,,,,,,,,,,,,,,,,,, LB:,,,,,,,,,,,,,,,,,,, GPUTPCCreateTrackingData,256,,"[256, 7]","[192, 2]",,,,,,"[224, 7]",256,"[128, 14]",416,,"[64, 21]",,384,"[320, 2]",64 -GPUTPCTrackletConstructor,256,,"[768, 8]","[512, 10]","[256, 2]","[256, 1]","[256, 2]","[1024, 2]","[512, 4]",1024,"[256, 2]",1024,"[1024, 1]",,"[768, 2]",,768,512,"[256, 32]" +GPUTPCTrackletConstructor,256,,"[768, 8]","[512, 10]","[256, 2]","[256, 1]","[256, 2]","[1024, 2]","[512, 4]",1024,"[256, 2]",1024,"[1024, 1]",,"[768, 2]",,768,512,"[128, 32]" GPUTPCTrackletSelector,256,,"[384, 5]","[192, 10]","[256, 3]","[256, 1]","[256, 3]","[512, 4]","[256, 3]","[288, 3]","[192, 3]","[544, 1]","[32, 2]",,"[384, 3]",,992,"[256, 6]", GPUTPCNeighboursFinder,256,,"[192, 8]","[960, 8]",256,256,256,512,256,864,"[640, 1]","[512, 2]","[736, 1]",,"[480, 3]",,992,"[704, 1]", GPUTPCNeighboursCleaner,256,,"[128, 5]","[384, 9]",256,256,256,256,256,544,512,"[192, 9]","[512, 1]",,"[384, 5]",,672,"[640, 1]",