Artem-B wrote: IIRC, inclusion of the header was added because some of the CUDA headers we do pre-include at runtime depended on it at some point.
`__has_include()` is not the right solution here. It immediately begs the question -- why are we including the header unconditionally. If we do need it, just include it, and if we don't need it, then don't include it. Neither case needs `__has_include`. 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. https://github.com/llvm/llvm-project/pull/244945 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
