[Openmp-commits] [PATCH] D137261: [openmp][AMDGPU] - Correct getNumberOfBlocks calculation.
Ethan Stewart via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Wed Nov 2 08:50:12 PDT 2022
estewart08 updated this revision to Diff 472632.
estewart08 added a comment.
Adding clang-format to PATH.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137261/new/
https://reviews.llvm.org/D137261
Files:
openmp/libomptarget/DeviceRTL/src/Mapping.cpp
Index: openmp/libomptarget/DeviceRTL/src/Mapping.cpp
===================================================================
--- openmp/libomptarget/DeviceRTL/src/Mapping.cpp
+++ openmp/libomptarget/DeviceRTL/src/Mapping.cpp
@@ -79,7 +79,9 @@
uint32_t getBlockId() { return __builtin_amdgcn_workgroup_id_x(); }
-uint32_t getNumberOfBlocks() { return __builtin_amdgcn_grid_size_x(); }
+uint32_t getNumberOfBlocks() {
+ return __builtin_amdgcn_grid_size_x() / __builtin_amdgcn_workgroup_size_x();
+}
uint32_t getWarpId() {
return impl::getThreadIdInBlock() / mapping::getWarpSize();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137261.472632.patch
Type: text/x-patch
Size: 589 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20221102/53fe842e/attachment.bin>
More information about the Openmp-commits
mailing list