[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 09:39:25 PDT 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rG85c2d92b9b32: [openmp][AMDGPU] - Correct getNumberOfBlocks calculation. (authored by estewart08).
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.472653.patch
Type: text/x-patch
Size: 589 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20221102/cd2cde8f/attachment-0001.bin>
More information about the Openmp-commits
mailing list