[PATCH] D94745: [OpenMP][WIP] Build the deviceRTLs with OpenMP instead of target dependent language - NOT FOR REVIEW
Shilei Tian via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 25 15:31:36 PST 2021
tianshilei1992 added inline comments.
================
Comment at: openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt:16
+# TODO: This part can also be removed if we can change the clang driver to make
+# it support device only compilation.
+if(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "x86_64")
----------------
JonChesterfield wrote:
> From @jdoerfert,
>
> ```-Xclang -fopenmp-is-device -Xclang -emit-llvm-bc```
> should do device-only
If I drop `-fopenmp -Xclang -aux-triple -Xclang ${aux_triple}`, a warning will be emitted:
```
/home/shiltian/Documents/vscode/llvm-project/openmp/libomptarget/deviceRTLs/nvptx/src/target_impl.cu:129:10: warning: large atomic operation may incur significant performance penalty; the access size (4 bytes) exceeds the max lock-free size (0 bytes) [-Watomic-alignment]
return __atomic_fetch_add(Address, Val, __ATOMIC_SEQ_CST);
^
/home/shiltian/Documents/vscode/llvm-project/openmp/libomptarget/deviceRTLs/nvptx/src/target_impl.cu:136:10: warning: large atomic operation may incur significant performance penalty; the access size (4 bytes) exceeds the max lock-free size (0 bytes) [-Watomic-alignment]
return __atomic_fetch_max(Address, Val, __ATOMIC_SEQ_CST);
^
/home/shiltian/Documents/vscode/llvm-project/openmp/libomptarget/deviceRTLs/nvptx/src/target_impl.cu:141:3: warning: large atomic operation may incur significant performance penalty; the access size (4 bytes) exceeds the max lock-free size (0 bytes) [-Watomic-alignment]
__atomic_exchange(Address, &Val, &R, __ATOMIC_SEQ_CST);
^
/home/shiltian/Documents/vscode/llvm-project/openmp/libomptarget/deviceRTLs/nvptx/src/target_impl.cu:147:9: warning: large atomic operation may incur significant performance penalty; the access size (4 bytes) exceeds the max lock-free size (0 bytes) [-Watomic-alignment]
(void)__atomic_compare_exchange(Address, &Compare, &Val, false,
^
/home/shiltian/Documents/vscode/llvm-project/openmp/libomptarget/deviceRTLs/nvptx/src/target_impl.cu:155:3: warning: large atomic operation may incur significant performance penalty; the access size (8 bytes) exceeds the max lock-free size (0 bytes) [-Watomic-alignment]
__atomic_exchange(Address, &Val, &R, __ATOMIC_SEQ_CST);
^
/home/shiltian/Documents/vscode/llvm-project/openmp/libomptarget/deviceRTLs/nvptx/src/target_impl.cu:161:10: warning: large atomic operation may incur significant performance penalty; the access size (8 bytes) exceeds the max lock-free size (0 bytes) [-Watomic-alignment]
return __atomic_fetch_add(Address, Val, __ATOMIC_SEQ_CST);
^
6 warnings generated.
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94745/new/
https://reviews.llvm.org/D94745
More information about the cfe-commits
mailing list