Skip to content

Commit 3a1ef33

Browse files
committed
GPU: Remove ITS traits completely from standalone version
1 parent 0ce95a6 commit 3a1ef33

10 files changed

Lines changed: 29 additions & 88 deletions

GPU/GPUTracking/Base/GPUReconstruction.cxx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@
5555
#include "GPUO2InterfaceConfiguration.h"
5656
#endif
5757

58+
#include "GPUReconstructionIncludesITS.h"
59+
5860
namespace GPUCA_NAMESPACE
5961
{
6062
namespace gpu

GPU/GPUTracking/Base/GPUReconstructionIncludes.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@
3434
#include "AliHLTSystem.h"
3535
#endif
3636

37-
#include "GPUReconstructionIncludesITS.h"
38-
3937
#define RANDOM_ERROR
4038
//#define RANDOM_ERROR || rand() % 500 == 1
4139

GPU/GPUTracking/Base/GPUReconstructionIncludesDevice.h

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -105,23 +105,6 @@ using namespace GPUCA_NAMESPACE::gpu;
105105
#include "GPUTrackingRefit.cxx"
106106
#include "GPUTrackingRefitKernel.cxx"
107107

108-
#if !defined(GPUCA_O2_LIB) && defined(__HIPCC__) && !defined(GPUCA_NO_ITS_TRAITS) && !defined(GPUCA_GPUCODE_GENRTC)
109-
#include "VertexerTraitsHIP.hip.cxx"
110-
#include "ContextHIP.hip.cxx"
111-
#include "DeviceStoreVertexerHIP.hip.cxx"
112-
#include "ClusterLinesHIP.hip.cxx"
113-
#include "UtilsHIP.hip.cxx"
114-
#elif !defined(GPUCA_O2_LIB) && defined(__CUDACC__) && !defined(GPUCA_NO_ITS_TRAITS) && !defined(GPUCA_GPUCODE_GENRTC)
115-
#include "TrackerTraitsNV.cu"
116-
#include "VertexerTraitsGPU.cu"
117-
#include "Context.cu"
118-
#include "Stream.cu"
119-
#include "DeviceStoreNV.cu"
120-
#include "DeviceStoreVertexerGPU.cu"
121-
#include "ClusterLinesGPU.cu"
122-
#include "Utils.cu"
123-
#endif // !defined(GPUCA_O2_LIB) && defined(__CUDACC__) && !defined(GPUCA_NO_ITS_TRAITS)
124-
125108
#endif // GPUCA_HAVE_O2HEADERS
126109
#endif // (!defined(__OPENCL__) || defined(__OPENCLCPP__)) && !defined(GPUCA_ALIROOT_LIB)
127110

GPU/GPUTracking/Base/GPUReconstructionIncludesITS.h

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,32 +15,42 @@
1515
#ifndef GPURECONSTRUCTIONINCLDUESITS_H
1616
#define GPURECONSTRUCTIONINCLDUESITS_H
1717

18-
#if defined(GPUCA_HAVE_O2HEADERS) && !defined(GPUCA_NO_ITS_TRAITS)
18+
#if defined(GPUCA_HAVE_O2HEADERS) && !defined(GPUCA_STANDALONE)
1919
#include "ITStracking/TrackerTraits.h"
2020
#include "ITStracking/VertexerTraits.h"
21+
#include "ITStracking/TimeFrame.h"
22+
#if defined(__CUDACC__) || defined(__HIPCC__)
23+
#include "ITStrackingGPU/TrackerTraitsGPU.h"
24+
#include "ITStrackingGPU/VertexerTraitsGPU.h"
25+
#include "ITStrackingGPU/TimeFrameGPU.h"
26+
#endif
2127
#else
22-
namespace o2
28+
namespace o2::its
2329
{
24-
namespace its
30+
class VertexerTraits
2531
{
32+
};
2633
class TrackerTraits
2734
{
2835
};
29-
class TrackerTraitsCPU : public TrackerTraits
36+
class TimeFrame
3037
{
3138
};
32-
class VertexerTraits
39+
class VertexerTraitsGPU : public VertexerTraits
3340
{
3441
};
35-
class TimeFrame
42+
template <int NLayers = 7>
43+
class TrackerTraitsGPU : public TrackerTraits
3644
{
3745
};
38-
} // namespace its
39-
} // namespace o2
40-
#if defined(GPUCA_HAVE_O2HEADERS)
41-
#include "ITStracking/Road.h"
42-
#include "ITStracking/Cluster.h"
43-
#endif
46+
namespace gpu
47+
{
48+
template <int NLayers = 7>
49+
class TimeFrameGPU : public TimeFrame
50+
{
51+
};
52+
} // namespace gpu
53+
} // namespace o2::its
4454
#endif
4555

