[llvm-bugs] [Bug 52109] New: Incorrect data sharing analysis leads to kernel crash
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Oct 7 13:25:16 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=52109
Bug ID: 52109
Summary: Incorrect data sharing analysis leads to kernel crash
Product: OpenMP
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Clang Compiler Support
Assignee: unassignedclangbugs at nondot.org
Reporter: xjin at anl.gov
CC: llvm-bugs at lists.llvm.org
https://godbolt.org/z/4o7fbPbYW
First, the compiler finds data sharing, which is incorrect. There's no sharing
of these stack variables.
example.cpp:820:62: remark: Found thread data sharing on the GPU. Expect
degraded performance due to data globalization. [OMP112]
[-Rpass-missed=openmp-opt]
ColorSpinor<typename Arg::realIn, Arg::nColor, Arg::nSpin> in =
arg.in(x_cb, (parity+arg.inParity)&1);
^
example.cpp:821:63: remark: Found thread data sharing on the GPU. Expect
degraded performance due to data globalization. [OMP112]
[-Rpass-missed=openmp-opt]
ColorSpinor<typename Arg::realOut, Arg::nColor, Arg::nSpin>
out;
^
example.cpp:665:8: remark: Found thread data sharing on the GPU. Expect
degraded performance due to data globalization. [OMP112]
[-Rpass-missed=openmp-opt]
real v[length];
^
example.cpp:682:8: remark: Found thread data sharing on the GPU. Expect
degraded performance due to data globalization. [OMP112]
[-Rpass-missed=openmp-opt]
real v[length];
^
Second, the generated code crashes in kernels, with
CUDA error: an illegal memory access was encountered
Close inspections (debug by commenting out code) show that some of the accesses
to the above variables caused the illegal memory access.
--
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/24c440a8/attachment.html>
More information about the llvm-bugs
mailing list