Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions GPU/Common/GPUCommonAlgorithm.h
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,11 @@ GPUdi() uint8_t warp_broadcast_FUNC<uint8_t>(uint8_t v, int32_t i)
#define warp_scan_inclusive_add(v) warp_scan_inclusive_add_FUNC(v)
#define warp_broadcast(v, i) warp_broadcast_FUNC(v, i)

[[nodiscard]] GPUdi() int32_t work_group_count(bool pred)
{
return work_group_reduce_add((int32_t)pred);
}

#elif (defined(__CUDACC__) || defined(__HIPCC__))
// CUDA and HIP work the same way using cub, need just different header

Expand Down Expand Up @@ -416,6 +421,16 @@ GPUdi() T warp_broadcast_FUNC(T v, int32_t i)
#endif
}

[[nodiscard]] GPUdi() bool work_group_any(bool pred)
{
return __syncthreads_or(pred);
}

[[nodiscard]] GPUdi() uint32_t work_group_count(bool pred)
{
return __syncthreads_count(pred);
}

#else
// Trivial implementation for the CPU

Expand Down Expand Up @@ -449,6 +464,16 @@ GPUdi() T warp_broadcast(T v, int32_t i)
return v;
}

[[nodiscard]] GPUdi() bool work_group_any(bool pred)
{
return pred;
}

[[nodiscard]] GPUdi() uint32_t work_group_count(bool pred)
{
return pred;
}

#endif

#ifdef GPUCA_ALGORITHM_STD
Expand Down
25 changes: 25 additions & 0 deletions GPU/GPUTracking/DataTypes/GPUTPCExtraADC.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Copyright 2019-2026 CERN and copyright holders of ALICE O2.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
// This software is distributed under the terms of the GNU General Public
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

/// \file GPUTPCExtraADC.h
/// \author Felix Weiglhofer

#include "GPUDefConstantsAndSettings.h"
#include "DataFormatsTPC/Digit.h"
#include <array>
#include <vector>

namespace o2::gpu
{
struct GPUTPCExtraADC {
std::array<std::vector<tpc::Digit>, GPUCA_NSECTORS> digitsBySector;
};
} // namespace o2::gpu
2 changes: 2 additions & 0 deletions GPU/GPUTracking/Definitions/GPUSettingsList.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ AddOptionRTC(trackletMinSharedNormFactor, float, 0.f, "", 0, "Max shared defined
AddOptionRTC(maxTimeBinAboveThresholdIn1000Bin, uint16_t, 500, "", 0, "Except pad from cluster finding if total number of charges in a fragment is above this baseline (disable = 0)")
AddOptionRTC(maxConsecTimeBinAboveThreshold, uint16_t, 200, "", 0, "Except pad from cluster finding if number of consecutive charges in a fragment is above this baseline (disable = 0)")
AddOptionRTC(noisyPadSaturationThreshold, uint16_t, 700, "", 0, "Threshold where a timebin is considered saturated, disabling the noisy pad check for that pad")
AddOptionRTC(hipTailFilter, uint8_t, 0, "", 0, "Enable Highly Ionising Particle tail filter in CheckPadBaseline (0 = disable, 1 = filter tails)")
AddOptionRTC(hipTailFilterThreshold, uint16_t, 150, "", 0, "Threshold that must be exceeded for a timebin to be counted towards Highly Ionising Particle tail")
AddOptionRTC(occupancyMapTimeBins, uint16_t, 16, "", 0, "Number of timebins per histogram bin of occupancy map (0 = disable occupancy map)")
AddOptionRTC(occupancyMapTimeBinsAverage, uint16_t, 0, "", 0, "Number of timebins +/- to use for the averaging")
AddOptionRTC(trackFitCovLimit, uint16_t, 1000, "", 0, "Abort fit when y/z cov exceed the limit")
Expand Down
8 changes: 5 additions & 3 deletions GPU/GPUTracking/Global/GPUChainTracking.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "GPUChain.h"
#include "GPUDataTypesIO.h"
#include "GPUDataTypesConfig.h"
#include <atomic>
#include <mutex>
#include <functional>
#include <array>
Expand Down Expand Up @@ -70,6 +69,7 @@ struct CfFragment;
class GPUTPCClusterFinder;
struct GPUSettingsProcessing;
struct GPUSettingsRec;
struct GPUTPCExtraADC;

class GPUChainTracking : public GPUChain
{
Expand Down Expand Up @@ -302,13 +302,15 @@ class GPUChainTracking : public GPUChain
int32_t RunChainFinalize();
void OutputSanityCheck();
int32_t RunTPCTrackingSectors_internal();
int32_t RunTPCClusterizer_prepare(bool restorePointers);
int32_t RunTPCClusterizer_prepare(bool restorePointers, const GPUTPCExtraADC& extraADCs);
#ifdef GPUCA_TPC_GEOMETRY_O2
std::pair<uint32_t, uint32_t> RunTPCClusterizer_transferZS(int32_t iSector, const CfFragment& fragment, int32_t lane);
std::pair<uint32_t, uint32_t> RunTPCClusterizer_transferZS(int32_t iSector, const CfFragment& fragment, int32_t lane, const GPUTPCExtraADC& extraADCs);
void RunTPCClusterizer_compactPeaks(GPUTPCClusterFinder& clusterer, GPUTPCClusterFinder& clustererShadow, int32_t stage, bool doGPU, int32_t lane);
std::pair<uint32_t, uint32_t> TPCClusterizerDecodeZSCount(uint32_t iSector, const CfFragment& fragment);
std::pair<uint32_t, uint32_t> TPCClusterizerDecodeZSCountUpdate(uint32_t iSector, const CfFragment& fragment);
void TPCClusterizerEnsureZSOffsets(uint32_t iSector, const CfFragment& fragment);
void TPCClusterizerTransferExtraADC(GPUTPCClusterFinder& clusterer, GPUTPCClusterFinder& clustererShadow, int lane, const GPUTPCExtraADC& extraADCs);
void TPCClusterizerCheckExtraADCZeros(GPUTPCClusterFinder& clusterer, GPUTPCClusterFinder& clustererShadow, int lane, const GPUTPCExtraADC& extraADCs);
#endif
void RunTPCTrackingMerger_MergeBorderTracks(int8_t withinSector, int8_t mergeMode, GPUReconstruction::krnlDeviceType deviceType);
void RunTPCTrackingMerger_Resolve(int8_t useOrigTrackParam, int8_t mergeAll, GPUReconstruction::krnlDeviceType deviceType);
Expand Down
Loading
Loading