File tree 7 files changed +28
-15
lines changed
common/include/traccc/finding/device
7 files changed +28
-15
lines changed Original file line number Diff line number Diff line change @@ -176,12 +176,8 @@ if( TRACCC_SETUP_THRUST )
176
176
add_subdirectory ( extern/cccl )
177
177
endif ()
178
178
endif ()
179
- # Set up an IMPORTED library on top of the Thrust library/libraries. One that
180
- # the TRACCC/Detray code could depend on publicly.
181
- set ( TRACCC_THRUST_OPTIONS "" CACHE STRING
182
- "Extra options for configuring how Thrust should be used" )
183
- mark_as_advanced ( TRACCC_THRUST_OPTIONS )
184
- thrust_create_target( traccc::Thrust ${TRACCC_THRUST_OPTIONS} )
179
+ add_library ( traccc::Thrust INTERFACE IMPORTED )
180
+ target_link_libraries ( traccc::Thrust INTERFACE Thrust::Thrust )
185
181
186
182
# Set up rocThrust.
187
183
option ( TRACCC_SETUP_ROCTHRUST
Original file line number Diff line number Diff line change @@ -56,8 +56,8 @@ endif()
56
56
57
57
# Set up the traccc::Thrust target.
58
58
if ( NOT TARGET traccc::Thrust )
59
- set ( TRACCC_THRUST_OPTIONS @TRACCC_THRUST_OPTIONS@ )
60
- thrust_create_target ( traccc::Thrust ${TRACCC_THRUST_OPTIONS} )
59
+ add_library ( traccc::Thrust INTERFACE IMPORTED )
60
+ target_link_libraries ( traccc::Thrust INTERFACE Thrust::Thrust )
61
61
endif ()
62
62
63
63
# Include the file listing all the imported targets and options.
Original file line number Diff line number Diff line change 1
1
/* * TRACCC library, part of the ACTS project (R&D line)
2
2
*
3
- * (c) 2023 CERN for the benefit of the ACTS project
3
+ * (c) 2023-2024 CERN for the benefit of the ACTS project
4
4
*
5
5
* Mozilla Public License Version 2.0
6
6
*/
19
19
#include " traccc/finding/finding_config.hpp"
20
20
#include " traccc/fitting/kalman_filter/gain_matrix_updater.hpp"
21
21
22
- // Thrust include(s)
23
- #include < thrust/binary_search.h>
24
-
25
22
namespace traccc ::device {
26
23
template <typename detector_t >
27
24
struct find_tracks_payload {
Original file line number Diff line number Diff line change 1
1
/* * TRACCC library, part of the ACTS project (R&D line)
2
2
*
3
- * (c) 2023 CERN for the benefit of the ACTS project
3
+ * (c) 2023-2024 CERN for the benefit of the ACTS project
4
4
*
5
5
* Mozilla Public License Version 2.0
6
6
*/
21
21
22
22
// Thrust include(s)
23
23
#include < thrust/binary_search.h>
24
+ #include < thrust/execution_policy.h>
24
25
25
26
namespace traccc ::device {
26
27
Original file line number Diff line number Diff line change @@ -106,7 +106,14 @@ target_compile_options( traccc_cuda
106
106
PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:--expt-relaxed-constexpr> )
107
107
target_link_libraries ( traccc_cuda
108
108
PUBLIC traccc::core detray::core vecmem::core covfie::core
109
- PRIVATE CUDA::cudart traccc::Thrust traccc::device_common vecmem::cuda )
109
+ PRIVATE CUDA::cudart traccc::device_common vecmem::cuda )
110
+
111
+ # Set up Thrust specifically for the traccc::cuda library.
112
+ thrust_create_target( traccc::cuda_thrust
113
+ HOST CPP
114
+ DEVICE CUDA )
115
+ target_link_libraries ( traccc_cuda
116
+ PRIVATE traccc::cuda_thrust )
110
117
111
118
# For CUDA 11 turn on separable compilation. This is necessary for using
112
119
# Thrust 2.1.0.
Original file line number Diff line number Diff line change @@ -57,3 +57,10 @@ traccc_add_library( traccc_sycl sycl TYPE SHARED
57
57
target_link_libraries ( traccc_sycl
58
58
PUBLIC traccc::core detray::core vecmem::core covfie::core
59
59
PRIVATE traccc::device_common vecmem::sycl oneDPL )
60
+
61
+ # Set up Thrust specifically for the traccc::sycl library.
62
+ thrust_create_target( traccc::sycl_thrust
63
+ HOST CPP
64
+ DEVICE CPP )
65
+ target_link_libraries ( traccc_sycl
66
+ PRIVATE traccc::sycl_thrust )
Original file line number Diff line number Diff line change @@ -23,6 +23,11 @@ target_link_libraries(
23
23
GTest::gtest
24
24
)
25
25
26
+ # Set up Thrust specifically for the CUDA unit tests.
27
+ thrust_create_target( traccc_test_cuda_thrusr
28
+ HOST CPP
29
+ DEVICE CUDA )
30
+
26
31
traccc_add_test(
27
32
cuda
28
33
@@ -48,7 +53,7 @@ traccc_add_test(
48
53
49
54
LINK_LIBRARIES
50
55
CUDA::cudart
51
- traccc::Thrust
56
+ traccc_test_cuda_thrusr
52
57
GTest::gtest
53
58
vecmem::cuda
54
59
detray::core
You can’t perform that action at this time.
0 commit comments