Skip to content

Commit

Permalink
O2: Remove obsolete functionality to build standalone benchmark witho…
Browse files Browse the repository at this point in the history
…ut O2 sources
  • Loading branch information
davidrohr committed Feb 1, 2025
1 parent edf695d commit ff52fe2
Show file tree
Hide file tree
Showing 72 changed files with 115 additions and 713 deletions.
3 changes: 1 addition & 2 deletions GPU/Common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ if(ALIGPU_BUILD_TYPE STREQUAL "O2")
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}>
$<INSTALL_INTERFACE:include/GPU>)

target_compile_definitions(${targetName} PRIVATE GPUCA_O2_LIB
GPUCA_TPC_GEOMETRY_O2 GPUCA_HAVE_O2HEADERS)
target_compile_definitions(${targetName} PRIVATE GPUCA_O2_LIB GPUCA_TPC_GEOMETRY_O2)

# cuda test, only compile if CUDA
if(CUDA_ENABLED)
Expand Down
5 changes: 1 addition & 4 deletions GPU/Common/GPUCommonDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,8 @@
#elif defined(__CUDACC__) || defined(__HIPCC__)
#define GPUCA_HAS_GLOBAL_SYMBOL_CONSTANT_MEM
#endif
#if !defined(GPUCA_HAVE_O2HEADERS) && (defined(GPUCA_O2_LIB) || !defined(GPUCA_STANDALONE))
#define GPUCA_HAVE_O2HEADERS
#endif

#if defined(GPUCA_HAVE_O2HEADERS) && !defined(GPUCA_GPUCODE) && !defined(GPUCA_STANDALONE) && defined(DEBUG_STREAMER)
#if !defined(GPUCA_GPUCODE) && !defined(GPUCA_STANDALONE) && defined(DEBUG_STREAMER)
#define GPUCA_DEBUG_STREAMER_CHECK(...) __VA_ARGS__
#else
#define GPUCA_DEBUG_STREAMER_CHECK(...)
Expand Down
2 changes: 1 addition & 1 deletion GPU/Common/GPUDebugStreamer.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#define GPUDEBUGSTREAMER_H

#include "GPUCommonDef.h"
#if defined(GPUCA_HAVE_O2HEADERS) && !defined(GPUCA_GPUCODE) && !defined(GPUCA_STANDALONE) && defined(DEBUG_STREAMER)
#if !defined(GPUCA_GPUCODE) && !defined(GPUCA_STANDALONE) && defined(DEBUG_STREAMER)
#include "CommonUtils/DebugStreamer.h"
#endif

Expand Down
17 changes: 0 additions & 17 deletions GPU/GPUTracking/Base/GPUConstantMem.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,12 @@
#include "GPUTPCGMMerger.h"
#include "GPUTRDTracker.h"

// Dummies for stuff not suppored in legacy code, or for what requires O2 headers while not available
#if defined(GPUCA_HAVE_O2HEADERS)
#include "GPUTPCConvert.h"
#include "GPUTPCCompression.h"
#include "GPUTPCDecompression.h"
#include "GPUITSFitter.h"
#include "GPUTPCClusterFinder.h"
#include "GPUTrackingRefit.h"
#else
#include "GPUO2FakeClasses.h"
#endif

