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
3 changes: 3 additions & 0 deletions Common/DCAFitter/GPU/cuda/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ o2_add_library(DCAFitterCUDA
O2::DetectorsBase
PRIVATE_LINK_LIBRARIES O2::GPUTrackingCUDAExternalProvider)
set_property(TARGET ${targetName} PROPERTY CUDA_SEPARABLE_COMPILATION ON)
# Device LTO, so that the device link can inline across the
# O2::GPUTrackingCUDAExternalProvider objects, which are compiled to LTO IR.
set_property(TARGET ${targetName} PROPERTY INTERPROCEDURAL_OPTIMIZATION ON)
# add_compile_options(-lineinfo)

#o2_add_test(DCAFitterNCUDA
Expand Down
2 changes: 2 additions & 0 deletions Detectors/ITSMFT/ITS/tracking/GPU/cuda/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ if(CUDA_ENABLED)
# $<$<COMPILE_LANGUAGE:CUDA>:-G;-O0;-Xptxas=-O0>
# $<$<COMPILE_LANGUAGE:CXX>:-O0;-g>
)
# -dlto is incompatible with -G, so device debugging needs it switched off.
set_property(TARGET ${targetName} PROPERTY INTERPROCEDURAL_OPTIMIZATION ON)
# target_compile_definitions(${targetName} PRIVATE ITS_MEASURE_GPU_TIME ITS_GPU_LOG)
target_compile_definitions(${targetName} PRIVATE $<TARGET_PROPERTY:O2::ITStracking,COMPILE_DEFINITIONS>)
endif()
5 changes: 5 additions & 0 deletions GPU/GPUTracking/Base/cuda/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -204,4 +204,9 @@ add_library(O2::GPUTrackingCUDAExternalProvider ALIAS GPUTrackingCUDAExternalPro
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>)
# Emit LTO IR (code=[compute_XX,lto_XX]) instead of SASS, so that consumers
# device-linking with -dlto can inline across the provider. Consumers doing a
# plain device link still work: nvlink falls back to compiling the IR, it just
# does not get the cross-module inlining.
set_property(TARGET GPUTrackingCUDAExternalProvider PROPERTY INTERPROCEDURAL_OPTIMIZATION ON)
add_dependencies(GPUTrackingCUDAExternalProvider O2::GPUTracking) # must not depend on GPU backend to avoid cyclic dependencies
5 changes: 5 additions & 0 deletions cmake/O2AddHipifiedExecutable.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,9 @@ function(o2_add_hipified_executable baseTargetName)
o2_add_executable("${baseTargetName}"
SOURCES ${HIP_SOURCES}
${FORWARD_ARGS})

# Export architecture name
if(A_TARGETVARNAME)
set(${A_TARGETVARNAME} ${${A_TARGETVARNAME}} PARENT_SCOPE)
endif()
endfunction()
5 changes: 5 additions & 0 deletions cmake/O2AddHipifiedLibrary.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,9 @@ function(o2_add_hipified_library baseTargetName)
o2_add_library("${baseTargetName}"
SOURCES ${HIP_SOURCES}
${FORWARD_ARGS})

# Export architecture name
if(A_TARGETVARNAME)
set(${A_TARGETVARNAME} ${${A_TARGETVARNAME}} PARENT_SCOPE)
endif()
endfunction()