[Openmp-commits] [PATCH] D103037: [libomptarget] [amdgpu] Fix copy-paste error setting NumThreads for a corner case.

Dhruva Chakrabarti via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon May 24 11:26:06 PDT 2021


dhruvachak created this revision.
dhruvachak added reviewers: JonChesterfield, jdoerfert, ronlieb.
Herald added subscribers: foad, 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.

Fix the case where NumTeams was set incorrectly instead of NumThreads


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D103037

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
@@ -836,7 +836,7 @@
      RTLDeviceInfoTy::Default_WG_Size);
   if (DeviceInfo.NumThreads[device_id] >
       DeviceInfo.ThreadsPerGroup[device_id]) {
-    DeviceInfo.NumTeams[device_id] = DeviceInfo.ThreadsPerGroup[device_id];
+    DeviceInfo.NumThreads[device_id] = DeviceInfo.ThreadsPerGroup[device_id];
     DP("Default number of threads exceeds device limit, capping at %d\n",
        DeviceInfo.ThreadsPerGroup[device_id]);
   }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103037.347460.patch
Type: text/x-patch
Size: 659 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20210524/2659e48f/attachment.bin>


More information about the Openmp-commits mailing list