[llvm-bugs] [Bug 52108] New: OpenMP offload reduction on complex type on AMD GPU

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Oct 7 10:12:34 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=52108

            Bug ID: 52108
           Summary: OpenMP offload reduction on complex type on AMD GPU
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: OpenMP
          Assignee: unassignedclangbugs at nondot.org
          Reporter: xw111luoye at gmail.com
                CC: llvm-bugs at lists.llvm.org

https://github.com/ye-luo/openmp-target/blob/master/tests/complex/complex_reduction.cpp

# good on nvptx64
clang++ -fopenmp -march=native -fopenmp-targets=nvptx64 -O3 -DNDEBUG
-ffast-math  complex_reduction.cpp -lm && ./a.out
# compiler crash on amdgcn
clang++ -fopenmp -march=native -fopenmp-targets=amdgcn-amd-amdhsa
-Xopenmp-target=amdgcn-amd-amdhsa -march=gfx906 -O3 -DNDEBUG -ffast-math
complex_reduction.cpp -lm
# use openmp-opt-disable, the run goes wrong
clang++ -fopenmp -march=native -fopenmp-targets=amdgcn-amd-amdhsa
-Xopenmp-target=amdgcn-amd-amdhsa -march=gfx906 -O3 -DNDEBUG -ffast-math -mllvm
-openmp-opt-disable=true  complex_reduction.cpp -lm && ./a.out
[GPU Memory Error] Addr: 0x9e8237987000 Reason: Page not present or supervisor
privilege. 
Memory access fault by GPU node-1 (Agent handle: 0x18b1150) on address
0x9e8237987000. Reason: Page not present or supervisor privilege.
Aborted (core dumped)

One more related reproducer
llvm-project/openmp/libomptarget/test/offloading/bug49021.cpp 

I got wrong results
clang++ -fopenmp -march=native -fopenmp-targets=amdgcn-amd-amdhsa
-Xopenmp-target=amdgcn-amd-amdhsa -march=gfx906 -O3 -DNDEBUG -ffast-math
bug49021.cpp

# use openmp-opt-disable, the run goes wrong
clang++ -fopenmp -march=native -fopenmp-targets=amdgcn-amd-amdhsa
-Xopenmp-target=amdgcn-amd-amdhsa -march=gfx906 -O3 -DNDEBUG -ffast-math -mllvm
-openmp-opt-disable=true bug49021.cpp
[GPU Memory Error]

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20211007/729ac895/attachment.html>


More information about the llvm-bugs mailing list