Skip to content

Commit 671ea46

Browse files
committed
GPU Metal: also run the border-range sorts on the host
The border-range sorts of the track merging between sectors, 360 per time frame, took 312 ms per event on a 30-collision Pb-Pb time frame on a single GPU thread. On the host they take about 6 ms, plus 52 ms of waiting for the streams.
1 parent 9f4d3e2 commit 671ea46

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎GPU/GPUTracking/Base/metal/GPUReconstructionMetalKernelsSpecialize.inc‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,13 @@ inline void GPUReconstructionMetal::runKernelBackend<GPUTPCGMO2Output, GPUTPCGMO
8383
{
8484
SortOnHost(_xyz, mProcessorsShadow->tpcMerger.TrackSortO2(), [&] { return HostPointer(mProcessorsShadow->tpcMerger.Memory())->nO2Tracks; }, internal::GPUTPCGMO2OutputSort_comp());
8585
}
86+
87+
template <>
88+
inline void GPUReconstructionMetal::runKernelBackend<GPUTPCGMMergerMergeBorders, 3>(const krnlSetupTime& _xyz, gputpcgmmergertypes::GPUTPCGMBorderRange* const& range, int32_t const& N, int32_t const& cmpMax)
89+
{
90+
if (cmpMax) {
91+
SortOnHost(_xyz, range, [&] { return N; }, internal::MergeBorderTracks_compMax());
92+
} else {
93+
SortOnHost(_xyz, range, [&] { return N; }, internal::MergeBorderTracks_compMin());
94+
}
95+
}

0 commit comments

Comments
 (0)