Skip to content

Commit 67482aa

Browse files
committed
ITSGPU: further optimisations
Signed-off-by: Felix Schlepper <felix.schlepper@cern.ch>
1 parent 2ed2a8c commit 67482aa

9 files changed

Lines changed: 244 additions & 91 deletions

File tree

DataFormats/Detectors/ITSMFT/ITS/include/DataFormatsITS/TimeEstBC.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
namespace o2::its
2323
{
2424
// Time estimates are given in BC
25-
// error needs to cover maximum 1 orbit
25+
// error needs to cover maximum 1 orbit (uint16_t), but increased due to 2 byte padding
2626
using TimeStampType = uint32_t;
27-
using TimeStampErrorType = uint16_t;
27+
using TimeStampErrorType = uint32_t;
2828
// this is an symmetric time error [t0-tE, t0+tE]
2929
using TimeStamp = o2::dataformats::TimeStampWithError<float, float>;
3030
// this is an asymmetric time interval [t0, t0+tE] used for internal calculations
@@ -95,7 +95,7 @@ class TimeEstBC : public o2::dataformats::TimeStampWithError<TimeStampType, Time
9595
this->setTimeStampError(static_cast<TimeStampErrorType>(hi - lo));
9696
}
9797

98-
ClassDefNV(TimeEstBC, 1);
98+
ClassDefNV(TimeEstBC, 2);
9999
};
100100

101101
} // namespace o2::its

DataFormats/common/src/CommonDataFormatLinkDef.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#pragma link C++ class o2::dataformats::TimeStampWithError < float, float> + ;
3232
#pragma link C++ class o2::dataformats::TimeStampWithError < double, double> + ;
3333
#pragma link C++ class o2::dataformats::TimeStampWithError < int, int> + ;
34-
#pragma link C++ class o2::dataformats::TimeStampWithError < uint32_t, uint16_t> + ;
34+
#pragma link C++ class o2::dataformats::TimeStampWithError < uint32_t, uint32_t> + ;
3535

3636
#pragma link C++ class o2::dataformats::EvIndex < int, int> + ;
3737
#pragma link C++ class o2::dataformats::RangeReference < int, int> + ;

Detectors/ITSMFT/ITS/tracking/GPU/ITStrackingGPU/TrackingKernels.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ struct TrackingKernels {
101101
const float maxChi2ClusterAttachment,
102102
const float bz,
103103
const unsigned int nCells,
104+
o2::its::ExternalAllocator* alloc,
104105
gpu::Stream& stream);
105106

106107
static void processNeighboursHandler(const int startLevel,

Detectors/ITSMFT/ITS/tracking/GPU/cuda/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ if(CUDA_ENABLED)
3232
set_property(TARGET ${targetName} PROPERTY CUDA_SEPARABLE_COMPILATION ON)
3333
target_compile_options(${targetName} PRIVATE
3434
$<$<COMPILE_LANGUAGE:CUDA>:-diag-error=20014>
35+
$<$<COMPILE_LANGUAGE:CUDA>:-lineinfo>
3536
# $<$<COMPILE_LANGUAGE:CUDA>:-G;-O0;-Xptxas=-O0>
3637
# $<$<COMPILE_LANGUAGE:CXX>:-O0;-g>
3738
)

Detectors/ITSMFT/ITS/tracking/GPU/cuda/TimeFrameGPU.cu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,12 +263,12 @@ void TimeFrameGPU<NLayers>::createUsedClustersDevice(const int layer)
263263
template <int NLayers>
264264
void TimeFrameGPU<NLayers>::loadUsedClustersDevice()
265265
{
266+
GPUTimer timer("loading used clusters flags");
266267
for (auto iLayer{0}; iLayer < NLayers; ++iLayer) {
267-
GPUTimer timer(mGpuStreams[iLayer], "loading used clusters flags", iLayer);
268268
const auto& used = this->mUsedClusters[iLayer];
269269
GPULog("gpu-transfer: loading {} used clusters flags on layer {}, for {:.2f} MB.", used.size(), iLayer, used.size() * sizeof(unsigned char) / constants::MB);
270270
if (!used.empty()) {
271-
GPUChkErrS(cudaMemcpyAsync(mUsedClustersDevice[iLayer], used.data(), used.size() * sizeof(unsigned char), cudaMemcpyHostToDevice, mGpuStreams[iLayer].get()));
271+
GPUChkErrS(cudaMemcpyAsync(mUsedClustersDevice[iLayer], used.data(), used.size() * sizeof(unsigned char), cudaMemcpyHostToDevice, Stream::DefaultStream));
272272
}
273273
}
274274
}

Detectors/ITSMFT/ITS/tracking/GPU/cuda/TrackerTraitsGPU.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ void TrackerTraitsGPU<NLayers>::findCellsNeighbours(const int iteration)
242242
this->mTrkParams[iteration].MaxChi2ClusterAttachment,
243243
this->mBz,
244244
mTimeFrameGPU->getNCells()[sourceCellTopologyId],
245+
mTimeFrameGPU->getFrameworkAllocator(),
245246
stream);
246247
}
247248
return finalizeCellNeighboursHandler(mTimeFrameGPU->getDeviceNeighbours(targetCellTopologyId),

Detectors/ITSMFT/ITS/tracking/GPU/cuda/TrackingKernels.cu

Lines changed: 232 additions & 83 deletions
Large diffs are not rendered by default.

Detectors/ITSMFT/ITS/tracking/include/ITStracking/CapacityEstimator.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,14 @@ enum SlabSite : uint8_t {
2929
Tracklets = 0,
3030
Cells,
3131
Neighbours,
32+
RoadCandidates,
3233
Roads,
3334
TrackSeeds,
3435
TracksExtended,
3536
Tracks,
3637
NSlabSite,
3738
};
38-
constexpr const char* const SlabSiteNames[SlabSite::NSlabSite]{"Tracklets", "Cells", "Neighbours", "Roads", "TrackSeeds", "TracksExtended", "Tracks"};
39+
constexpr const char* const SlabSiteNames[SlabSite::NSlabSite]{"Tracklets", "Cells", "Neighbours", "RoadCandidates", "Roads", "TrackSeeds", "TracksExtended", "Tracks"};
3940

4041
class CapacityEstimator
4142
{

Detectors/ITSMFT/ITS/tracking/include/ITStracking/Tracklet.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ struct Tracklet final {
6565
int secondClusterIndex{constants::UnusedIndex};
6666
float tanLambda{constants::UnsetValue};
6767
float phi{constants::UnsetValue};
68-
TimeEstBC mTime;
68+
TimeEstBC mTime{};
6969

7070
ClassDefNV(Tracklet, 1);
7171
};

0 commit comments

Comments
 (0)