[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
This commit is contained in:
Dhruva Chakrabarti 2021-05-21 19:35:03 -07:00
parent 99155e913e
commit ca17b26d4d
1 changed files with 1 additions and 1 deletions

View File

@ -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]);
}