Skip to content

Commit c682438

Browse files
committed
GPU TPC: Get rid of duplicate ReadEvent code path for initializing tracking data on CPU
1 parent 22a9b80 commit c682438

File tree

2 files changed

+3
-24
lines changed

2 files changed

+3
-24
lines changed

GPU/GPUTracking/Global/GPUChainTracking.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,6 @@ class GPUChainTracking : public GPUChain
220220

221221
GPUChainTracking(GPUReconstruction* rec, uint32_t maxTPCHits = GPUCA_MAX_CLUSTERS, uint32_t maxTRDTracklets = GPUCA_MAX_TRD_TRACKLETS);
222222

223-
int32_t ReadEvent(uint32_t iSector, int32_t threadId);
224223
void WriteOutput(int32_t iSector, int32_t threadId);
225224
int32_t ExtrapolationTracking(uint32_t iSector, int32_t threadId, bool synchronizeOutput = true);
226225

GPU/GPUTracking/Global/GPUChainTrackingSectorTracker.cxx

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -158,17 +158,9 @@ int32_t GPUChainTracking::RunTPCTrackingSectors_internal()
158158
if (GetProcessingSettings().debugLevel >= 3) {
159159
GPUInfo("Creating Sector Data (Sector %d)", iSector);
160160
}
161-
if (doGPU) {
162-
TransferMemoryResourcesToGPU(RecoStep::TPCSectorTracking, &trk, useStream);
163-
runKernel<GPUTPCCreateTrackingData>({GetGridBlk(GPUCA_ROW_COUNT, useStream), {iSector}, {nullptr, streamInit[useStream] ? nullptr : &mEvents->init}});
164-
streamInit[useStream] = true;
165-
} else {
166-
if (ReadEvent(iSector, 0)) {
167-
GPUError("Error reading event");
168-
error = 1;
169-
return;
170-
}
171-
}
161+
TransferMemoryResourcesToGPU(RecoStep::TPCSectorTracking, &trk, useStream);
162+
runKernel<GPUTPCCreateTrackingData>({doGPU ? GetGridBlk(GPUCA_ROW_COUNT, useStream) : GetGridAuto(0), {iSector}, {nullptr, streamInit[useStream] ? nullptr : &mEvents->init}}); // TODO: Check why GetGridAuto(0) is much fast on CPU
163+
streamInit[useStream] = true;
172164
if (GetProcessingSettings().deterministicGPUReconstruction) {
173165
runKernel<GPUTPCSectorDebugSortKernels, GPUTPCSectorDebugSortKernels::hitData>({GetGridBlk(GPUCA_ROW_COUNT, useStream), {iSector}});
174166
}
@@ -381,18 +373,6 @@ int32_t GPUChainTracking::RunTPCTrackingSectors_internal()
381373
return 0;
382374
}
383375

384-
int32_t GPUChainTracking::ReadEvent(uint32_t iSector, int32_t threadId)
385-
{
386-
if (GetProcessingSettings().debugLevel >= 5) {
387-
GPUInfo("Running ReadEvent for sector %d on thread %d\n", iSector, threadId);
388-
}
389-
runKernel<GPUTPCCreateTrackingData>({{GetGridAuto(0, GPUReconstruction::krnlDeviceType::CPU)}, {iSector}});
390-
if (GetProcessingSettings().debugLevel >= 5) {
391-
GPUInfo("Finished ReadEvent for sector %d on thread %d\n", iSector, threadId);
392-
}
393-
return (0);
394-
}
395-
396376
void GPUChainTracking::WriteOutput(int32_t iSector, int32_t threadId)
397377
{
398378
if (GetProcessingSettings().debugLevel >= 5) {

0 commit comments

Comments
 (0)