-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Compilation failure for OpenMP on older family #133075
Comments
@llvm/issue-subscribers-openmp Author: None (KaruroChori)
I tried compiling with `clang++-21 test.cpp -fopenmp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target=nvptx64 -march=sm_60`
```c++
#include <iostream>
#include <cstdio>
using namespace std;
int main(){
fatal error: error in backend: PTX does not support "atomic" for orderings different than"NotAtomic" or "Monotonic" for sm_60 or older, but order is: "seq_cst". PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
|
Yeah that's just older cards not being able to use the features we need in the runtime. However, this is most likely from atomic generated from the atomic wrappers, so it's possible that they'll get removed if you add optimizations. |
Your file compiled just fine for me with |
Not for me :/. This time I have the latest nvidia tools, drivers (570) and cuda sdk (12.8.1) available in their official debian repository. And llvm-21 straight from here. I just tested on the workstation I am decommissioning, and there it compiles down to |
Does it work if you pass |
The very basic example on top does, a full application does not as there are scenarios in which they cannot be optimized out. |
I tried compiling with
clang++-21 test.cpp -fopenmp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target=nvptx64 -march=sm_60
on an older card which is sm_60.
The compiler failed with this message:
I personally don't think it is a "real" bug, just that some features are not available on older cards, but since it asked for it, here I posted it.
The text was updated successfully, but these errors were encountered: