[Openmp-commits] [openmp] ca17b26 - [libomptarget] [amdgpu] Fix copy-paste error setting NumThreads for a corner case.
Dhruva Chakrabarti via Openmp-commits
openmp-commits at lists.llvm.org
Mon May 24 15:23:58 PDT 2021
Author: Dhruva Chakrabarti
Date: 2021-05-24T15:23:15-07:00
New Revision: ca17b26d4d7a1bd95346184d3f3ccdf006c33781
URL: https://github.com/llvm/llvm-project/commit/ca17b26d4d7a1bd95346184d3f3ccdf006c33781
DIFF: https://github.com/llvm/llvm-project/commit/ca17b26d4d7a1bd95346184d3f3ccdf006c33781.diff
LOG: [libomptarget] [amdgpu] Fix copy-paste error setting NumThreads for a corner case.
Fix the case where NumTeams was set incorrectly instead of NumThreads
Reviewed By: JonChesterfield
Differential Revision: https://reviews.llvm.org/D103037
Added:
Modified:
openmp/libomptarget/plugins/amdgpu/src/rtl.cpp
Removed:
################################################################################
diff --git a/openmp/libomptarget/plugins/amdgpu/src/rtl.cpp b/openmp/libomptarget/plugins/amdgpu/src/rtl.cpp
index de76b80be931..51fc0a188ced 100644
--- a/openmp/libomptarget/plugins/amdgpu/src/rtl.cpp
+++ b/openmp/libomptarget/plugins/amdgpu/src/rtl.cpp
@@ -836,7 +836,7 @@ int32_t __tgt_rtl_init_device(int device_id) {
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]);
}
More information about the Openmp-commits
mailing list