SWDEV-453577 - Fixes to account for right CU count based on WGP or CU mode
Change-Id: Ib9739f9917bc6ff69cc76f444d909311922ebc1e
[ROCm/clr commit: fcfe2ec88b]
Tento commit je obsažen v:
odevzdal
Sourabh Betigeri
rodič
867769b0ec
revize
26b7b7b951
@@ -420,8 +420,14 @@ hipError_t ihipOccupancyMaxActiveBlocksPerMultiprocessor(
|
||||
// If the best block size is smaller than the block size used to fit the maximum,
|
||||
// then we need to make the grid bigger for full occupancy.
|
||||
const int bestBlocksPerCU = alu_limited_threads / (*bestBlockSize);
|
||||
uint32_t maxCUs = device.info().maxComputeUnits_;
|
||||
if (wrkGrpInfo->isWGPMode_ == false && device.settings().enableWgpMode_ == true) {
|
||||
maxCUs *= 2;
|
||||
} else if ((wrkGrpInfo->isWGPMode_ == true && device.settings().enableWgpMode_ == false)) {
|
||||
maxCUs /= 2;
|
||||
}
|
||||
// Unless those blocks are further constrained by LDS size.
|
||||
*numBlocksPerGrid = device.info().maxComputeUnits_ * std::min(bestBlocksPerCU, lds_occupancy_wgs);
|
||||
*numBlocksPerGrid = (maxCUs * std::min(bestBlocksPerCU, lds_occupancy_wgs));
|
||||
|
||||
return hipSuccess;
|
||||
}
|
||||
|
||||
Odkázat v novém úkolu
Zablokovat Uživatele