llvm-project
cdfd0b60 - [CUDA] Change __CUDACC__ definition to 1 (#189457)

Commit
9 days ago
[CUDA] Change __CUDACC__ definition to 1 (#189457) I recently encountered an issue where `nccl` used `#if __CUDACC__` , assuming `__CUDACC__` is not only defined but having a #if-able value. https://github.com/NVIDIA/nccl/blob/v2.28.3-1/src/include/nccl_device/coop.h#L18 Looking at nvcc invocation, I see that: ``` echo "" | nvcc -x cu -E -Xcompiler -dM - | grep __CUDACC__ #define __CUDACC__ 1 ``` Changing __CUDACC__ to 1 to match what NVIDIA downstream code assumptions.
Author
Parents
Loading