Skip to content

Commit 39fd084

Browse files
committed
Enable RDC detection with clang-cuda
1 parent bf1b039 commit 39fd084

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ci/build_cub.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ if [[ "$CUDA_COMPILER" == *nvcc* ]]; then
1818
ENABLE_CCCL_BENCHMARKS="true"
1919
echo "nvcc version is $NVCC_VERSION. Building CUB benchmarks."
2020
fi
21-
else
22-
echo "Not building with NVCC, disabling RDC and benchmarks."
21+
elif [[ "$CUDA_COMPILER" == *clang* ]]; then
22+
ENABLE_CUB_RDC="true"
2323
fi
2424

2525
if [[ "$HOST_COMPILER" == *icpc* || "$HOST_COMPILER" == *nvhpc* ]]; then

libcudacxx/include/cuda/std/__cccl/visibility.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@
146146
// Some functions can be called from host or device code and launch kernels inside. Thus, they use CUDA Dynamic
147147
// Parallelism (CDP) and require compiling with Relocatable Device Code (RDC).
148148
// TODO(bgruber): remove CUB_DISABLE_CDP in CCCL 4.0
149-
#if defined(__CUDACC_RDC__) && !defined(CCCL_DISABLE_CDP) && !defined(CUB_DISABLE_CDP)
149+
#if (defined(__CUDACC_RDC__) || defined(__CLANG_RDC__)) && !defined(CCCL_DISABLE_CDP) && !defined(CUB_DISABLE_CDP)
150150
# define _CCCL_HAS_RDC() 1
151151
// We have RDC, so host and device APIs can call kernels
152152
# define _CCCL_CDP_API _CCCL_API

0 commit comments

Comments
 (0)