forked from OSchip/llvm-project
[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:
parent
99155e913e
commit
ca17b26d4d
|
@ -836,7 +836,7 @@ int32_t __tgt_rtl_init_device(int device_id) {
|
||||||
RTLDeviceInfoTy::Default_WG_Size);
|
RTLDeviceInfoTy::Default_WG_Size);
|
||||||
if (DeviceInfo.NumThreads[device_id] >
|
if (DeviceInfo.NumThreads[device_id] >
|
||||||
DeviceInfo.ThreadsPerGroup[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",
|
DP("Default number of threads exceeds device limit, capping at %d\n",
|
||||||
DeviceInfo.ThreadsPerGroup[device_id]);
|
DeviceInfo.ThreadsPerGroup[device_id]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue