Artem-B wrote: The key is this bit from the original commit c8dae5378b6:
> curand.h includes curand_mtgp32_kernel.h. In host mode, this header > redefines threadIdx and blockDim, giving them their "proper" types of > uint3 and dim3, respectively. > ... > As a hack, we force-include the offending CUDA header and use #defines > to get the right types for threadIdx and blockDim. If CUDA headers still do it, we still need to force-include the header in order for curand*.h headers to work correctly. On the other hand, if the current invocation of clang can't find `curand_mtgp32_kernel.h`, then curand headers will not find it either, so the compilation will be broken anyways. Looks like `__has_include` may be the right fix after all. One remaining question -- are current CUDA versions (e.g 13.x) still redefining threadIdx and blockDim ? If not, then I'd still prefer to disable this hack for the newer CUDA versions. https://github.com/llvm/llvm-project/pull/244945 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
