[Openmp-commits] [PATCH] D105250: Revert "[libomptarget] [amdgpu] Fix default setting of max flat workgroup size"
Dhruva Chakrabarti via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Wed Jun 30 17:11:49 PDT 2021
dhruvachak created this revision.
dhruvachak added a reviewer: JonChesterfield.
Herald added subscribers: kerbowa, t-tye, tpr, dstuttard, yaxunl, nhaehnle, jvesely, kzhuravl.
dhruvachak requested review of this revision.
Herald added subscribers: openmp-commits, wdng.
Herald added a project: OpenMP.
This reverts commit 2240b41ee4f30fe938975677a0a5a2c5c26d271b <https://reviews.llvm.org/rG2240b41ee4f30fe938975677a0a5a2c5c26d271b>.
A value of 0 for KernDescVal WG_Size implies it is unknown, so it should be
set to the default. The above change was made without this assumption.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D105250
Files:
openmp/libomptarget/plugins/amdgpu/src/rtl.cpp
Index: openmp/libomptarget/plugins/amdgpu/src/rtl.cpp
===================================================================
--- openmp/libomptarget/plugins/amdgpu/src/rtl.cpp
+++ openmp/libomptarget/plugins/amdgpu/src/rtl.cpp
@@ -1711,9 +1711,10 @@
// Get ExecMode
ExecModeVal = KernDescVal.Mode;
DP("ExecModeVal %d\n", ExecModeVal);
- // If KernDescVal.WG_Size is 0, it is equivalent to not
- // specified. Hence, max_flat_workgroup_size is filtered out in
- // getLaunchVals
+ if (KernDescVal.WG_Size == 0) {
+ KernDescVal.WG_Size = RTLDeviceInfoTy::Default_WG_Size;
+ DP("Setting KernDescVal.WG_Size to default %d\n", KernDescVal.WG_Size);
+ }
WGSizeVal = KernDescVal.WG_Size;
DP("WGSizeVal %d\n", WGSizeVal);
check("Loading KernDesc computation property", err);
@@ -1930,7 +1931,7 @@
}
}
// check flat_max_work_group_size attr here
- if (ConstWGSize > 0 && threadsPerGroup > ConstWGSize) {
+ if (threadsPerGroup > ConstWGSize) {
threadsPerGroup = ConstWGSize;
DP("Reduced threadsPerGroup to flat-attr-group-size limit %d\n",
threadsPerGroup);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105250.355730.patch
Type: text/x-patch
Size: 1157 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20210701/e3515921/attachment.bin>
More information about the Openmp-commits
mailing list