4656
#endif

GPU/GPUTracking/Base/cuda/GPUReconstructionCUDA.cu

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -36,29 +36,7 @@ __global__ void dummyInitKernel(void*)
3636
{
3737
}
3838

39-
#if defined(GPUCA_HAVE_O2HEADERS) && !defined(GPUCA_NO_ITS_TRAITS)
40-
#include "ITStrackingGPU/TrackerTraitsGPU.h"
41-
#include "ITStrackingGPU/VertexerTraitsGPU.h"
42-
#include "ITStrackingGPU/TimeFrameGPU.h"
43-
#else
44-
namespace o2::its
45-
{
46-
class VertexerTraitsGPU : public VertexerTraits
47-
{
48-
};
49-
template <int NLayers = 7>
50-
class TrackerTraitsGPU : public TrackerTraits
51-
{
52-
};
53-
namespace gpu
54-
{
55-
template <int NLayers = 7>
56-
class TimeFrameGPU : public TimeFrame
57-
{
58-
};
59-
} // namespace gpu
60-
} // namespace o2::its
61-
#endif
39+
#include "GPUReconstructionIncludesITS.h"
6240

6341
GPUReconstructionCUDABackend::GPUReconstructionCUDABackend(const GPUSettingsDeviceBackend& cfg) : GPUReconstructionDeviceBase(cfg, sizeof(GPUReconstructionDeviceBase))
6442
{

GPU/GPUTracking/Base/hip/GPUReconstructionHIP.hip

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -46,28 +46,7 @@ __global__ void gGPUConstantMemBuffer_dummy(int* p) { *p = *(int*)&gGPUConstantM
4646

4747
__global__ void dummyInitKernel(void*) {}
4848

49-
#if defined(GPUCA_HAVE_O2HEADERS) && !defined(GPUCA_NO_ITS_TRAITS)
50-
#include "ITStrackingGPU/VertexerTraitsGPU.h"
51-
#include "ITStrackingGPU/TrackerTraitsGPU.h"
52-
#else
53-
namespace o2::its
54-
{
55-
class VertexerTraitsGPU : public VertexerTraits
56-
{
57-
};
58-
template <int NLayers = 7>
59-
class TrackerTraitsGPU : public TrackerTraits
60-
{
61-
};
62-
namespace gpu
63-
{
64-
template <int NLayers = 7>
65-
class TimeFrameGPU : public TimeFrame
66-
{
67-
};
68-
} // namespace gpu
69-
} // namespace o2::its
70-
#endif
49+
#include "GPUReconstructionIncludesITS.h"
7150

7251
class GPUDebugTiming
7352
{

GPU/GPUTracking/Global/GPUChainITS.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
/// \author David Rohr
1414

1515
#include "GPUChainITS.h"
16-
#include "GPUReconstructionIncludesITS.h"
1716
#include "DataFormatsITS/TrackITS.h"
1817
#include "ITStracking/ExternalAllocator.h"
18+
#include "GPUReconstructionIncludesITS.h"
1919
#include <algorithm>
2020

2121
using namespace GPUCA_NAMESPACE::gpu;
@@ -83,7 +83,7 @@ o2::its::TimeFrame* GPUChainITS::GetITSTimeframe()
8383
if (mITSTimeFrame == nullptr) {
8484
mRec->GetITSTraits(nullptr, nullptr, &mITSTimeFrame);
8585
}
86-
#if defined(GPUCA_HAVE_O2HEADERS) && !defined(GPUCA_NO_ITS_TRAITS) // Do not access ITS traits related classes if not compiled in standalone version
86+
#if !defined(GPUCA_STANDALONE)
8787
if (mITSTimeFrame->mIsGPU) {
8888
auto doFWExtAlloc = [this](size_t size) -> void* { return rec()->AllocateUnmanagedMemory(size, GPUMemoryResource::MEMORY_GPU); };
8989

GPU/GPUTracking/Standalone/CMakeLists.txt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -122,14 +122,6 @@ endif()
122122
if(CONFIG_O2_EXTENSIONS)
123123
add_definitions(-DGPUCA_HAVE_O2HEADERS)
124124
find_package(Microsoft.GSL REQUIRED HINTS "$ENV{MS_GSL_ROOT}/share/cmake")
125-
if(CONFIG_O2_ITS_TRAITS)
126-
if(NOT CONFIG_ROOT)
127-
message(FATAL_ERROR "Can not build ITS traits without ROOT")
128-
endif()
129-
find_package(Boost REQUIRED)
130-
else()
131-
add_definitions(-DGPUCA_NO_ITS_TRAITS)
132-
endif()
133125
endif()
134126

135127
if(CONFIG_FMT)

GPU/GPUTracking/Standalone/cmake/config.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ set(CONFIG_VC 1)
1010
set(CONFIG_FMT 1)
1111
set(CONFIG_ROOT 1)
1212
set(CONFIG_O2_EXTENSIONS 1)
13-
set(CONFIG_O2_ITS_TRAITS 0)
1413
set(BUILD_EVENT_DISPLAY 1)
1514
set(BUILD_EVENT_DISPLAY_FREETYPE 1)
1615
set(BUILD_EVENT_DISPLAY_VULKAN 1)

GPU/GPUTracking/Standalone/tools/rtc/rtcsource.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ nvcc -std=c++17 -gencode arch=compute_75,code=sm_75 -E \
99
-I$HOME/alice/O2/DataFormats/Detectors/TPC/include -I$HOME/alice/O2/Detectors/Base/include -I$HOME/alice/O2/Detectors/Base/src -I$HOME/alice/O2/Common/MathUtils/include -I$HOME/alice/O2/DataFormats/Headers/include \
1010
-I$HOME/alice/O2/Detectors/TRD/base/include -I$HOME/alice/O2/Detectors/TRD/base/src -I$HOME/alice/O2/Detectors/ITSMFT/ITS/tracking/include -I$HOME/alice/O2/Detectors/ITSMFT/ITS/tracking/cuda/include -I$HOME/alice/O2/Common/Constants/include \
1111
-I$HOME/alice/O2/DataFormats/common/include -I$HOME/alice/O2/DataFormats/Detectors/TRD/include -I$HOME/alice/O2/Detectors/Raw/include \
12-
-DGPUCA_HAVE_O2HEADERS -DGPUCA_TPC_GEOMETRY_O2 -DGPUCA_STANDALONE -DGPUCA_NO_ITS_TRAITS -DGPUCA_GPUCODE_GENRTC \
12+
-DGPUCA_HAVE_O2HEADERS -DGPUCA_TPC_GEOMETRY_O2 -DGPUCA_STANDALONE -DGPUCA_GPUCODE_GENRTC \
1313
~/alice/O2/GPU/GPUTracking/Base/cuda/GPUReconstructionCUDArtc.cu \
1414
| sed '1,/^# 1 ".*GPUReconstructionCUDArtcPre.h" 1$/d' \
1515
>> source.cu

0 commit comments

Comments
 (0)