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: unassignedclangb...@nondot.org
Reporter: xw111lu...@gmail.com
CC: llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs