Issue 133075
Summary Compilation failure for OpenMP on older family
Labels new issue
Assignees
Reporter 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(){
        #pragma omp target parallel
 {
                printf("Hello\n");
        }
        return 0;
}
```
on an older card which is *sm_60*.  
The compiler failed with this message:

```
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".
clang++-21: error: clang frontend command failed with exit code 70 (use -v to see invocation)
Debian clang version 21.0.0 (++20250324101504+0adc672ed4a2-1~exp1~20250324221624.2732)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm-21/bin
clang++-21: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang++-21: note: diagnostic msg: /tmp/test-sm_60-c20c2d.cpp
clang++-21: note: diagnostic msg: /tmp/test-c40dad.cpp
clang++-21: note: diagnostic msg: /tmp/test-sm_60-c20c2d.sh
```

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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to