FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

GPU: Fix setting of GPUCA_SORT_STARTHITS and behavior when it is not set · AliceO2Group/AliceO2@cca0470 · GitHub

Commit cca0470

Browse files
committed
GPU: Fix setting of GPUCA_SORT_STARTHITS and behavior when it is not set
1 parent d32186f commit cca0470

4 files changed

Lines changed: 24 additions & 18 deletions

File tree

‎GPU/Common/GPUDefConstantsAndSettings.h‎

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
#error Invalid Compile Definitions, need to build for either AliRoot or O2 or Standalone
2929
#endif
3030

31-
#define GPUCA_EXTERN_ROW_HITS
3231
#define GPUCA_TRACKLET_SELECTOR_MIN_HITS(QPT) (CAMath::Abs(QPT) > 10 ? 10 : (CAMath::Abs(QPT) > 5 ? 15 : 29)) // Minimum hits should depend on Pt, low Pt tracks can have few hits. 29 Hits default, 15 for < 200 mev, 10 for < 100 mev
3332

3433
#define GPUCA_GLOBAL_TRACKING_RANGE 45 // Number of rows from the upped/lower limit to search for global track candidates in for
@@ -50,8 +49,6 @@
5049
#define GPUCA_MERGER_COV_LIMIT 1000 // Abort fit when y/z cov exceed the limit
5150
#define GPUCA_MIN_TRACK_PT_DEFAULT 0.010 // Default setting for minimum track Pt at some places
5251

53-
#define GPUCA_MAX_SLICE_NTRACK (2 << 24) // Maximum number of tracks per slice (limited by track id format)
54-
5552
#define GPUCA_MAX_SIN_PHI_LOW 0.99f // Must be preprocessor define because c++ pre 11 cannot use static constexpr for initializes
5653
#define GPUCA_MAX_SIN_PHI 0.999f
5754

@@ -70,13 +67,11 @@
7067
#endif
7168
#endif
7269

73-
//#define GPUCA_MERGER_BY_MC_LABEL
74-
#define GPUCA_REPRODUCIBLE_CLUSTER_SORTING
75-
76-
//#define GPUCA_FULL_CLUSTERDATA //Store all cluster information in the cluster data, also those not needed for tracking.
77-
//#define GPUCA_TPC_RAW_PROPAGATE_PAD_ROW_TIME //Propagate Pad, Row, Time cluster information to GM
78-
//#define GPUCA_GM_USE_FULL_FIELD //Use offline magnetic field during GMPropagator prolongation
79-
//#define GPUCA_TPC_USE_STAT_ERROR //Use statistical errors from offline in track fit
70+
//#define GPUCA_MERGER_BY_MC_LABEL // Use MC labels for TPC track merging - for performance studies
71+
//#define GPUCA_FULL_CLUSTERDATA // Store all cluster information in the cluster data, also those not needed for tracking.
72+
//#define GPUCA_TPC_RAW_PROPAGATE_PAD_ROW_TIME // Propagate Pad, Row, Time cluster information to GM
73+
//#define GPUCA_GM_USE_FULL_FIELD // Use offline magnetic field during GMPropagator prolongation
74+
//#define GPUCA_TPC_USE_STAT_ERROR // Use statistical errors from offline in track fit
8075

8176
// clang-format on
8277

‎GPU/Common/GPUDefGPUParameters.h‎

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,13 @@
4040
#define GPUCA_NEIGHBORSFINDER_REGS REG, (GPUCA_THREAD_COUNT_FINDER, 1)
4141
#define GPUCA_NEIGHBOURS_FINDER_MAX_NNEIGHUP 6
4242
#define GPUCA_TRACKLET_SELECTOR_HITS_REG_SIZE 12
43-
//#define GPUCA_USE_TEXTURES
43+
// #define GPUCA_USE_TEXTURES
4444
#elif defined(GPUCA_GPUTYPE_OPENCL)
4545
#elif defined(GPUCA_GPUCODE)
4646
#error GPU TYPE NOT SET
4747
#endif
4848

49+
// Default settings, if not already set for selected GPU type
4950
#ifndef GPUCA_BLOCK_COUNT_CONSTRUCTOR_MULTIPLIER
5051
#define GPUCA_BLOCK_COUNT_CONSTRUCTOR_MULTIPLIER 2
5152
#endif
@@ -91,14 +92,11 @@
9192
#define GPUCA_MAX_THREADS 1024
9293
#define GPUCA_MAX_STREAMS 32
9394

