Skip to content

Commit d540b75

Browse files
committed
GPU: Fix memoryScalingFactor not applied for TPC compression unattached clusters
1 parent 53d76dd commit d540b75

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

GPU/GPUTracking/DataCompression/GPUTPCCompression.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ void GPUTPCCompression::RegisterMemoryAllocation()
117117
void GPUTPCCompression::SetMaxData(const GPUTrackingInOutPointers& io)
118118
{
119119
mMaxClusters = io.clustersNative->nClustersTotal;
120-
mMaxClusterFactorBase1024 = mMaxClusters > 100000000 ? mRec->MemoryScalers()->tpcCompressedUnattachedHitsBase1024[mRec->GetParam().rec.tpc.rejectionStrategy] : 1024;
120+
mMaxClusterFactorBase1024 = mMaxClusters > 100000000 ? mRec->MemoryScalers()->NTPCUnattachedHitsBase1024(mRec->GetParam().rec.tpc.rejectionStrategy) : 1024;
121121
mMaxClustersInCache = mMaxClusters * mMaxClusterFactorBase1024 / 1024;
122122
mMaxTrackClusters = mRec->GetConstantMem().tpcMerger.NOutputTrackClusters();
123123
mMaxTracks = mRec->GetConstantMem().tpcMerger.NOutputTracks();

GPU/GPUTracking/DataTypes/GPUMemorySizeScalers.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ struct GPUMemorySizeScalers {
7979
inline size_t NTPCSectorTrackHits(size_t tpcHits) { return getValue(tpcMaxSectorTrackHits, tpcHits * tpcSectorTrackHitsPerHit); }
8080
inline size_t NTPCMergedTracks(size_t tpcSliceTracks) { return getValue(tpcMaxMergedTracks, tpcSliceTracks * tpcMergedTrackPerSliceTrack); }
8181
inline size_t NTPCMergedTrackHits(size_t tpcSliceTrackHitss) { return getValue(tpcMaxMergedTrackHits, tpcSliceTrackHitss * tpcMergedTrackHitPerSliceHit); }
82+
inline size_t NTPCUnattachedHitsBase1024(int type) { return returnMaxVal ? 1024 : std::min<size_t>(1024, tpcCompressedUnattachedHitsBase1024[type] * factor * temporaryFactor); }
8283
};
8384

8485
} // namespace GPUCA_NAMESPACE::gpu

0 commit comments

Comments
 (0)