namnkahn1607 wrote:

> A better fix would be to backtrack CUDA SDK versions, and find the version 
> which no longer needs inclusion of `curand_mtgp32_kernel.h` from the subset 
> of headers used by the `__clang_cuda_runtime_wrapper.h`, and then 
> conditionally include `curand_mtgp32_kernel` only for the CUDA versions that 
> need it.

I tried removed the workaround on CUDA 12.8, then compiled 2 cases of 
translation units:
- The one that does not use cuRAND compiles fine, so I can conclude that the 
wrapper's pre-included headers do not need `curand_mtgp32_kernel.h` on 12.8.
- However, the one with `#include <curand_kernel.h>` fails immediately with 
`redeclaration of 'blockDim'/'threadIdx' with a different type`.

This also means gating the inclusion using `CUDA_VERSION` based on whether the 
wrapper's pre-included headers need it would regress cuRAND users on CUDA 12.8.

https://github.com/llvm/llvm-project/pull/244945
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to