diff --git a/src/ext/collectives/allreduce/allreduce_nvls_zero_copy.cu b/src/ext/collectives/allreduce/allreduce_nvls_zero_copy.cu index 99146779..ef6d216c 100644 --- a/src/ext/collectives/allreduce/allreduce_nvls_zero_copy.cu +++ b/src/ext/collectives/allreduce/allreduce_nvls_zero_copy.cu @@ -83,7 +83,8 @@ struct NvlsAdapter { // fp8_e4m3b15 is a software-only type with no hardware NVLS support. return cudaErrorNotSupported; } else -#if (!defined(__CUDA_ARCH_SPECIFIC__) && !defined(__CUDA_ARCH_FAMILY_SPECIFIC__)) || (__CUDA_ARCH__ < 1000) +#if defined(__CUDA_ARCH__) && \ + ((!defined(__CUDA_ARCH_SPECIFIC__) && !defined(__CUDA_ARCH_FAMILY_SPECIFIC__)) || (__CUDA_ARCH__ < 1000)) if constexpr (std::is_same_v || std::is_same_v) { return cudaErrorNotSupported; } else