95+
#define GPUCA_EXTERN_ROW_HITS // Store row hits in separate array outside of tracklets
96+
#define GPUCA_SORT_STARTHITS_GPU // Sort the start hits when running on GPU
9497
#define GPUCA_ROWALIGNMENT uint4 // Align Row Hits and Grid
9598

96-
#ifdef GPUCA_USE_TEXTURES
97-
#define GPUCA_TEXTURE_FETCH_CONSTRUCTOR // Fetch data through texture cache
98-
#define GPUCA_TEXTURE_FETCH_NEIGHBORS // Fetch also in Neighbours Finder
99-
#endif
100-
101-
// #define GPUCA_TRACKLET_CONSTRUCTOR_DO_PROFILE // Output Profiling Data for Tracklet Constructor Tracklet Scheduling
99+
// #define GPUCA_TRACKLET_CONSTRUCTOR_DO_PROFILE // Output Profiling Data for Tracklet Constructor Tracklet Scheduling
102100

103101
#define GPUCA_TRACKLET_SELECTOR_SLICE_COUNT 8 // Currently must be smaller than avaiable MultiProcessors on GPU or will result in wrong results
104102

@@ -113,13 +111,24 @@
113111
#define GPUCA_HOST_MEMORY_SIZE ((size_t) 6 * 1024 * 1024 * 1024) // Size of memory allocated on Host
114112
#define GPUCA_GPU_STACK_SIZE ((size_t) 8 * 1024) // Stack size per GPU thread
115113

114+
#define GPUCA_MAX_SLICE_NTRACK (2 << 24) // Maximum number of tracks per slice (limited by track id format)
115+
116116
// #define GPUCA_KERNEL_DEBUGGER_OUTPUT
117117

118118
// Some assertions to make sure out parameters are not invalid
119119
#ifdef GPUCA_NOCOMPAT
120120
static_assert(GPUCA_MAXN > GPUCA_NEIGHBOURS_FINDER_MAX_NNEIGHUP);
121121
#endif
122122

123+
// Derived parameters
124+
#ifdef GPUCA_USE_TEXTURES
125+
#define GPUCA_TEXTURE_FETCH_CONSTRUCTOR // Fetch data through texture cache
126+
#define GPUCA_TEXTURE_FETCH_NEIGHBORS // Fetch also in Neighbours Finder
127+
#endif
128+
#if defined(GPUCA_SORT_STARTHITS_GPU) && defined(GPUCA_GPUCODE)
129+
#define GPUCA_SORT_STARTHITS
130+
#endif
131+
123132
// Error Codes for GPU Tracker
124133
#define GPUCA_ERROR_NONE 0
125134
#define GPUCA_ERROR_ROWSTARTHIT_OVERFLOW 1

‎GPU/GPUTracking/Global/GPUChainTracking.cxx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1207,9 +1207,11 @@ int GPUChainTracking::RunTPCTrackingSlices_internal()
12071207
DoDebugAndDump(RecoStep::TPCSliceTracking, 4, trk, &GPUTPCTracker::DumpLinks, mDebugFile);
12081208

12091209
runKernel<GPUTPCStartHitsFinder>({GPUCA_ROW_COUNT - 6, ThreadCount(), useStream}, {iSlice});
1210+
#ifdef GPUCA_SORT_STARTHITS_GPU
12101211
if (doGPU) {
12111212
runKernel<GPUTPCStartHitsSorter>({BlockCount(), ThreadCount(), useStream}, {iSlice});
12121213
}
1214+
#endif
12131215
DoDebugAndDump(RecoStep::TPCSliceTracking, 32, trk, &GPUTPCTracker::DumpStartHits, mDebugFile);
12141216

12151217
if (GetDeviceProcessingSettings().memoryAllocationStrategy == GPUMemoryResource::ALLOCATION_INDIVIDUAL) {

‎GPU/GPUTracking/SliceTracker/GPUTPCTracker.cxx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ void GPUTPCTracker::SetMaxData(const GPUTrackingInOutPointers& io)
141141
mNMaxTracklets = mRec->MemoryScalers()->NTPCTracklets(mData.NumberOfHits());
142142
mNMaxTracks = mRec->MemoryScalers()->NTPCSectorTracks(mData.NumberOfHits());
143143
mNMaxTrackHits = mRec->MemoryScalers()->NTPCSectorTrackHits(mData.NumberOfHits());
144-
#ifdef GPUCA_SORT_STARTHITS
144+
#ifdef GPUCA_SORT_STARTHITS_GPU
145145
if (mRec->IsGPU()) {
146146
if (mNMaxStartHits > mNMaxRowStartHits * GPUCA_ROW_COUNT) {
147147
mNMaxStartHits = mNMaxRowStartHits * GPUCA_ROW_COUNT;

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL