Skip to content

Commit e026e54

Browse files
authored
[SYCL] Fix CUDA LIT tests (#3007)
- set SYCL_PLUGIN parameter required for CUDA Unit tests; - add check-sycl-ptx target to check-sycl-cuda; - move test requiring GPU RT to on-device folder; - set cuda feature in LIT if PTX triple is set.
1 parent 023bc53 commit e026e54

File tree

5 files changed

+7
-2
lines changed

5 files changed

+7
-2
lines changed

sycl/test/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,14 @@ if(SYCL_BUILD_PI_CUDA)
113113
add_lit_testsuite(check-sycl-ptx "Running device-agnostic SYCL regression tests for NVidia PTX"
114114
${CMAKE_CURRENT_BINARY_DIR}
115115
ARGS ${RT_TEST_ARGS}
116-
PARAMS "SYCL_TRIPLE=nvptx64-nvidia-cuda-sycldevice"
116+
PARAMS "SYCL_TRIPLE=nvptx64-nvidia-cuda-sycldevice;SYCL_PLUGIN=cuda"
117117
DEPENDS ${SYCL_TEST_DEPS}
118118
EXCLUDE_FROM_CHECK_ALL
119119
)
120120

121-
add_dependencies(check-sycl check-sycl-cuda check-sycl-ptx)
121+
add_dependencies(check-sycl-cuda check-sycl-ptx)
122+
123+
add_dependencies(check-sycl check-sycl-cuda)
122124

123125
add_lit_testsuites(SYCL-CUDA ${CMAKE_CURRENT_SOURCE_DIR}/on-device
124126
PARAMS "SYCL_PLUGIN=cuda"

sycl/test/lit.cfg.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@
8383
lit_config.note("Triple: {}".format(triple))
8484
config.substitutions.append( ('%sycl_triple', triple ) )
8585

86+
if triple == 'nvptx64-nvidia-cuda-sycldevice':
87+
config.available_features.add('cuda')
88+
8689
# Set timeout for test = 10 mins
8790
try:
8891
import psutil

0 commit comments

Comments
 (0)