Skip to content
31 changes: 16 additions & 15 deletions tests/lit.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,24 @@ else:
if config.cudnn_version_major >= 9:
config.excludes.append('cudnn2miopen_before_9000.cu')

# cub_0N.cu run on LLVM < 8; cub_0N_LLVM_8.cu run on LLVM >= 8.
cub_tests_pre_llvm8 = ['cub_01.cu', 'cub_02.cu', 'cub_03.cu']
cub_tests_llvm8 = ['cub_01_LLVM_8.cu', 'cub_02_LLVM_8.cu', 'cub_03_LLVM_8.cu']
cub_tests = cub_tests_pre_llvm8 + cub_tests_llvm8

# Single entry point so every disable-guard excludes both variants.
def exclude_all_cub_tests():
config.excludes.extend(cub_tests)

if not config.cuda_cub_root or config.cuda_cub_root == "OFF":
config.excludes.append('cub_01.cu')
config.excludes.append('cub_02.cu')
config.excludes.append('cub_03.cu')
exclude_all_cub_tests()
print("WARN: CUB tests are excluded because CUDA_CUB_ROOT_DIR is not specified")
warns = True
else:
# On CUDA >= 12.6 the standalone CUB (CUDA_CUB_ROOT_DIR)
# pulls in <thrust/detail/cstdint.h>, removed from CCCL in 12.6. Exclude for now.
if config.cuda_version_major == 12 and config.cuda_version_minor >= 6:
config.excludes.append('cub_01.cu')
config.excludes.append('cub_02.cu')
config.excludes.append('cub_03.cu')
exclude_all_cub_tests()

if not config.cuda_tensor_root or config.cuda_tensor_root == "OFF":
config.excludes.append('cutensor2hiptensor.cu')
Expand Down Expand Up @@ -95,9 +102,7 @@ if config.cuda_version_major < 9:
config.excludes.append('benchmark_curand_kernel.cpp')
config.excludes.append('reinterpret_cast.cu')
config.excludes.append('half2_allocators.cu')
config.excludes.append('cub_01.cu')
config.excludes.append('cub_02.cu')
config.excludes.append('cub_03.cu')
exclude_all_cub_tests()
config.excludes.append('runtime_functions_9000.cu')

if config.cuda_version_major < 9 or (config.cuda_version_major == 9 and config.cuda_version_minor < 2):
Expand Down Expand Up @@ -205,13 +210,9 @@ if config.cuda_version_major < 13:
if config.llvm_version_major < 8:
config.excludes.append('cd_intro.cu')
config.excludes.append('cd_intro_before_13000.cu')
config.excludes.append('cub_01_LLVM_8.cu')
config.excludes.append('cub_02_LLVM_8.cu')
config.excludes.append('cub_03_LLVM_8.cu')
config.excludes.extend(cub_tests_llvm8)
else:
config.excludes.append('cub_01.cu')
config.excludes.append('cub_02.cu')
config.excludes.append('cub_03.cu')
config.excludes.extend(cub_tests_pre_llvm8)

if config.llvm_version_major < 10:
config.excludes.append('pp_if_else_conditionals_LLVM_10.cu')
Expand Down
Loading