Skip to content
This repository was archived by the owner on Mar 21, 2024. It is now read-only.

Commit c3b8482

Browse files
committed
WIP: Enable CDP tests.
1 parent 104df37 commit c3b8482

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

testing/cuda/CMakeLists.txt

+9-6
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ file(GLOB test_srcs
66

77
# These tests always build with RDC, so make sure that the sm_XX flags are
88
# compatible. See note in ThrustCudaConfig.cmake.
9+
# TODO once we have 3.18 as the minimum version, we can setup non-rdc fallback
10+
# tests to build for non-rdc arches. But for now, all files in a given directory
11+
# must build with the same `CMAKE_CUDA_FLAGS`.
912
set(CMAKE_CUDA_FLAGS "${THRUST_CUDA_FLAGS_BASE} ${THRUST_CUDA_FLAGS_RDC}")
1013

1114
foreach(thrust_target IN LISTS THRUST_TARGETS)
@@ -18,11 +21,11 @@ foreach(thrust_target IN LISTS THRUST_TARGETS)
1821
get_filename_component(test_name "${test_src}" NAME_WLE)
1922
string(PREPEND test_name "cuda.")
2023

21-
thrust_add_test(test_target ${test_name} "${test_src}" ${thrust_target})
22-
23-
# All in testing/cuda will test device-side launch (aka calling parallel
24-
# algorithms from device code), which requires the CUDA device-side runtime,
25-
# which requires RDC, so these always need to be built with RDC.
26-
thrust_enable_rdc_for_cuda_target(${test_target})
24+
# Create two targets, one with RDC enabled, the other without. This tests
25+
# both device-side behaviors -- the CDP kernel launch with RDC, and the
26+
# serial fallback path without RDC.
27+
thrust_add_test(fb_test_target ${test_name}.fallback "${test_src}" ${thrust_target})
28+
thrust_add_test(cdp_test_target ${test_name}.cdp "${test_src}" ${thrust_target})
29+
thrust_enable_rdc_for_cuda_target(${cdp_test_target})
2730
endforeach()
2831
endforeach()

0 commit comments

Comments
 (0)