#ifdef GPUCA_KERNEL_DEBUGGER_OUTPUT
#include "GPUKernelDebugOutput.h"
Expand All @@ -52,9 +47,7 @@ struct GPUConstantMem {
GPUTPCDecompression tpcDecompressor;
GPUTPCGMMerger tpcMerger;
GPUTRDTrackerGPU trdTrackerGPU;
#ifdef GPUCA_HAVE_O2HEADERS
GPUTRDTracker trdTrackerO2;
#endif
GPUTPCClusterFinder tpcClusterer[GPUCA_NSLICES];
GPUITSFitter itsFitter;
GPUTrackingRefitProcessor trackingRefit;
Expand All @@ -65,19 +58,10 @@ struct GPUConstantMem {
GPUKernelDebugOutput debugOutput;
#endif

#if defined(GPUCA_HAVE_O2HEADERS)
template <int32_t I>
GPUd() auto& getTRDTracker();
#else // GPUCA_HAVE_O2HEADERS
template <int32_t I>
GPUdi() GPUTRDTrackerGPU& getTRDTracker()
{
return trdTrackerGPU;
}
#endif // !GPUCA_HAVE_O2HEADERS
};

#if defined(GPUCA_HAVE_O2HEADERS)
template <>
GPUdi() auto& GPUConstantMem::getTRDTracker<0>()
{
Expand All @@ -88,7 +72,6 @@ GPUdi() auto& GPUConstantMem::getTRDTracker<1>()
{
return trdTrackerO2;
}
#endif

union GPUConstantMemCopyable {
#if !defined(__OPENCL__) || defined(__OPENCL_HOST__)
Expand Down
4 changes: 1 addition & 3 deletions GPU/GPUTracking/Base/GPUParam.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,12 @@
#include "GPUTPCGMPolynomialFieldManager.h"
#include "GPUDataTypes.h"
#include "GPUConstantMem.h"
#include "DetectorsBase/Propagator.h"

using namespace o2::gpu;

#include <cstring>
#include <tuple>
#ifdef GPUCA_HAVE_O2HEADERS
#include "DetectorsBase/Propagator.h"
#endif

#include "utils/qconfigrtc.h"

Expand Down
14 changes: 0 additions & 14 deletions GPU/GPUTracking/Base/GPUReconstruction.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,7 @@ GPUReconstruction::GPUReconstruction(const GPUSettingsDeviceBackend& cfg) : mHos
mMemoryScalers.reset(new GPUMemorySizeScalers);
for (uint32_t i = 0; i < NSLICES; i++) {
processors()->tpcTrackers[i].SetSlice(i); // TODO: Move to a better place
#ifdef GPUCA_HAVE_O2HEADERS
processors()->tpcClusterer[i].mISlice = i;
#endif
}
#ifndef GPUCA_NO_ROOT
mROOTDump = GPUROOTDumpCore::getAndCreate();
Expand Down Expand Up @@ -213,14 +211,6 @@ int32_t GPUReconstruction::InitPhaseBeforeDevice()
}
GPUConfigDump::dumpConfig(&param().rec, &mProcessingSettings, chTrk ? chTrk->GetQAConfig() : nullptr, chTrk ? chTrk->GetEventDisplayConfig() : nullptr, &mDeviceBackendSettings, &mRecoSteps);
}
#ifndef GPUCA_HAVE_O2HEADERS
mRecoSteps.steps.setBits(RecoStep::ITSTracking, false);
mRecoSteps.steps.setBits(RecoStep::TRDTracking, false);
mRecoSteps.steps.setBits(RecoStep::TPCConversion, false);
mRecoSteps.steps.setBits(RecoStep::TPCCompression, false);
mRecoSteps.steps.setBits(RecoStep::TPCdEdx, false);
mProcessingSettings.createO2Output = false;
#endif
mRecoSteps.stepsGPUMask &= mRecoSteps.steps;
mRecoSteps.stepsGPUMask &= AvailableGPURecoSteps();
if (!IsGPU()) {
Expand Down Expand Up @@ -258,7 +248,6 @@ int32_t GPUReconstruction::InitPhaseBeforeDevice()
#ifndef GPUCA_NO_FAST_MATH
GPUError("Warning, deterministicGPUReconstruction needs GPUCA_NO_FAST_MATH, otherwise results will never be deterministic!");
#endif
#ifdef GPUCA_HAVE_O2HEADERS
mProcessingSettings.overrideClusterizerFragmentLen = TPC_MAX_FRAGMENT_LEN_GPU;
param().rec.tpc.nWaysOuter = true;
if (param().rec.tpc.looperInterpolationInExtraPass == -1) {
Expand All @@ -267,7 +256,6 @@ int32_t GPUReconstruction::InitPhaseBeforeDevice()
if (mProcessingSettings.createO2Output > 1) {
mProcessingSettings.createO2Output = 1;
}
#endif
}
if (mProcessingSettings.deterministicGPUReconstruction && mProcessingSettings.debugLevel >= 6) {
mProcessingSettings.nTPCClustererLanes = 1;
Expand Down Expand Up @@ -347,7 +335,6 @@ int32_t GPUReconstruction::InitPhaseBeforeDevice()
mNStreams = std::max<int32_t>(mProcessingSettings.nStreams, 3);
}

#ifdef GPUCA_HAVE_O2HEADERS
if (mProcessingSettings.nTPCClustererLanes == -1) {
mProcessingSettings.nTPCClustererLanes = (GetRecoStepsGPU() & RecoStep::TPCClusterFinding) ? 3 : std::max<int32_t>(1, std::min<int32_t>(GPUCA_NSLICES, mProcessingSettings.ompKernels ? (mProcessingSettings.ompThreads >= 4 ? std::min<int32_t>(mProcessingSettings.ompThreads / 2, mProcessingSettings.ompThreads >= 32 ? GPUCA_NSLICES : 4) : 1) : mProcessingSettings.ompThreads));
}
Expand All @@ -358,7 +345,6 @@ int32_t GPUReconstruction::InitPhaseBeforeDevice()
GPUError("Invalid value for nTPCClustererLanes: %d", mProcessingSettings.nTPCClustererLanes);
mProcessingSettings.nTPCClustererLanes = GPUCA_NSLICES;
}
#endif

if (mProcessingSettings.doublePipeline && (mChains.size() != 1 || mChains[0]->SupportsDoublePipeline() == false || !IsGPU() || mProcessingSettings.memoryAllocationStrategy != GPUMemoryResource::ALLOCATION_GLOBAL)) {
GPUError("Must use double pipeline mode only with exactly one chain that must support it");
Expand Down
22 changes: 0 additions & 22 deletions GPU/GPUTracking/Base/GPUReconstructionConvert.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include <algorithm>
#include <vector>

#ifdef GPUCA_HAVE_O2HEADERS
#include "clusterFinderDefs.h"
#include "DataFormatsTPC/ZeroSuppression.h"
#include "DataFormatsTPC/ZeroSuppressionLinkBased.h"
Expand All @@ -40,7 +39,6 @@
#include "TPCBase/RDHUtils.h"
#include "TPCBase/CRU.h"
#include "DetectorsRaw/RDHUtils.h"
#endif

using namespace o2::gpu;
using namespace o2::tpc;
Expand All @@ -49,7 +47,6 @@ using namespace std::string_literals;

void GPUReconstructionConvert::ConvertNativeToClusterData(o2::tpc::ClusterNativeAccess* native, std::unique_ptr<GPUTPCClusterData[]>* clusters, uint32_t* nClusters, const TPCFastTransform* transform, int32_t continuousMaxTimeBin)
{
#ifdef GPUCA_HAVE_O2HEADERS
memset(nClusters, 0, NSLICES * sizeof(nClusters[0]));
uint32_t offset = 0;
for (uint32_t i = 0; i < NSLICES; i++) {
Expand Down Expand Up @@ -83,12 +80,10 @@ void GPUReconstructionConvert::ConvertNativeToClusterData(o2::tpc::ClusterNative
offset += native->nClusters[i][j];
}
}
#endif
}

void GPUReconstructionConvert::ConvertRun2RawToNative(o2::tpc::ClusterNativeAccess& native, std::unique_ptr<ClusterNative[]>& nativeBuffer, const AliHLTTPCRawCluster** rawClusters, uint32_t* nRawClusters)
{
#ifdef GPUCA_HAVE_O2HEADERS
memset((void*)&native, 0, sizeof(native));
for (uint32_t i = 0; i < NSLICES; i++) {
for (uint32_t j = 0; j < nRawClusters[i]; j++) {
Expand All @@ -115,12 +110,10 @@ void GPUReconstructionConvert::ConvertRun2RawToNative(o2::tpc::ClusterNativeAcce
c.qTot = org.GetCharge();
}
}
#endif
}

int32_t GPUReconstructionConvert::GetMaxTimeBin(const ClusterNativeAccess& native)
{
#ifdef GPUCA_HAVE_O2HEADERS
float retVal = 0;
for (uint32_t i = 0; i < NSLICES; i++) {
for (uint32_t j = 0; j < GPUCA_ROW_COUNT; j++) {
Expand All @@ -132,14 +125,10 @@ int32_t GPUReconstructionConvert::GetMaxTimeBin(const ClusterNativeAccess& nativ
}
}
return ceil(retVal);
#else
return 0;
#endif
}

int32_t GPUReconstructionConvert::GetMaxTimeBin(const GPUTrackingInOutDigits& digits)
{
#ifdef GPUCA_HAVE_O2HEADERS
float retVal = 0;
for (uint32_t i = 0; i < NSLICES; i++) {
for (uint32_t k = 0; k < digits.nTPCDigits[i]; k++) {
Expand All @@ -149,14 +138,10 @@ int32_t GPUReconstructionConvert::GetMaxTimeBin(const GPUTrackingInOutDigits& di
}
}
return ceil(retVal);
#else
return 0;
#endif
}

int32_t GPUReconstructionConvert::GetMaxTimeBin(const GPUTrackingInOutZS& zspages)
{
#ifdef GPUCA_HAVE_O2HEADERS
float retVal = 0;
for (uint32_t i = 0; i < NSLICES; i++) {
int32_t firstHBF = zspages.slice[i].count[0] ? o2::raw::RDHUtils::getHeartBeatOrbit(*(const o2::header::RAWDataHeader*)zspages.slice[i].zsPtr[0][0]) : 0;
Expand All @@ -182,9 +167,6 @@ int32_t GPUReconstructionConvert::GetMaxTimeBin(const GPUTrackingInOutZS& zspage
}
}
return ceil(retVal);
#else
return 0;
#endif
}

// ------------------------------------------------- TPC ZS -------------------------------------------------
Expand Down Expand Up @@ -1413,12 +1395,10 @@ void GPUReconstructionConvert::RunZSEncoder(const S& in, std::unique_ptr<uint64_
#endif
}

#ifdef GPUCA_HAVE_O2HEADERS
template void GPUReconstructionConvert::RunZSEncoder<GPUTrackingInOutDigits>(const GPUTrackingInOutDigits&, std::unique_ptr<uint64_t[]>*, uint32_t*, o2::raw::RawFileWriter*, const o2::InteractionRecord*, const GPUParam&, int32_t, bool, float, bool, std::function<void(std::vector<o2::tpc::Digit>&)> digitsFilter);
#ifdef GPUCA_O2_LIB
template void GPUReconstructionConvert::RunZSEncoder<DigitArray>(const DigitArray&, std::unique_ptr<uint64_t[]>*, uint32_t*, o2::raw::RawFileWriter*, const o2::InteractionRecord*, const GPUParam&, int32_t, bool, float, bool, std::function<void(std::vector<o2::tpc::Digit>&)> digitsFilter);
#endif
#endif

void GPUReconstructionConvert::RunZSEncoderCreateMeta(const uint64_t* buffer, const uint32_t* sizes, void** ptrs, GPUTrackingInOutZS* out)
{
Expand All @@ -1436,7 +1416,6 @@ void GPUReconstructionConvert::RunZSEncoderCreateMeta(const uint64_t* buffer, co

void GPUReconstructionConvert::RunZSFilter(std::unique_ptr<o2::tpc::Digit[]>* buffers, const o2::tpc::Digit* const* ptrs, size_t* nsb, const size_t* ns, const GPUParam& param, bool zs12bit, float threshold)
{
#ifdef GPUCA_HAVE_O2HEADERS
for (uint32_t i = 0; i < NSLICES; i++) {
if (buffers[i].get() != ptrs[i] || nsb != ns) {
throw std::runtime_error("Not owning digits");
Expand All @@ -1459,7 +1438,6 @@ void GPUReconstructionConvert::RunZSFilter(std::unique_ptr<o2::tpc::Digit[]>* bu
}
nsb[i] = j;
}
#endif
}

#ifdef GPUCA_O2_LIB
Expand Down
2 changes: 1 addition & 1 deletion GPU/GPUTracking/Base/GPUReconstructionIncludesITS.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#ifndef GPURECONSTRUCTIONINCLDUESITS_H
#define GPURECONSTRUCTIONINCLDUESITS_H

#if defined(GPUCA_HAVE_O2HEADERS) && !defined(GPUCA_STANDALONE)
#if !defined(GPUCA_STANDALONE)
#include "ITStracking/TrackerTraits.h"
#include "ITStracking/VertexerTraits.h"
#include "ITStracking/TimeFrame.h"
Expand Down
12 changes: 5 additions & 7 deletions GPU/GPUTracking/Base/cuda/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,8 @@ if(NOT GPUCA_CUDA_COMPILE_MODE STREQUAL "rdc")
set_target_properties(${targetName} PROPERTIES LINKER_LANGUAGE CXX)
endif()

if(ALIGPU_BUILD_TYPE STREQUAL "O2" OR GPUCA_CONFIG_O2_EXTENSIONS)
add_library(GPUTrackingCUDAExternalProvider OBJECT GPUReconstructionCUDAExternalProvider.cu)
add_library(O2::GPUTrackingCUDAExternalProvider ALIAS GPUTrackingCUDAExternalProvider)
set_property(TARGET GPUTrackingCUDAExternalProvider PROPERTY CUDA_SEPARABLE_COMPILATION ON)
target_compile_definitions(GPUTrackingCUDAExternalProvider PRIVATE $<TARGET_PROPERTY:${targetName},COMPILE_DEFINITIONS>)
target_include_directories(GPUTrackingCUDAExternalProvider PRIVATE $<TARGET_PROPERTY:${targetName},INCLUDE_DIRECTORIES>)
endif()
add_library(GPUTrackingCUDAExternalProvider OBJECT GPUReconstructionCUDAExternalProvider.cu)
add_library(O2::GPUTrackingCUDAExternalProvider ALIAS GPUTrackingCUDAExternalProvider)
set_property(TARGET GPUTrackingCUDAExternalProvider PROPERTY CUDA_SEPARABLE_COMPILATION ON)
target_compile_definitions(GPUTrackingCUDAExternalProvider PRIVATE $<TARGET_PROPERTY:${targetName},COMPILE_DEFINITIONS>)
target_include_directories(GPUTrackingCUDAExternalProvider PRIVATE $<TARGET_PROPERTY:${targetName},INCLUDE_DIRECTORIES>)
10 changes: 0 additions & 10 deletions GPU/GPUTracking/Base/cuda/GPUReconstructionCUDAGenRTC.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@
#include "GPUParamRTC.h"
#include "GPUDefMacros.h"
#include <unistd.h>
#ifdef GPUCA_HAVE_O2HEADERS
#include "Framework/SHA1.h"
#endif
#include <sys/stat.h>
#include <fcntl.h>
#include <filesystem>
Expand Down Expand Up @@ -55,15 +53,13 @@ int32_t GPUReconstructionCUDA::genRTC(std::string& filename, uint32_t& nCompile)
baseCommand += (getenv("O2_GPU_RTC_OVERRIDE_CMD") ? std::string(getenv("O2_GPU_RTC_OVERRIDE_CMD")) : std::string(_binary_GPUReconstructionCUDArtc_command_start, _binary_GPUReconstructionCUDArtc_command_len));
baseCommand += std::string(" ") + (mProcessingSettings.RTCoverrideArchitecture != "" ? mProcessingSettings.RTCoverrideArchitecture : std::string(_binary_GPUReconstructionCUDArtc_command_arch_start, _binary_GPUReconstructionCUDArtc_command_arch_len));

#ifdef GPUCA_HAVE_O2HEADERS
char shasource[21], shaparam[21], shacmd[21], shakernels[21];
if (mProcessingSettings.rtc.cacheOutput) {
o2::framework::internal::SHA1(shasource, _binary_GPUReconstructionCUDArtc_src_start, _binary_GPUReconstructionCUDArtc_src_len);
o2::framework::internal::SHA1(shaparam, rtcparam.c_str(), rtcparam.size());
o2::framework::internal::SHA1(shacmd, baseCommand.c_str(), baseCommand.size());
o2::framework::internal::SHA1(shakernels, kernelsall.c_str(), kernelsall.size());
}
#endif

nCompile = mProcessingSettings.rtc.compilePerKernel ? kernels.size() : 1;
bool cacheLoaded = false;
Expand All @@ -72,9 +68,6 @@ int32_t GPUReconstructionCUDA::genRTC(std::string& filename, uint32_t& nCompile)
if (mProcessingSettings.RTCcacheFolder != ".") {
std::filesystem::create_directories(mProcessingSettings.RTCcacheFolder);
}
#ifndef GPUCA_HAVE_O2HEADERS
throw std::runtime_error("Cannot use RTC cache without O2 headers");
#else
if (mProcessingSettings.rtc.cacheMutex) {
mode_t mask = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH;
fd = open((mProcessingSettings.RTCcacheFolder + "/cache.lock").c_str(), O_RDWR | O_CREAT | O_CLOEXEC, mask);
Expand Down Expand Up @@ -153,7 +146,6 @@ int32_t GPUReconstructionCUDA::genRTC(std::string& filename, uint32_t& nCompile)
};
fclose(fp);
}
#endif
}
if (!cacheLoaded) {
if (mProcessingSettings.debugLevel >= 0) {
Expand Down Expand Up @@ -203,7 +195,6 @@ int32_t GPUReconstructionCUDA::genRTC(std::string& filename, uint32_t& nCompile)
if (mProcessingSettings.debugLevel >= 0) {
GPUInfo("RTC Compilation finished (%f seconds)", rtcTimer.GetCurrentElapsedTime());
}
#ifdef GPUCA_HAVE_O2HEADERS
if (mProcessingSettings.rtc.cacheOutput) {
FILE* fp = fopen((mProcessingSettings.RTCcacheFolder + "/rtc.cuda.cache").c_str(), "w+b");
if (fp == nullptr) {
Expand Down Expand Up @@ -241,7 +232,6 @@ int32_t GPUReconstructionCUDA::genRTC(std::string& filename, uint32_t& nCompile)
}
fclose(fp);
}
#endif
}
if (mProcessingSettings.rtc.cacheOutput && mProcessingSettings.rtc.cacheMutex) {
if (lockf(fd, F_ULOCK, 0)) {
Expand Down
18 changes: 8 additions & 10 deletions GPU/GPUTracking/Base/hip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -249,14 +249,12 @@ if(NOT GPUCA_HIP_COMPILE_MODE STREQUAL "rdc")
target_link_options(${targetName} PRIVATE $<$<COMPILE_LANGUAGE:HIP>:-fno-gpu-rdc>)
endif()

if(ALIGPU_BUILD_TYPE STREQUAL "O2" OR GPUCA_CONFIG_O2_EXTENSIONS)
add_library(GPUTrackingHIPExternalProvider OBJECT ${GPUCA_HIP_SOURCE_DIR}/GPUReconstructionHIPExternalProvider.hip)
add_library(O2::GPUTrackingHIPExternalProvider ALIAS GPUTrackingHIPExternalProvider)
target_compile_options(GPUTrackingHIPExternalProvider PRIVATE $<$<COMPILE_LANGUAGE:HIP>:-fgpu-rdc>)
target_link_options(GPUTrackingHIPExternalProvider PRIVATE $<$<COMPILE_LANGUAGE:HIP>:-fgpu-rdc>)
target_compile_definitions(GPUTrackingHIPExternalProvider PRIVATE $<TARGET_PROPERTY:${targetName},COMPILE_DEFINITIONS>)
target_include_directories(GPUTrackingHIPExternalProvider PRIVATE $<TARGET_PROPERTY:${targetName},INCLUDE_DIRECTORIES>)
if(NOT DEFINED GPUCA_HIP_HIPIFY_FROM_CUDA OR "${GPUCA_HIP_HIPIFY_FROM_CUDA}")
add_dependencies(GPUTrackingHIPExternalProvider ${MODULE}_HIPIFIED)
endif()
add_library(GPUTrackingHIPExternalProvider OBJECT ${GPUCA_HIP_SOURCE_DIR}/GPUReconstructionHIPExternalProvider.hip)
add_library(O2::GPUTrackingHIPExternalProvider ALIAS GPUTrackingHIPExternalProvider)
target_compile_options(GPUTrackingHIPExternalProvider PRIVATE $<$<COMPILE_LANGUAGE:HIP>:-fgpu-rdc>)
target_link_options(GPUTrackingHIPExternalProvider PRIVATE $<$<COMPILE_LANGUAGE:HIP>:-fgpu-rdc>)
target_compile_definitions(GPUTrackingHIPExternalProvider PRIVATE $<TARGET_PROPERTY:${targetName},COMPILE_DEFINITIONS>)
target_include_directories(GPUTrackingHIPExternalProvider PRIVATE $<TARGET_PROPERTY:${targetName},INCLUDE_DIRECTORIES>)
if(NOT DEFINED GPUCA_HIP_HIPIFY_FROM_CUDA OR "${GPUCA_HIP_HIPIFY_FROM_CUDA}")
add_dependencies(GPUTrackingHIPExternalProvider ${MODULE}_HIPIFIED)
endif()
Loading

0 comments on commit ff52fe2

Please sign in to comment.