-
Notifications
You must be signed in to change notification settings - Fork 11.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[OpenMP] offload compilation failure with CUDA-12 #60296
Comments
@llvm/issue-subscribers-openmp |
The definition of those special types are guarded by |
Adding |
@Artem-B Have you seen this? |
I do not see it with CUDA or C++ compilation, so it's likely something OpenMP-specific. |
TBH I don't think |
|
I can't reproduce the issue.
|
cuda-12 |
@shiltian https://docs.nvidia.com/cuda/cublas/index.html#new-and-legacy-cublas-api . |
@ye-luo Thanks for the help. I did some investigation. I found something interesting. First,
That also demonstrates that Second, why no issue with pure C++ or CUDA mode? Because pure C++ mode will not define the macro On the other hand, things will not work if So the problem looks like we should not define |
Can we have |
Well, that can't solve the issue here because it's gonna "unlock" more device functions that we don't want (and we don't have the definitions as well). You can try |
https://reviews.llvm.org/D125256 introduced the definition of |
I'm not familiar with the details of how openmp deals with GPU-specific headers. I think previously it only needed a small subset necessary to pull in math functions. I'm not aware of anyone actually trying it with CUDA headers before.
That inconsistency is normal for CUDA headers. They are only intended to be used by NVCC and clang ends up having to do a lot of preprocessor contortions in order to make them usable. Apparently we need to add more hacks to make them usable for OpenMP.
However, for the host-facing APIs, you will likely need to have cublas headers included w/o |
@Artem-B Thanks for the information. I think eventually we are gonna need a wrapper header that needs to be included by the driver when using CUDA headers. |
I agree with @shiltian
I'm able to complete the compilation of full qmcpack and pass all the tests. also checked 12.1 remains bad. Let me contact NV. |
NVIDIA will not change already-released CUDA versions. Doing a selective macro manipulation in include wrapper, like clang does for CUDA compilation) is probably your only practical choice here, IMO. |
Got message from NV contact
I will report back once I verified the next release. |
Fixed in CUDA 12.1 Update 1. |
main.cpp
error from the nvptx64 pass
both cudatoolkit 12.0 and 12.1 are affected
The text was updated successfully, but these errors were encountered: