[all-commits] [llvm/llvm-project] cdfd0b: [CUDA] Change __CUDACC__ definition to 1 (#189457)

Corentin Kerisit via All-commits all-commits at lists.llvm.org
Wed Apr 15 12:17:03 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cdfd0b60d2f30d91087227ea90f16e43af3ff875
      https://github.com/llvm/llvm-project/commit/cdfd0b60d2f30d91087227ea90f16e43af3ff875
  Author: Corentin Kerisit <corentin.kerisit at gmail.com>
  Date:   2026-04-15 (Wed, 15 Apr 2026)

  Changed paths:
    M clang/lib/Headers/__clang_cuda_runtime_wrapper.h

  Log Message:
  -----------
  [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.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list