From ca17b26d4d7a1bd95346184d3f3ccdf006c33781 Mon Sep 17 00:00:00 2001 From: Dhruva Chakrabarti Date: Fri, 21 May 2021 19:35:03 -0700 Subject: [PATCH] [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 --- openmp/libomptarget/plugins/amdgpu/src/rtl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]); }