From 7ecfe3f84485eb2fa2a5ee23f48fa259006353d2 Mon Sep 17 00:00:00 2001 From: Oliver Rietmann Date: Wed, 25 Nov 2026 16:06:36 +0100 Subject: [PATCH 1/4] GPU TPC: Run extrapolation tracking only on selected tracks --- .../GPUTPCExtrapolationTracking.cxx | 51 +++++++------------ .../GPUTPCSectorDebugSortKernels.cxx | 10 ++++ .../SectorTracker/GPUTPCTracker.cxx | 7 +++ GPU/GPUTracking/SectorTracker/GPUTPCTracker.h | 15 ++++++ .../SectorTracker/GPUTPCTrackletSelector.cxx | 50 ++++++++++++++++++ 5 files changed, 100 insertions(+), 33 deletions(-) diff --git a/GPU/GPUTracking/SectorTracker/GPUTPCExtrapolationTracking.cxx b/GPU/GPUTracking/SectorTracker/GPUTPCExtrapolationTracking.cxx index 784b60baec3d6..c0fb6daf933c5 100644 --- a/GPU/GPUTracking/SectorTracker/GPUTPCExtrapolationTracking.cxx +++ b/GPU/GPUTracking/SectorTracker/GPUTPCExtrapolationTracking.cxx @@ -120,40 +120,25 @@ GPUd() int32_t GPUTPCExtrapolationTracking::PerformExtrapolationTrackingRun(GPUT GPUd() void GPUTPCExtrapolationTracking::PerformExtrapolationTracking(int32_t nBlocks, int32_t nThreads, int32_t iBlock, int32_t iThread, const GPUTPCTracker& tracker, GPUsharedref() GPUSharedMemory& smem, GPUTPCTracker& GPUrestrict() sectorTarget, bool right) { - for (int32_t i = iBlock * nThreads + iThread; i < tracker.CommonMemory()->nLocalTracks; i += nThreads * nBlocks) { - { - const int32_t tmpHit = tracker.Tracks()[i].FirstHitID(); - if (tracker.TrackHits()[tmpHit].RowIndex() >= tracker.Param().rec.tpc.extrapolationTrackingMinRows && tracker.TrackHits()[tmpHit].RowIndex() < tracker.Param().rec.tpc.extrapolationTrackingRowRange) { - int32_t rowIndex = tracker.TrackHits()[tmpHit].RowIndex(); - const GPUTPCRow& GPUrestrict() row = tracker.Row(rowIndex); - float Y = (float)tracker.Data().HitDataY(row, tracker.TrackHits()[tmpHit].HitIndex()) * row.HstepY() + row.Grid().YMin(); - if (!right && Y < -row.MaxY() * tracker.Param().rec.tpc.extrapolationTrackingYRangeLower) { - // GPUInfo("Track %d, lower row %d, left border (%f of %f)", i, mTrackHits[tmpHit].RowIndex(), Y, -row.MaxY()); - PerformExtrapolationTrackingRun(sectorTarget, smem, tracker, i, rowIndex, -tracker.Param().dAlpha, -1); - } - if (right && Y > row.MaxY() * tracker.Param().rec.tpc.extrapolationTrackingYRangeLower) { - // GPUInfo("Track %d, lower row %d, right border (%f of %f)", i, mTrackHits[tmpHit].RowIndex(), Y, row.MaxY()); - PerformExtrapolationTrackingRun(sectorTarget, smem, tracker, i, rowIndex, tracker.Param().dAlpha, -1); - } - } - } + uint32_t nExtrapolationCandidates; + int32_t* extrapolationCandidates; + int32_t* direction; + + if (right) { + nExtrapolationCandidates = *tracker.NExtrapolationCandidatesRight(); + extrapolationCandidates = tracker.ExtrapolationCandidatesRight(); + direction = tracker.ExtrapolationCandidatesRightDirection(); + } else { + nExtrapolationCandidates = *tracker.NExtrapolationCandidatesLeft(); + extrapolationCandidates = tracker.ExtrapolationCandidatesLeft(); + direction = tracker.ExtrapolationCandidatesLeftDirection(); + } - { - const int32_t tmpHit = tracker.Tracks()[i].FirstHitID() + tracker.Tracks()[i].NHits() - 1; - if (tracker.TrackHits()[tmpHit].RowIndex() < GPUTPCGeometry::NROWS - tracker.Param().rec.tpc.extrapolationTrackingMinRows && tracker.TrackHits()[tmpHit].RowIndex() >= GPUTPCGeometry::NROWS - tracker.Param().rec.tpc.extrapolationTrackingRowRange) { - int32_t rowIndex = tracker.TrackHits()[tmpHit].RowIndex(); - const GPUTPCRow& GPUrestrict() row = tracker.Row(rowIndex); - float Y = (float)tracker.Data().HitDataY(row, tracker.TrackHits()[tmpHit].HitIndex()) * row.HstepY() + row.Grid().YMin(); - if (!right && Y < -row.MaxY() * tracker.Param().rec.tpc.extrapolationTrackingYRangeUpper) { - // GPUInfo("Track %d, upper row %d, left border (%f of %f)", i, mTrackHits[tmpHit].RowIndex(), Y, -row.MaxY()); - PerformExtrapolationTrackingRun(sectorTarget, smem, tracker, i, rowIndex, -tracker.Param().dAlpha, 1); - } - if (right && Y > row.MaxY() * tracker.Param().rec.tpc.extrapolationTrackingYRangeUpper) { - // GPUInfo("Track %d, upper row %d, right border (%f of %f)", i, mTrackHits[tmpHit].RowIndex(), Y, row.MaxY()); - PerformExtrapolationTrackingRun(sectorTarget, smem, tracker, i, rowIndex, tracker.Param().dAlpha, 1); - } - } - } + for (uint32_t i = iBlock * nThreads + iThread; i < nExtrapolationCandidates; i += nThreads * nBlocks) { + const int32_t localTrackId = extrapolationCandidates[i]; + int32_t rowIndex = tracker.TrackHits()[tracker.Tracks()[localTrackId].FirstHitID() + (direction[i] == 1 ? tracker.Tracks()[localTrackId].NHits() - 1 : 0)].RowIndex(); + float dAlpha = (right ? 1.0f : -1.0f) * tracker.Param().dAlpha; + PerformExtrapolationTrackingRun(sectorTarget, smem, tracker, localTrackId, rowIndex, dAlpha, direction[i]); } } diff --git a/GPU/GPUTracking/SectorTracker/GPUTPCSectorDebugSortKernels.cxx b/GPU/GPUTracking/SectorTracker/GPUTPCSectorDebugSortKernels.cxx index afd90184b60ca..9d657b6b3b8e8 100644 --- a/GPU/GPUTracking/SectorTracker/GPUTPCSectorDebugSortKernels.cxx +++ b/GPU/GPUTracking/SectorTracker/GPUTPCSectorDebugSortKernels.cxx @@ -107,4 +107,14 @@ GPUdii() void GPUTPCSectorDebugSortKernels::ThreadnLocalTracks, sorter); GPUCommonAlgorithm::sortDeviceDynamic(tracker.Tracks() + tracker.CommonMemory()->nLocalTracks, tracker.Tracks() + *tracker.NTracks(), sorter); + + for (int32_t r = 0; r < tracker.CommonMemory()->nLocalTracks; r++) { + tracker.DebugSortedIndex()[tracker.Tracks()[r].LocalTrackId()] = r; + } + for (uint32_t localTrackId = 0; localTrackId < *tracker.NExtrapolationCandidatesRight(); ++localTrackId) { + tracker.ExtrapolationCandidatesRight()[localTrackId] = tracker.DebugSortedIndex()[tracker.ExtrapolationCandidatesRight()[localTrackId]]; + } + for (uint32_t localTrackId = 0; localTrackId < *tracker.NExtrapolationCandidatesLeft(); ++localTrackId) { + tracker.ExtrapolationCandidatesLeft()[localTrackId] = tracker.DebugSortedIndex()[tracker.ExtrapolationCandidatesLeft()[localTrackId]]; + } } diff --git a/GPU/GPUTracking/SectorTracker/GPUTPCTracker.cxx b/GPU/GPUTracking/SectorTracker/GPUTPCTracker.cxx index 5d61a595a83e5..e5d78da4eba49 100644 --- a/GPU/GPUTracking/SectorTracker/GPUTPCTracker.cxx +++ b/GPU/GPUTracking/SectorTracker/GPUTPCTracker.cxx @@ -120,6 +120,13 @@ GPUhd() void* GPUTPCTracker::SetPointersOutput(void* mem) { computePointerWithAlignment(mem, mTracks, mNMaxTracks); computePointerWithAlignment(mem, mTrackHits, mNMaxTrackHits); + if (mRec->GetProcessingSettings().deterministicGPUReconstruction) { + computePointerWithAlignment(mem, mDebugSortedIndex, mNMaxTracks); + } + computePointerWithAlignment(mem, mExtrapolationCandidatesLeft, 2 * mNMaxTracks); + computePointerWithAlignment(mem, mExtrapolationCandidatesRight, 2 * mNMaxTracks); + computePointerWithAlignment(mem, mExtrapolationCandidatesLeftDirection, 2 * mNMaxTracks); + computePointerWithAlignment(mem, mExtrapolationCandidatesRightDirection, 2 * mNMaxTracks); return mem; } diff --git a/GPU/GPUTracking/SectorTracker/GPUTPCTracker.h b/GPU/GPUTracking/SectorTracker/GPUTPCTracker.h index aaf1bff882522..6f850abcf0e56 100644 --- a/GPU/GPUTracking/SectorTracker/GPUTPCTracker.h +++ b/GPU/GPUTracking/SectorTracker/GPUTPCTracker.h @@ -67,6 +67,8 @@ class GPUTPCTracker : public GPUProcessor int32_t nLocalTracks = 0; // number of reconstructed tracks before extrapolation tracking GPUAtomic(uint32_t) nTrackHits = 0; // number of track hits int32_t nLocalTrackHits = 0; // see above + GPUAtomic(uint32_t) nExtrapolationCandidatesLeft = 0; // number of extrapolation candidates for left sector + GPUAtomic(uint32_t) nExtrapolationCandidatesRight = 0; // number of extrapolation candidates for right sector }; GPUhdi() const GPUTPCRow& Row(const GPUTPCHitId& HitId) const { return mData.Row(HitId.RowIndex()); } @@ -191,6 +193,14 @@ class GPUTPCTracker : public GPUProcessor GPUhd() GPUglobalref() GPUTPCTrack* Tracks() const { return mTracks; } GPUhd() GPUglobalref() GPUAtomic(uint32_t) * NTrackHits() const { return &mCommonMem->nTrackHits; } GPUhd() GPUglobalref() GPUTPCHitId* TrackHits() const { return mTrackHits; } + GPUhd() GPUglobalref() int32_t* DebugSortedIndex() const { return mDebugSortedIndex; } + + GPUhd() GPUglobalref() GPUAtomic(uint32_t) * NExtrapolationCandidatesLeft() const { return &mCommonMem->nExtrapolationCandidatesLeft; } + GPUhd() GPUglobalref() GPUAtomic(uint32_t) * NExtrapolationCandidatesRight() const { return &mCommonMem->nExtrapolationCandidatesRight; } + GPUhd() GPUglobalref() int32_t* ExtrapolationCandidatesLeft() const { return mExtrapolationCandidatesLeft; } + GPUhd() GPUglobalref() int32_t* ExtrapolationCandidatesRight() const { return mExtrapolationCandidatesRight; } + GPUhd() GPUglobalref() int32_t* ExtrapolationCandidatesLeftDirection() const { return mExtrapolationCandidatesLeftDirection; } + GPUhd() GPUglobalref() int32_t* ExtrapolationCandidatesRightDirection() const { return mExtrapolationCandidatesRightDirection; } GPUhd() GPUglobalref() GPUTPCRow* TrackingDataRows() const { return (mData.Rows()); } GPUhd() GPUglobalref() int32_t* RowStartHitCountOffset() const { return (mRowStartHitCountOffset); } @@ -242,6 +252,11 @@ class GPUTPCTracker : public GPUProcessor GPUglobalref() calink* mTrackletRowHits = nullptr; // Hits for each Tracklet in each row GPUglobalref() GPUTPCTrack* mTracks = nullptr; // reconstructed tracks GPUglobalref() GPUTPCHitId* mTrackHits = nullptr; // array of track hit numbers + GPUglobalref() int32_t* mDebugSortedIndex = nullptr; // array of the original indices before debugSort + GPUglobalref() int32_t* mExtrapolationCandidatesLeft = nullptr; // array of extrapolation candidates for left sector + GPUglobalref() int32_t* mExtrapolationCandidatesRight = nullptr; // array of extrapolation candidates for right sector + GPUglobalref() int32_t* mExtrapolationCandidatesLeftDirection = nullptr; // array of directions for extrapolation candidates + GPUglobalref() int32_t* mExtrapolationCandidatesRightDirection = nullptr; // array of directions for extrapolation candidates static int32_t StarthitSortComparison(const void* a, const void* b); }; diff --git a/GPU/GPUTracking/SectorTracker/GPUTPCTrackletSelector.cxx b/GPU/GPUTracking/SectorTracker/GPUTPCTrackletSelector.cxx index ae78c36682d84..17d5d2a777229 100644 --- a/GPU/GPUTracking/SectorTracker/GPUTPCTrackletSelector.cxx +++ b/GPU/GPUTracking/SectorTracker/GPUTPCTrackletSelector.cxx @@ -23,6 +23,55 @@ using namespace o2::gpu; static_assert(GPUTPCGeometry::NROWS >= GPUCA_PAR_TRACKLET_SELECTOR_HITS_REG_SIZE); +namespace +{ + +GPUdi() void AtomicAddExtrapolationCandidate(GPUglobalref() int32_t* extrapolationCandidates, GPUglobalref() int32_t* extrapolationCandidatesDirection, GPUglobalref() GPUAtomic(uint32_t) * NExtrapolationCandidates, int32_t localTrackId, int32_t direction) +{ + const uint32_t pos = CAMath::AtomicAdd(NExtrapolationCandidates, 1u); + extrapolationCandidates[pos] = localTrackId; + extrapolationCandidatesDirection[pos] = direction; +} + +GPUdi() void MemorizeExtrapolationCandidates(GPUTPCTracker& GPUrestrict() tracker, int32_t localTrackId) +{ + { + const int32_t tmpHit = tracker.Tracks()[localTrackId].FirstHitID(); + if (tracker.TrackHits()[tmpHit].RowIndex() >= tracker.Param().rec.tpc.extrapolationTrackingMinRows && tracker.TrackHits()[tmpHit].RowIndex() < tracker.Param().rec.tpc.extrapolationTrackingRowRange) { + int32_t rowIndex = tracker.TrackHits()[tmpHit].RowIndex(); + const GPUTPCRow& GPUrestrict() row = tracker.Row(rowIndex); + float Y = (float)tracker.Data().HitDataY(row, tracker.TrackHits()[tmpHit].HitIndex()) * row.HstepY() + row.Grid().YMin(); + if (Y < -row.MaxY() * tracker.Param().rec.tpc.extrapolationTrackingYRangeLower) { + // GPUInfo("Sector %d, Track %d, lower row %d, left border (%f of %f)", tracker.ISector(), localTrackId, rowIndex, Y, -row.MaxY()); + AtomicAddExtrapolationCandidate(tracker.ExtrapolationCandidatesLeft(), tracker.ExtrapolationCandidatesLeftDirection(), tracker.NExtrapolationCandidatesLeft(), localTrackId, -1); + } + if (Y > row.MaxY() * tracker.Param().rec.tpc.extrapolationTrackingYRangeLower) { + // GPUInfo("Sector %d, Track %d, lower row %d, right border (%f of %f)", tracker.ISector(), localTrackId, rowIndex, Y, row.MaxY()); + AtomicAddExtrapolationCandidate(tracker.ExtrapolationCandidatesRight(), tracker.ExtrapolationCandidatesRightDirection(), tracker.NExtrapolationCandidatesRight(), localTrackId, -1); + } + } + } + + { + const int32_t tmpHit = tracker.Tracks()[localTrackId].FirstHitID() + tracker.Tracks()[localTrackId].NHits() - 1; + if (tracker.TrackHits()[tmpHit].RowIndex() < GPUTPCGeometry::NROWS - tracker.Param().rec.tpc.extrapolationTrackingMinRows && tracker.TrackHits()[tmpHit].RowIndex() >= GPUTPCGeometry::NROWS - tracker.Param().rec.tpc.extrapolationTrackingRowRange) { + int32_t rowIndex = tracker.TrackHits()[tmpHit].RowIndex(); + const GPUTPCRow& GPUrestrict() row = tracker.Row(rowIndex); + float Y = (float)tracker.Data().HitDataY(row, tracker.TrackHits()[tmpHit].HitIndex()) * row.HstepY() + row.Grid().YMin(); + if (Y < -row.MaxY() * tracker.Param().rec.tpc.extrapolationTrackingYRangeUpper) { + // GPUInfo("Sector %d, Track %d, upper row %d, left border (%f of %f)", tracker.ISector(), localTrackId, rowIndex, Y, -row.MaxY()); + AtomicAddExtrapolationCandidate(tracker.ExtrapolationCandidatesLeft(), tracker.ExtrapolationCandidatesLeftDirection(), tracker.NExtrapolationCandidatesLeft(), localTrackId, 1); + } + if (Y > row.MaxY() * tracker.Param().rec.tpc.extrapolationTrackingYRangeUpper) { + // GPUInfo("Sector %d, Track %d, upper row %d, right border (%f of %f)", tracker.ISector(), localTrackId, rowIndex, Y, row.MaxY()); + AtomicAddExtrapolationCandidate(tracker.ExtrapolationCandidatesRight(), tracker.ExtrapolationCandidatesRightDirection(), tracker.NExtrapolationCandidatesRight(), localTrackId, 1); + } + } + } +} + +} // namespace + template <> GPUdii() void GPUTPCTrackletSelector::Thread<0>(int32_t nBlocks, int32_t nThreads, int32_t iBlock, int32_t iThread, GPUsharedref() GPUSharedMemory& s, processorType& GPUrestrict() tracker) { @@ -120,6 +169,7 @@ GPUdii() void GPUTPCTrackletSelector::Thread<0>(int32_t nBlocks, int32_t nThread tracker.TrackHits()[nFirstTrackHit + nHits - 1 - jh] = trackHits[jh - GPUCA_PAR_TRACKLET_SELECTOR_HITS_REG_SIZE]; } } + ::MemorizeExtrapolationCandidates(tracker, itrout); } nHits = 0; gap = 0; From ba4ed2c8565ee6cab3d72f5e4bfa6fba61439d7b Mon Sep 17 00:00:00 2001 From: Oliver Rietmann Date: Wed, 25 Nov 2026 16:08:49 +0100 Subject: [PATCH 2/4] GPU TPC: Run extrapolation tracking per edge instead of per TPC sector --- GPU/GPUTracking/Base/GPUConstantMem.h | 9 +++ GPU/GPUTracking/Base/GPUProcessor.h | 3 +- GPU/GPUTracking/Global/GPUChainTracking.h | 4 +- .../Global/GPUChainTrackingSectorTracker.cxx | 49 +++++------- .../GPUTPCExtrapolationTracking.cxx | 79 +++++-------------- .../GPUTPCExtrapolationTracking.h | 6 +- GPU/GPUTracking/kernels.cmake | 2 +- 7 files changed, 55 insertions(+), 97 deletions(-) diff --git a/GPU/GPUTracking/Base/GPUConstantMem.h b/GPU/GPUTracking/Base/GPUConstantMem.h index b18382e976f62..4d1ee91c7b216 100644 --- a/GPU/GPUTracking/Base/GPUConstantMem.h +++ b/GPU/GPUTracking/Base/GPUConstantMem.h @@ -108,6 +108,15 @@ GPUdi() GPUconstantref() const GPUConstantMem* GPUProcessor::GetConstantMem() co #endif } +GPUdi() GPUconstantref() GPUConstantMem* GPUProcessor::GetConstantMem() +{ +#if defined(GPUCA_GPUCODE_DEVICE) && defined(GPUCA_HAS_GLOBAL_SYMBOL_CONSTANT_MEM) + return &GPUCA_CONSMEM; +#else + return mConstantMem; +#endif +} + GPUdi() GPUconstantref() const GPUParam& GPUProcessor::Param() const { return GetConstantMem()->param; diff --git a/GPU/GPUTracking/Base/GPUProcessor.h b/GPU/GPUTracking/Base/GPUProcessor.h index bbc156be88e06..7c32641374b15 100644 --- a/GPU/GPUTracking/Base/GPUProcessor.h +++ b/GPU/GPUTracking/Base/GPUProcessor.h @@ -49,6 +49,7 @@ class GPUProcessor #endif GPUd() GPUconstantref() const GPUConstantMem* GetConstantMem() const; // Body in GPUConstantMem.h to avoid circular headers + GPUd() GPUconstantref() GPUConstantMem* GetConstantMem(); // ... GPUd() GPUconstantref() const GPUParam& Param() const; // ... GPUd() void raiseError(uint32_t code, uint32_t param1 = 0, uint32_t param2 = 0, uint32_t param3 = 0) const; GPUd() bool IsDeviceProcessor() const { return mGPUProcessorType == PROCESSOR_TYPE_DEVICE; } @@ -161,7 +162,7 @@ class GPUProcessor GPUReconstruction* mRec; ProcessorType mGPUProcessorType; GPUProcessor* mLinkedProcessor; - GPUconstantref() const GPUConstantMem* mConstantMem; + GPUconstantref() GPUConstantMem* mConstantMem; private: bool mAllocateAndInitializeLate; diff --git a/GPU/GPUTracking/Global/GPUChainTracking.h b/GPU/GPUTracking/Global/GPUChainTracking.h index 87723cdddd088..6fa980d826ab0 100644 --- a/GPU/GPUTracking/Global/GPUChainTracking.h +++ b/GPU/GPUTracking/Global/GPUChainTracking.h @@ -234,7 +234,7 @@ class GPUChainTracking : public GPUChain GPUChainTracking(GPUReconstruction* rec, uint32_t maxTPCHits = constants::GPU_MEM_MAX_TPC_CLUSTERS, uint32_t maxTRDTracklets = constants::GPU_MEM_MAX_TRD_TRACKLETS); - int32_t ExtrapolationTracking(uint32_t iSector, bool blocking); + int32_t ExtrapolationTracking(uint32_t sectorLeft, uint32_t sectorRight, uint32_t stream); int32_t PrepareProfile(); int32_t DoProfile(); @@ -295,8 +295,6 @@ class GPUChainTracking : public GPUChain // Synchronization and Locks eventStruct* mEvents = nullptr; - std::array mExtrapolationTrackingDone; - std::vector mOutputQueue; private: diff --git a/GPU/GPUTracking/Global/GPUChainTrackingSectorTracker.cxx b/GPU/GPUTracking/Global/GPUChainTrackingSectorTracker.cxx index 1f472b380346a..b71d7c7fd637c 100644 --- a/GPU/GPUTracking/Global/GPUChainTrackingSectorTracker.cxx +++ b/GPU/GPUTracking/Global/GPUChainTrackingSectorTracker.cxx @@ -40,14 +40,11 @@ uint32_t GPUChainTracking::StreamForSector(uint32_t sector) const return sector % mRec->NStreams(); } -int32_t GPUChainTracking::ExtrapolationTracking(uint32_t iSector, bool blocking) +int32_t GPUChainTracking::ExtrapolationTracking(uint32_t sectorLeft, uint32_t sectorRight, uint32_t stream) { - const uint32_t stream = StreamForSector(iSector); - runKernel({GetGridBlk(256, stream), {iSector}}); - TransferMemoryResourceLinkToHost(RecoStep::TPCSectorTracking, processors()->tpcTrackers[iSector].MemoryResCommon(), stream); - if (blocking) { - SynchronizeStream(stream); - } + runKernel({GetGridBlk(256, stream), {sectorLeft}}, sectorRight); + TransferMemoryResourceLinkToHost(RecoStep::TPCSectorTracking, processors()->tpcTrackers[sectorLeft].MemoryResCommon(), stream); + TransferMemoryResourceLinkToHost(RecoStep::TPCSectorTracking, processors()->tpcTrackers[sectorRight].MemoryResCommon(), stream); return (0); } @@ -230,25 +227,16 @@ int32_t GPUChainTracking::RunTPCTrackingSectors_internal() if (doGPU || GetProcessingSettings().debugLevel >= 1) { if (param().rec.tpc.extrapolationTracking) { - std::vector blocking(NSECTORS * mRec->NStreams()); - for (uint32_t iSector = 0; iSector < NSECTORS; iSector++) { - for (uint32_t iStream = 0; iStream < mRec->NStreams(); iStream++) { - blocking[iSector * mRec->NStreams() + iStream] = StreamForSector(iSector) == iStream; - } - } - for (uint32_t iSector = 0; iSector < NSECTORS; iSector++) { - uint32_t tmpSector = GPUTPCExtrapolationTracking::ExtrapolationTrackingSectorOrder(iSector); - uint32_t sectorLeft, sectorRight; - GPUTPCExtrapolationTracking::ExtrapolationTrackingSectorLeftRight(tmpSector, sectorLeft, sectorRight); - if (doGPU && !blocking[tmpSector * mRec->NStreams() + StreamForSector(sectorLeft)]) { - StreamWaitForEvents(StreamForSector(tmpSector), &mEvents->sector[sectorLeft]); - blocking[tmpSector * mRec->NStreams() + StreamForSector(sectorLeft)] = true; - } - if (doGPU && !blocking[tmpSector * mRec->NStreams() + StreamForSector(sectorRight)]) { - StreamWaitForEvents(StreamForSector(tmpSector), &mEvents->sector[sectorRight]); - blocking[tmpSector * mRec->NStreams() + StreamForSector(sectorRight)] = true; - } - ExtrapolationTracking(tmpSector, false); + uint32_t nSectorsHalf = NSECTORS / 2; + for (uint32_t leftSector = 0; leftSector < nSectorsHalf; leftSector++) { + uint32_t rightSector = (leftSector + 1) % nSectorsHalf; + uint32_t stream = StreamForSector(leftSector); + StreamWaitForEvents(stream, &mEvents->sector[rightSector]); + ExtrapolationTracking(leftSector, rightSector, stream); + + stream = StreamForSector(leftSector + nSectorsHalf); + StreamWaitForEvents(stream, &mEvents->sector[rightSector + nSectorsHalf]); + ExtrapolationTracking(leftSector + nSectorsHalf, rightSector + nSectorsHalf, stream); } } if (doGPU) { @@ -258,9 +246,14 @@ int32_t GPUChainTracking::RunTPCTrackingSectors_internal() } } } else { - mRec->runParallelOuterLoop(doGPU, NSECTORS, [&](uint32_t iSector) { + mRec->runParallelOuterLoop(doGPU, NSECTORS, [&](uint32_t leftSector) { if (param().rec.tpc.extrapolationTracking) { - ExtrapolationTracking(iSector, true); + uint32_t nSectorsHalf = NSECTORS / 2; + uint32_t rightSector = (leftSector + 1) % nSectorsHalf; + if (leftSector >= nSectorsHalf) { + rightSector += nSectorsHalf; + } + ExtrapolationTracking(leftSector, rightSector, StreamForSector(leftSector)); } }); mRec->SetNActiveThreadsOuterLoop(1); diff --git a/GPU/GPUTracking/SectorTracker/GPUTPCExtrapolationTracking.cxx b/GPU/GPUTracking/SectorTracker/GPUTPCExtrapolationTracking.cxx index c0fb6daf933c5..4a57e45db8b17 100644 --- a/GPU/GPUTracking/SectorTracker/GPUTPCExtrapolationTracking.cxx +++ b/GPU/GPUTracking/SectorTracker/GPUTPCExtrapolationTracking.cxx @@ -118,69 +118,30 @@ GPUd() int32_t GPUTPCExtrapolationTracking::PerformExtrapolationTrackingRun(GPUT return (nHits >= tracker.Param().rec.tpc.extrapolationTrackingMinHits); } -GPUd() void GPUTPCExtrapolationTracking::PerformExtrapolationTracking(int32_t nBlocks, int32_t nThreads, int32_t iBlock, int32_t iThread, const GPUTPCTracker& tracker, GPUsharedref() GPUSharedMemory& smem, GPUTPCTracker& GPUrestrict() sectorTarget, bool right) -{ - uint32_t nExtrapolationCandidates; - int32_t* extrapolationCandidates; - int32_t* direction; - - if (right) { - nExtrapolationCandidates = *tracker.NExtrapolationCandidatesRight(); - extrapolationCandidates = tracker.ExtrapolationCandidatesRight(); - direction = tracker.ExtrapolationCandidatesRightDirection(); - } else { - nExtrapolationCandidates = *tracker.NExtrapolationCandidatesLeft(); - extrapolationCandidates = tracker.ExtrapolationCandidatesLeft(); - direction = tracker.ExtrapolationCandidatesLeftDirection(); - } - - for (uint32_t i = iBlock * nThreads + iThread; i < nExtrapolationCandidates; i += nThreads * nBlocks) { - const int32_t localTrackId = extrapolationCandidates[i]; - int32_t rowIndex = tracker.TrackHits()[tracker.Tracks()[localTrackId].FirstHitID() + (direction[i] == 1 ? tracker.Tracks()[localTrackId].NHits() - 1 : 0)].RowIndex(); - float dAlpha = (right ? 1.0f : -1.0f) * tracker.Param().dAlpha; - PerformExtrapolationTrackingRun(sectorTarget, smem, tracker, localTrackId, rowIndex, dAlpha, direction[i]); - } -} - template <> -GPUdii() void GPUTPCExtrapolationTracking::Thread<0>(int32_t nBlocks, int32_t nThreads, int32_t iBlock, int32_t iThread, GPUsharedref() GPUSharedMemory& smem, processorType& GPUrestrict() tracker) +GPUdii() void GPUTPCExtrapolationTracking::Thread<0>(int32_t nBlocks, int32_t nThreads, int32_t iBlock, int32_t iThread, GPUsharedref() GPUSharedMemory& smem, processorType& GPUrestrict() leftSector, int32_t iRightSector) { - GPUCA_SHARED_CACHE(&smem.mRows[0], tracker.TrackingDataRows(), GPUTPCGeometry::NROWS * sizeof(GPUTPCRow)); - GPUbarrier(); + GPUTPCTracker& GPUrestrict() rightSector = leftSector.GetConstantMem()->tpcTrackers[iRightSector]; + uint32_t leftToRightCandidates = *leftSector.NExtrapolationCandidatesRight(); + uint32_t leftToRightCandidatesPadded = ((leftToRightCandidates + nThreads - 1) / nThreads) * nThreads; - if (tracker.NHitsTotal() == 0) { - return; - } - const uint32_t iSector = tracker.ISector(); - uint32_t sectorLeft = (iSector + (GPUTPCGeometry::NSECTORS / 2 - 1)) % (GPUTPCGeometry::NSECTORS / 2); - uint32_t sectorRight = (iSector + 1) % (GPUTPCGeometry::NSECTORS / 2); - if (iSector >= (int32_t)GPUTPCGeometry::NSECTORS / 2) { - sectorLeft += GPUTPCGeometry::NSECTORS / 2; - sectorRight += GPUTPCGeometry::NSECTORS / 2; - } - PerformExtrapolationTracking(nBlocks, nThreads, iBlock, iThread, tracker.GetConstantMem()->tpcTrackers[sectorLeft], smem, tracker, true); - PerformExtrapolationTracking(nBlocks, nThreads, iBlock, iThread, tracker.GetConstantMem()->tpcTrackers[sectorRight], smem, tracker, false); -} - -GPUd() int32_t GPUTPCExtrapolationTracking::ExtrapolationTrackingSectorOrder(int32_t iSector) -{ - iSector++; - if (iSector == GPUTPCGeometry::NSECTORS / 2) { - iSector = 0; - } - if (iSector == GPUTPCGeometry::NSECTORS) { - iSector = GPUTPCGeometry::NSECTORS / 2; - } - return iSector; -} + GPUCA_SHARED_CACHE(&smem.mRows[0], ((iBlock * nThreads) < (int32_t)leftToRightCandidatesPadded ? rightSector : leftSector).TrackingDataRows(), GPUTPCGeometry::NROWS * sizeof(GPUTPCRow)); + GPUbarrier(); -GPUd() void GPUTPCExtrapolationTracking::ExtrapolationTrackingSectorLeftRight(uint32_t iSector, uint32_t& left, uint32_t& right) -{ - left = (iSector + (GPUTPCGeometry::NSECTORS / 2 - 1)) % (GPUTPCGeometry::NSECTORS / 2); - right = (iSector + 1) % (GPUTPCGeometry::NSECTORS / 2); - if (iSector >= (int32_t)GPUTPCGeometry::NSECTORS / 2) { - left += GPUTPCGeometry::NSECTORS / 2; - right += GPUTPCGeometry::NSECTORS / 2; + for (uint32_t i = iBlock * nThreads + iThread; i < leftToRightCandidatesPadded + *rightSector.NExtrapolationCandidatesLeft(); i += nThreads * nBlocks) { + if (i < leftToRightCandidates && rightSector.NHitsTotal() != 0) { + // Extrapolate from left sector to right sector + const int32_t localTrackId = leftSector.ExtrapolationCandidatesRight()[i]; + const int32_t direction = leftSector.ExtrapolationCandidatesRightDirection()[i]; + int32_t rowIndex = leftSector.TrackHits()[leftSector.Tracks()[localTrackId].FirstHitID() + (direction == 1 ? leftSector.Tracks()[localTrackId].NHits() - 1 : 0)].RowIndex(); + PerformExtrapolationTrackingRun(rightSector, smem, leftSector, localTrackId, rowIndex, leftSector.Param().dAlpha, direction); + } else if (i >= leftToRightCandidatesPadded && leftSector.NHitsTotal() != 0) { + // Extrapolate from right sector to left sector + const int32_t localTrackId = rightSector.ExtrapolationCandidatesLeft()[i - leftToRightCandidatesPadded]; + const int32_t direction = rightSector.ExtrapolationCandidatesLeftDirection()[i - leftToRightCandidatesPadded]; + int32_t rowIndex = rightSector.TrackHits()[rightSector.Tracks()[localTrackId].FirstHitID() + (direction == 1 ? rightSector.Tracks()[localTrackId].NHits() - 1 : 0)].RowIndex(); + PerformExtrapolationTrackingRun(leftSector, smem, rightSector, localTrackId, rowIndex, -rightSector.Param().dAlpha, direction); + } } } diff --git a/GPU/GPUTracking/SectorTracker/GPUTPCExtrapolationTracking.h b/GPU/GPUTracking/SectorTracker/GPUTPCExtrapolationTracking.h index d7b012653c75f..ad5701107a9c5 100644 --- a/GPU/GPUTracking/SectorTracker/GPUTPCExtrapolationTracking.h +++ b/GPU/GPUTracking/SectorTracker/GPUTPCExtrapolationTracking.h @@ -36,14 +36,10 @@ class GPUTPCExtrapolationTracking : public GPUKernelTemplate return processors.tpcTrackers; } template - GPUd() static void Thread(int32_t nBlocks, int32_t nThreads, int32_t iBlock, int32_t iThread, GPUsharedref() GPUSharedMemory& smem, processorType& tracker); - - GPUd() static int32_t ExtrapolationTrackingSectorOrder(int32_t iSector); - GPUd() static void ExtrapolationTrackingSectorLeftRight(uint32_t iSector, uint32_t& left, uint32_t& right); + GPUd() static void Thread(int32_t nBlocks, int32_t nThreads, int32_t iBlock, int32_t iThread, GPUsharedref() GPUSharedMemory& smem, processorType& leftSector, int32_t iRightSector); private: GPUd() static int32_t PerformExtrapolationTrackingRun(GPUTPCTracker& tracker, GPUsharedref() GPUSharedMemory& smem, const GPUTPCTracker& sectorSource, int32_t iTrack, int32_t rowIndex, float angle, int32_t direction); - GPUd() static void PerformExtrapolationTracking(int32_t nBlocks, int32_t nThreads, int32_t iBlock, int32_t iThread, const GPUTPCTracker& tracker, GPUsharedref() GPUSharedMemory& smem, GPUTPCTracker& sectorTarget, bool right); }; class GPUTPCExtrapolationTrackingCopyNumbers : public GPUKernelTemplate diff --git a/GPU/GPUTracking/kernels.cmake b/GPU/GPUTracking/kernels.cmake index 0e95c09a3ef78..b611914c21628 100644 --- a/GPU/GPUTracking/kernels.cmake +++ b/GPU/GPUTracking/kernels.cmake @@ -39,7 +39,7 @@ o2_gpu_add_kernel("GPUTPCTrackletSelector" "= TPC o2_gpu_add_kernel("GPUMemClean16" "GPUGeneralKernels" NO void* ptr uint64_t size) o2_gpu_add_kernel("GPUitoa" "GPUGeneralKernels" NO int32_t* ptr uint64_t size) o2_gpu_add_kernel("GPUTPCExtrapolationTrackingCopyNumbers" "GPUTPCExtrapolationTracking TPCTRACKER" NO int32_t n) -o2_gpu_add_kernel("GPUTPCExtrapolationTracking" "= TPCTRACKER TPCTRACKLETCONS" LB) +o2_gpu_add_kernel("GPUTPCExtrapolationTracking" "= TPCTRACKER TPCTRACKLETCONS" LB int32_t iSectorSource) o2_gpu_add_kernel("GPUTPCCreateTrackingData" "= TPCTRACKER TPCSECTORDATA" LB) o2_gpu_add_kernel("GPUTPCSectorDebugSortKernels, hitData" "= TPCTRACKER") o2_gpu_add_kernel("GPUTPCSectorDebugSortKernels, startHits" "= TPCTRACKER") From 06eb19fa7dcb73ea8344c91a01069d85384e4e09 Mon Sep 17 00:00:00 2001 From: Oliver Rietmann Date: Wed, 25 Nov 2026 16:08:59 +0100 Subject: [PATCH 3/4] GPU TPC: Use 6 streams by default and assign them differently to the TPC sectors --- GPU/GPUTracking/Base/GPUReconstruction.cxx | 10 ++++++++++ GPU/GPUTracking/Base/GPUReconstruction.h | 1 + .../Definitions/GPUSettingsList.template | 2 +- GPU/GPUTracking/Global/GPUChainTracking.h | 1 - .../Global/GPUChainTrackingSectorTracker.cxx | 13 ++++--------- GPU/GPUTracking/SectorTracker/GPUTPCTracker.cxx | 6 +++--- 6 files changed, 19 insertions(+), 14 deletions(-) diff --git a/GPU/GPUTracking/Base/GPUReconstruction.cxx b/GPU/GPUTracking/Base/GPUReconstruction.cxx index 904db3c9c0065..471f10180110d 100644 --- a/GPU/GPUTracking/Base/GPUReconstruction.cxx +++ b/GPU/GPUTracking/Base/GPUReconstruction.cxx @@ -478,6 +478,16 @@ int32_t GPUReconstruction::Exit() void GPUReconstruction::RegisterGPUDeviceProcessor(GPUProcessor* proc, GPUProcessor* slaveProcessor) { proc->InitGPUProcessor(this, GPUProcessor::PROCESSOR_TYPE_DEVICE, slaveProcessor); } void GPUReconstruction::ConstructGPUProcessor(GPUProcessor* proc) { proc->mConstantMem = proc->mGPUProcessorType == GPUProcessor::PROCESSOR_TYPE_DEVICE ? mDeviceConstantMem : mHostConstantMem.get(); } +uint32_t GPUReconstruction::StreamForSector(uint32_t sector) const +{ + if (mNStreams % 2 == 0 && mNStreams > 1) { + uint32_t nStreamsHalf = mNStreams / 2; + return sector % nStreamsHalf + (2 * sector < NSECTORS ? 0 : nStreamsHalf); + } else { + return sector % mNStreams; + } +} + void GPUReconstruction::ComputeReuseMax(GPUProcessor* proc) { for (auto it = mMemoryReuse1to1.begin(); it != mMemoryReuse1to1.end(); it++) { diff --git a/GPU/GPUTracking/Base/GPUReconstruction.h b/GPU/GPUTracking/Base/GPUReconstruction.h index c94b66a9a5cc5..194dcbe2e761c 100644 --- a/GPU/GPUTracking/Base/GPUReconstruction.h +++ b/GPU/GPUTracking/Base/GPUReconstruction.h @@ -224,6 +224,7 @@ class GPUReconstruction void SetInputControl(void* ptr, size_t size); GPUOutputControl& OutputControl() { return mOutputControl; } uint32_t NStreams() const { return mNStreams; } + uint32_t StreamForSector(uint32_t sector) const; const void* DeviceMemoryBase() const { return mDeviceMemoryBase; } virtual const GPUDefParameters& getGPUParameters(bool doGPU) const = 0; diff --git a/GPU/GPUTracking/Definitions/GPUSettingsList.template b/GPU/GPUTracking/Definitions/GPUSettingsList.template index 9c744433877fb..cbab410db5e58 100644 --- a/GPU/GPUTracking/Definitions/GPUSettingsList.template +++ b/GPU/GPUTracking/Definitions/GPUSettingsList.template @@ -393,7 +393,7 @@ AddOption(nHostThreads, int32_t, -1, "nThreads", 't', "Number of host threads to AddOption(ompThreads, int32_t, -1, "", 0, "Deprecated synonym for nHostThreads") AddOption(inKernelParallel, uint8_t, 2, "", 0, "Parallelize with multi-threading inside kernels on the host instead of over TPC sectors: 0 disable, 1 full and exclusive in-kernel parallelization, 2 for nested parallelization over TPC sectors (nTPCClustererLanes thread-groups) and inside kernels") AddOption(autoAdjustHostThreads, bool, true, "", 0, "Auto-adjust number of OMP threads, decreasing the number for small input data") -AddOption(nStreams, int8_t, 8, "", 0, "Number of GPU streams / command queues") +AddOption(nStreams, int8_t, 6, "", 0, "Number of GPU streams / command queues") AddOption(nTPCClustererLanes, int8_t, -1, "", 0, "Number of TPC clusterers that can run in parallel (-1 = autoset)") AddOption(overrideClusterizerFragmentLen, int32_t, -1, "", 0, "Force the cluster max fragment len to a certain value (-1 = autodetect)") AddOption(delayedOutput, bool, true, "", 0, "Delay output to be parallel to track fit") diff --git a/GPU/GPUTracking/Global/GPUChainTracking.h b/GPU/GPUTracking/Global/GPUChainTracking.h index 6fa980d826ab0..0ee3a61d92b3b 100644 --- a/GPU/GPUTracking/Global/GPUChainTracking.h +++ b/GPU/GPUTracking/Global/GPUChainTracking.h @@ -319,7 +319,6 @@ class GPUChainTracking : public GPUChain void SortClusters(bool buildNativeGPU, bool propagateMCLabels, o2::tpc::ClusterNativeAccess* clusterAccess, o2::tpc::ClusterNative* clusters); template int32_t RunTRDTrackingInternal(); - uint32_t StreamForSector(uint32_t sector) const; // Debug void DoDebugMergerNClDump(const GPUTPCGMMerger& merger); diff --git a/GPU/GPUTracking/Global/GPUChainTrackingSectorTracker.cxx b/GPU/GPUTracking/Global/GPUChainTrackingSectorTracker.cxx index b71d7c7fd637c..4bc99821c3906 100644 --- a/GPU/GPUTracking/Global/GPUChainTrackingSectorTracker.cxx +++ b/GPU/GPUTracking/Global/GPUChainTrackingSectorTracker.cxx @@ -35,11 +35,6 @@ using namespace o2::gpu; -uint32_t GPUChainTracking::StreamForSector(uint32_t sector) const -{ - return sector % mRec->NStreams(); -} - int32_t GPUChainTracking::ExtrapolationTracking(uint32_t sectorLeft, uint32_t sectorRight, uint32_t stream) { runKernel({GetGridBlk(256, stream), {sectorLeft}}, sectorRight); @@ -142,7 +137,7 @@ int32_t GPUChainTracking::RunTPCTrackingSectors_internal() mRec->runParallelOuterLoop(doGPU, NSECTORS, [&](uint32_t iSector) { GPUTPCTracker& trk = processors()->tpcTrackers[iSector]; GPUTPCTracker& trkShadow = doGPU ? processorsShadow()->tpcTrackers[iSector] : trk; - int32_t useStream = StreamForSector(iSector); + int32_t useStream = mRec->StreamForSector(iSector); if (GetProcessingSettings().debugLevel >= 3) { GPUInfo("Creating Sector Data (Sector %d)", iSector); @@ -230,11 +225,11 @@ int32_t GPUChainTracking::RunTPCTrackingSectors_internal() uint32_t nSectorsHalf = NSECTORS / 2; for (uint32_t leftSector = 0; leftSector < nSectorsHalf; leftSector++) { uint32_t rightSector = (leftSector + 1) % nSectorsHalf; - uint32_t stream = StreamForSector(leftSector); + uint32_t stream = mRec->StreamForSector(leftSector); StreamWaitForEvents(stream, &mEvents->sector[rightSector]); ExtrapolationTracking(leftSector, rightSector, stream); - stream = StreamForSector(leftSector + nSectorsHalf); + stream = mRec->StreamForSector(leftSector + nSectorsHalf); StreamWaitForEvents(stream, &mEvents->sector[rightSector + nSectorsHalf]); ExtrapolationTracking(leftSector + nSectorsHalf, rightSector + nSectorsHalf, stream); } @@ -253,7 +248,7 @@ int32_t GPUChainTracking::RunTPCTrackingSectors_internal() if (leftSector >= nSectorsHalf) { rightSector += nSectorsHalf; } - ExtrapolationTracking(leftSector, rightSector, StreamForSector(leftSector)); + ExtrapolationTracking(leftSector, rightSector, mRec->StreamForSector(leftSector)); } }); mRec->SetNActiveThreadsOuterLoop(1); diff --git a/GPU/GPUTracking/SectorTracker/GPUTPCTracker.cxx b/GPU/GPUTracking/SectorTracker/GPUTPCTracker.cxx index e5d78da4eba49..e23bc11e0adbb 100644 --- a/GPU/GPUTracking/SectorTracker/GPUTPCTracker.cxx +++ b/GPU/GPUTracking/SectorTracker/GPUTPCTracker.cxx @@ -90,12 +90,12 @@ void GPUTPCTracker::RegisterMemoryAllocation() { AllocateAndInitializeLate(); bool reuseCondition = MemoryReuseAllowed(); - GPUMemoryReuse reLinks{reuseCondition, GPUMemoryReuse::REUSE_1TO1, GPUMemoryReuse::TrackerDataLinks, (uint16_t)(mISector % mRec->GetProcessingSettings().nStreams)}; + GPUMemoryReuse reLinks{reuseCondition, GPUMemoryReuse::REUSE_1TO1, GPUMemoryReuse::TrackerDataLinks, (uint16_t)mRec->StreamForSector(mISector)}; mMemoryResLinks = mRec->RegisterMemoryAllocation(this, &GPUTPCTracker::SetPointersDataLinks, GPUMemoryResource::MEMORY_SCRATCH | GPUMemoryResource::MEMORY_STACK, "TPCSectorLinks", reLinks); mMemoryResSectorScratch = mRec->RegisterMemoryAllocation(this, &GPUTPCTracker::SetPointersDataScratch, GPUMemoryResource::MEMORY_SCRATCH | GPUMemoryResource::MEMORY_STACK | GPUMemoryResource::MEMORY_CUSTOM, "TPCSectorScratch"); - GPUMemoryReuse reWeights{reuseCondition, GPUMemoryReuse::REUSE_1TO1, GPUMemoryReuse::TrackerDataWeights, (uint16_t)(mISector % mRec->GetProcessingSettings().nStreams)}; + GPUMemoryReuse reWeights{reuseCondition, GPUMemoryReuse::REUSE_1TO1, GPUMemoryReuse::TrackerDataWeights, (uint16_t)mRec->StreamForSector(mISector)}; mRec->RegisterMemoryAllocation(this, &GPUTPCTracker::SetPointersDataWeights, GPUMemoryResource::MEMORY_SCRATCH | GPUMemoryResource::MEMORY_STACK, "TPCSectorWeights", reWeights); - GPUMemoryReuse reScratch{reuseCondition, GPUMemoryReuse::REUSE_1TO1, GPUMemoryReuse::TrackerScratch, (uint16_t)(mISector % mRec->GetProcessingSettings().nStreams)}; + GPUMemoryReuse reScratch{reuseCondition, GPUMemoryReuse::REUSE_1TO1, GPUMemoryReuse::TrackerScratch, (uint16_t)mRec->StreamForSector(mISector)}; mRec->RegisterMemoryAllocation(this, &GPUTPCTracker::SetPointersScratch, GPUMemoryResource::MEMORY_SCRATCH | GPUMemoryResource::MEMORY_STACK, "TPCTrackerScratch", reScratch); mRec->RegisterMemoryAllocation(this, &GPUTPCTracker::SetPointersScratchHost, GPUMemoryResource::MEMORY_SCRATCH_HOST, "TPCTrackerHost"); mMemoryResCommon = mRec->RegisterMemoryAllocation(this, &GPUTPCTracker::SetPointersCommon, GPUMemoryResource::MEMORY_PERMANENT, "TPCTrackerCommon"); From f9b566574e109a3349f2a2a3b6dc1b62b8f69a85 Mon Sep 17 00:00:00 2001 From: Oliver Rietmann Date: Wed, 25 Nov 2026 16:13:34 +0100 Subject: [PATCH 4/4] GPU TPC: Adapt GPUParamters.csv to changes in extrapolation tracking --- .../Definitions/Parameters/GPUParameters.csv | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/GPU/GPUTracking/Definitions/Parameters/GPUParameters.csv b/GPU/GPUTracking/Definitions/Parameters/GPUParameters.csv index 87336277eadbd..38a556a68a12c 100644 --- a/GPU/GPUTracking/Definitions/Parameters/GPUParameters.csv +++ b/GPU/GPUTracking/Definitions/Parameters/GPUParameters.csv @@ -5,12 +5,12 @@ WARP_SIZE,0,,64,64,32,32,32,32,32,32,32,32,32,32,32,64,32,64,32 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,"[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]", -GPUTPCExtrapolationTracking,256,,"[256, 7]","[256, 2]",,,,,,"[352, 4]","[192, 2]","[896, 1]","[352, 1]",,"[1024, 1]",,896,1024, +GPUTPCCreateTrackingData,256,,"[256, 7]","[192, 2]",,,,,,"[224, 7]",256,"[128, 14]","[128, 6]",,"[64, 21]",,384,"[256, 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, 1]","[128, 32]" +GPUTPCTrackletSelector,256,,"[384, 5]","[192, 10]","[256, 3]","[256, 1]","[256, 3]","[512, 4]","[256, 3]","[288, 3]","[192, 3]","[544, 1]",352,,"[384, 3]",,992,"[64, 16]", +GPUTPCNeighboursFinder,256,,"[192, 8]","[960, 8]",256,256,256,512,256,864,"[640, 1]","[512, 2]","[896, 1]",,"[480, 3]",,992,"[896, 1]", +GPUTPCNeighboursCleaner,256,,"[128, 5]","[384, 9]",256,256,256,256,256,544,512,"[192, 9]","[256, 2]",,"[384, 5]",,672,"[512, 3]", +GPUTPCExtrapolationTracking,256,,"[128, 1]","[128, 1]",,,,,,"[64, 1]","[64, 1]","[64, 1]","[544, 2]",,"[128, 1]",,"[64, 1]","[128, 1]", GPUTRDTrackerKernels_gpuVersion,512,,,,,,,,,512,,512,512,,512,,,512, GPUTPCCreateOccupancyMap_fill,256,,,,,,,,,256,,256,256,,256,,,256, GPUTPCCreateOccupancyMap_fold,256,,,,,,,,,256,,256,256,,256,,,256, @@ -64,8 +64,8 @@ GPUTPCGMMergerMergeLoopers_step1,256,,,,,,,,,256,,256,256,,256,,256,256, GPUTPCGMMergerMergeLoopers_step2,256,,,,,,,,,256,,256,256,,256,,256,256, GPUTPCGMO2Output_prepare,256,,,,,,,,,256,,256,256,,256,,256,256, GPUTPCGMO2Output_output,256,,,,,,,,,256,,256,256,,256,,256,256, -GPUTPCStartHitsFinder,256,,"[1024, 2]","[1024, 7]",256,256,256,256,256,"[224, 1]",512,"[416, 4]",928,,"[320, 5]",,608,"[448, 3]", -GPUTPCStartHitsSorter,256,,"[1024, 5]","[512, 7]",256,256,256,256,256,"[320, 2]","[512, 1]","[864, 1]","[96, 2]",,"[192, 5]",,608,"[448, 1]", +GPUTPCStartHitsFinder,256,,"[1024, 2]","[1024, 7]",256,256,256,256,256,"[224, 1]",512,"[256, 1]","[224, 5]",,"[896, 2]",,"[928, 1]","[256, 5]", +GPUTPCStartHitsSorter,256,,"[1024, 5]","[512, 7]",256,256,256,256,256,"[320, 2]","[512, 1]",640,"[1024, 1]",,"[320, 6]",,928,448, GPUTPCCFCheckPadBaseline,576,,"[576, 2]","[576, 2]",,,,,,"[576, 3]",,"[576, 1]","[576, 1]",,"[576, 2]",,"[576, 2]",576, GPUTPCCFHIPTailConnector,256,,256,256,,,,,,"[224, 2]",,"[320, 5]","[704, 1]",,"[128, 7]",,,"[448, 4]", GPUTPCCFHIPClusterizer,256,,256,256,,,,,,"[288, 5]",,"[480, 3]","[448, 3]",,352,,,"[512, 3]", @@ -111,8 +111,8 @@ AMD_EUS_PER_CU,0,0,4,4,,,,,,,,,,,4,,0,4, SORT_STARTHITS,1,0,,,,,,,,1,,1,1,,1,,1,1, TPC_MERGER_REBUILD_CONSTRAINED_ROW_MEMORY,0,0,,,,,,,,,,,,,,,,, NEIGHBOURS_FINDER_MAX_NNEIGHUP,6,0,10,4,,,,,,4,4,4,4,,5,,2,5, -NEIGHBOURS_FINDER_UNROLL_GLOBAL,4,0,4,2,,,,,,2,,8,8,,4,,2,2, -NEIGHBOURS_FINDER_UNROLL_SHARED,1,0,0,0,,,,,,1,,1,0,,1,,1,1, +NEIGHBOURS_FINDER_UNROLL_GLOBAL,4,0,4,2,,,,,,2,,8,2,,2,,8,4, +NEIGHBOURS_FINDER_UNROLL_SHARED,1,0,0,0,,,,,,1,,0,1,,0,,1,0, TRACKLET_SELECTOR_HITS_REG_SIZE,12,0,9,27,,,,,,20,20,20,20,,20,,2,20, ALTERNATE_BORDER_SORT,1,0,1,1,,,,,,1,1,1,1,,1,,1,1, SORT_BEFORE_FIT,1,0,1,1,,,,,,1,1,1,1,,1,,1,1,