From 05825553962ff9e37e4bc8f3578c6bd7829d686d Mon Sep 17 00:00:00 2001 From: David Rohr Date: Fri, 1 Mar 2024 09:36:00 +0100 Subject: [PATCH] GPU ITS: Remove all bloat that is pulled in from GPUReconstruction internals unnecessarily --- .../ITS/tracking/GPU/cuda/CMakeLists.txt | 23 ++----------- .../ITS/tracking/GPU/cuda/TimeFrameGPU.cu | 19 ----------- .../ITS/tracking/GPU/cuda/TrackingKernels.cu | 34 ++----------------- 3 files changed, 4 insertions(+), 72 deletions(-) diff --git a/Detectors/ITSMFT/ITS/tracking/GPU/cuda/CMakeLists.txt b/Detectors/ITSMFT/ITS/tracking/GPU/cuda/CMakeLists.txt index 6ec7de631f778..cb37f7fb1966e 100644 --- a/Detectors/ITSMFT/ITS/tracking/GPU/cuda/CMakeLists.txt +++ b/Detectors/ITSMFT/ITS/tracking/GPU/cuda/CMakeLists.txt @@ -25,36 +25,17 @@ o2_add_library(ITStrackingCUDA VertexerTraitsGPU.cu Utils.cu PUBLIC_INCLUDE_DIRECTORIES ../ - PRIVATE_INCLUDE_DIRECTORIES - ${CMAKE_SOURCE_DIR}/GPU/GPUTracking - ${CMAKE_SOURCE_DIR}/GPU/GPUTracking/Base - ${CMAKE_SOURCE_DIR}/GPU/GPUTracking/Base/cuda - ${CMAKE_SOURCE_DIR}/GPU/GPUTracking/DataTypes - ${CMAKE_SOURCE_DIR}/GPU/GPUTracking/Global # "GPUErrors.h" - ${CMAKE_SOURCE_DIR}/GPU/GPUTracking/SliceTracker - ${CMAKE_SOURCE_DIR}/GPU/GPUTracking/TRDTracking # GPUTRDTracker.h - ${CMAKE_SOURCE_DIR}/DataFormats/Reconstruction/src - ${CMAKE_SOURCE_DIR}/DataFormats/Detectors/TPC/include # "DataFormatsTPC/dEdxInfo.h" - ${CMAKE_SOURCE_DIR}/DataFormats/Detectors/TRD/include # "DataFormatsTRD/Constants.h" - ${CMAKE_SOURCE_DIR}/Detectors/Base/src - ${CMAKE_SOURCE_DIR}/Detectors/TRD/base/include # "TRDBase/GeometryFlat.h" - ${CMAKE_SOURCE_DIR}/GPU/GPUTracking/Definitions - ${CMAKE_SOURCE_DIR}/GPU/GPUTracking/Merger - ${CMAKE_SOURCE_DIR}/GPU/GPUTracking/TPCConvert - ${CMAKE_SOURCE_DIR}/GPU/GPUTracking/DataCompression - ${CMAKE_SOURCE_DIR}/GPU/GPUTracking/ITS - ${CMAKE_SOURCE_DIR}/GPU/GPUTracking/TPCClusterFinder - ${CMAKE_SOURCE_DIR}/GPU/GPUTracking/Refit PUBLIC_LINK_LIBRARIES O2::ITStracking O2::SimConfig O2::SimulationDataFormat O2::ReconstructionDataFormats + O2::GPUCommon CUDA::nvToolsExt # TODO: change to CUDA::nvtx3 when CMake bump >= 3.25 PRIVATE_LINK_LIBRARIES O2::GPUTrackingCUDAExternalProvider TARGETVARNAME targetName) set_property(TARGET ${targetName} PROPERTY CUDA_SEPARABLE_COMPILATION ON) -target_compile_definitions(${targetName} PRIVATE GPUCA_O2_LIB $) +target_compile_definitions(${targetName} PRIVATE $) set_target_cuda_arch(${targetName}) endif() diff --git a/Detectors/ITSMFT/ITS/tracking/GPU/cuda/TimeFrameGPU.cu b/Detectors/ITSMFT/ITS/tracking/GPU/cuda/TimeFrameGPU.cu index cf45d241ac1c7..585f081916257 100644 --- a/Detectors/ITSMFT/ITS/tracking/GPU/cuda/TimeFrameGPU.cu +++ b/Detectors/ITSMFT/ITS/tracking/GPU/cuda/TimeFrameGPU.cu @@ -9,10 +9,6 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. /// -#ifndef __HIPCC__ -#include "GPUReconstructionCUDADef.h" // This file should come first, if included -#endif - #include #include @@ -25,9 +21,6 @@ #include #include -#define GPUCA_TPC_GEOMETRY_O2 // To set working switch in GPUTPCGeometry whose else statement is bugged -#define GPUCA_O2_INTERFACE // To suppress errors related to the weird dependency between itsgputracking and GPUTracking - #include "GPUCommonDef.h" #include "GPUCommonMath.h" #include "GPUCommonLogger.h" @@ -36,18 +29,6 @@ #define THRUST_NAMESPACE thrust::cuda #else #define THRUST_NAMESPACE thrust::hip -// clang-format off -#ifndef GPUCA_NO_CONSTANT_MEMORY - #define GPUCA_CONSMEM_PTR - #define GPUCA_CONSMEM_CALL - #define GPUCA_CONSMEM (gGPUConstantMemBuffer.v) -#else - #define GPUCA_CONSMEM_PTR const GPUConstantMem *gGPUConstantMemBuffer, - #define GPUCA_CONSMEM_CALL me->mDeviceConstantMem, - #define GPUCA_CONSMEM const_cast(*gGPUConstantMemBuffer) -#endif -#define GPUCA_KRNL_BACKEND_CLASS GPUReconstructionHIPBackend -// clang-format on #endif namespace o2 diff --git a/Detectors/ITSMFT/ITS/tracking/GPU/cuda/TrackingKernels.cu b/Detectors/ITSMFT/ITS/tracking/GPU/cuda/TrackingKernels.cu index a51ac33014eca..6ca04a94efe93 100644 --- a/Detectors/ITSMFT/ITS/tracking/GPU/cuda/TrackingKernels.cu +++ b/Detectors/ITSMFT/ITS/tracking/GPU/cuda/TrackingKernels.cu @@ -30,52 +30,22 @@ #include "ITStracking/MathUtils.h" #include "DataFormatsITS/TrackITS.h" -#define GPUCA_TPC_GEOMETRY_O2 // To set working switch in GPUTPCGeometry whose else statement is bugged -#define GPUCA_O2_INTERFACE // To suppress errors related to the weird dependency between itsgputracking and GPUTracking - #include "ITStrackingGPU/TrackerTraitsGPU.h" #include "ITStrackingGPU/TrackingKernels.h" -#include "ReconstructionDataFormats/Track.h" - #ifndef __HIPCC__ #define THRUST_NAMESPACE thrust::cuda -// #include "GPUReconstructionCUDADef.h" #else #define THRUST_NAMESPACE thrust::hip -// clang-format off -// #ifndef GPUCA_NO_CONSTANT_MEMORY -// #ifdef GPUCA_CONSTANT_AS_ARGUMENT -// #define GPUCA_CONSMEM_PTR const GPUConstantMemCopyable gGPUConstantMemBufferByValue, -// #define GPUCA_CONSMEM_CALL gGPUConstantMemBufferHost, -// #define GPUCA_CONSMEM (const_cast(gGPUConstantMemBufferByValue.v)) -// #else -// #define GPUCA_CONSMEM_PTR -// #define GPUCA_CONSMEM_CALL -// #define GPUCA_CONSMEM (gGPUConstantMemBuffer.v) -// #endif -// #else -// #define GPUCA_CONSMEM_PTR const GPUConstantMem *gGPUConstantMemBuffer, -// #define GPUCA_CONSMEM_CALL me->mDeviceConstantMem, -// #define GPUCA_CONSMEM const_cast(*gGPUConstantMemBuffer) -// #endif -// #define GPUCA_KRNL_BACKEND_CLASS GPUReconstructionHIPBackend -// clang-format on #endif -// #include "GPUConstantMem.h" - -// Files for propagation with material -// #include "Ray.cxx" -// #include "MatLayerCylSet.cxx" -// #include "MatLayerCyl.cxx" // O2 track model +#include "ReconstructionDataFormats/Track.h" +using namespace o2::track; #ifdef __HIPCC__ #include "TrackParametrization.cxx" #include "TrackParametrizationWithError.cxx" #endif -// #include "Propagator.cxx" -using namespace o2::track; namespace o2 {