Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions GPU/GPUTracking/Base/GPUMemoryResource.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ struct GPUMemoryReuse {
};
enum Group : uint16_t {
ClustererScratch,
ClustererScratchClusters,
NNClusterer,
ClustererZS,
TrackerScratch,
Expand Down
3 changes: 2 additions & 1 deletion GPU/GPUTracking/Global/GPUChainTrackingClusterizer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1367,6 +1367,7 @@ int32_t GPUChainTracking::RunTPCClusterizer(bool synchronizeOutput)

if (doGPU && propagateMCLabels) {
TransferMemoryResourceLinkToHost(RecoStep::TPCClusterFinding, clusterer.mScratchId, lane);
TransferMemoryResourceLinkToHost(RecoStep::TPCClusterFinding, clusterer.mScratchClustersId, lane);
SynchronizeStream(lane);
runKernel<GPUTPCCFClusterizer>({GetGrid(clusterer.mPmemory->counters.nClusters, lane, GPUReconstruction::krnlDeviceType::CPU), {iSector}}, 1); // Computes MC labels
}
Expand All @@ -1382,7 +1383,7 @@ int32_t GPUChainTracking::RunTPCClusterizer(bool synchronizeOutput)
SynchronizeStream(lane);
}
if (doGPU && propagateMCLabels) {
TransferMemoryResourceLinkToHost(RecoStep::TPCClusterFinding, clusterer.mScratchId, lane);
TransferMemoryResourceLinkToHost(RecoStep::TPCClusterFinding, clusterer.mScratchClustersId, lane);
SynchronizeStream(lane);
runKernel<GPUTPCCFHIPClusterizer>({GetGrid(GPUTPCGeometry::NROWS, lane, GPUReconstruction::krnlDeviceType::CPU), {iSector}}, 1); // Computes MC labels
}
Expand Down
7 changes: 6 additions & 1 deletion GPU/GPUTracking/TPCClusterFinder/GPUTPCClusterFinder.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,14 @@ void* GPUTPCClusterFinder::SetPointersScratch(void* mem)
computePointerWithAlignment(mem, mPisPeak, mNMaxDigitsFragment);
computePointerWithAlignment(mem, mPchargeMap, TPCMapMemoryLayout<decltype(*mPchargeMap)>::items(mRec->GetProcessingSettings().overrideClusterizerFragmentLen));
computePointerWithAlignment(mem, mPpeakMap, TPCMapMemoryLayout<decltype(*mPpeakMap)>::items(mRec->GetProcessingSettings().overrideClusterizerFragmentLen));
computePointerWithAlignment(mem, mPclusterByRow, GPUTPCGeometry::NROWS * mNMaxClusterPerRow);
if ((mRec->GetRecoStepsGPU() & gpudatatypes::RecoStep::TPCClusterFinding)) {
computePointerWithAlignment(mem, mPscanBuf, mBufSize * mNBufs);
}
return mem;
}
void* GPUTPCClusterFinder::SetPointersScratchClusters(void* mem)
{
computePointerWithAlignment(mem, mPclusterByRow, GPUTPCGeometry::NROWS * mNMaxClusterPerRow);
// TODO: Use memory scalers for MaxHIPTails.
// NOTE: Always allocate since Param() is not available during size computation.
computePointerWithAlignment(mem, mPhipTailsByRow, GPUTPCGeometry::NROWS * GPUTPCCFHIPClusterizer::MaxHIPTailsPerRow);
Expand All @@ -117,6 +121,7 @@ void GPUTPCClusterFinder::RegisterMemoryAllocation()
scratchType |= GPUMemoryResource::MEMORY_HOST | GPUMemoryResource::MEMORY_GPU;
}
mScratchId = mRec->RegisterMemoryAllocation(this, &GPUTPCClusterFinder::SetPointersScratch, scratchType, "TPCClustererScratch", GPUMemoryReuse{GPUMemoryReuse::REUSE_1TO1, GPUMemoryReuse::ClustererScratch, (uint16_t)(mISector % mRec->GetProcessingSettings().nTPCClustererLanes)});
mScratchClustersId = mRec->RegisterMemoryAllocation(this, &GPUTPCClusterFinder::SetPointersScratchClusters, scratchType, "TPCClustererScratchClusters", GPUMemoryReuse{GPUMemoryReuse::REUSE_1TO1, GPUMemoryReuse::ClustererScratchClusters, (uint16_t)(mISector % mRec->GetProcessingSettings().nTPCClustererLanes)});

mMemoryId = mRec->RegisterMemoryAllocation(this, &GPUTPCClusterFinder::SetPointersMemory, GPUMemoryResource::MEMORY_PERMANENT, "TPCClustererMemory");
mRec->RegisterMemoryAllocation(this, &GPUTPCClusterFinder::SetPointersOutput, GPUMemoryResource::MEMORY_OUTPUT | GPUMemoryResource::MEMORY_STACK, "TPCClustererOutput");
Expand Down
2 changes: 2 additions & 0 deletions GPU/GPUTracking/TPCClusterFinder/GPUTPCClusterFinder.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ class GPUTPCClusterFinder : public GPUProcessor
void* SetPointersInput(void* mem);
void* SetPointersOutput(void* mem);
void* SetPointersScratch(void* mem);
void* SetPointersScratchClusters(void* mem);
void* SetPointersMemory(void* mem);
void* SetPointersZS(void* mem);
void* SetPointersZSOffset(void* mem);
Expand Down Expand Up @@ -140,6 +141,7 @@ class GPUTPCClusterFinder : public GPUProcessor

int16_t mMemoryId = -1;
int16_t mScratchId = -1;
int16_t mScratchClustersId = -1;
int16_t mZSId = -1;
int16_t mZSOffsetId = -1;
int16_t mOutputId = -1;
Expand Down
Loading