SWDEV-526855 - Modify the SIMDPerCU calculation for gfx1250/1. (#275)
[ROCm/clr commit: acb1f7e8d5]
이 커밋은 다음에 포함됨:
@@ -404,8 +404,14 @@ hipError_t ihipOccupancyMaxActiveBlocksPerMultiprocessor(
|
|||||||
const size_t SgprWaves = maxSGPRs / amd::alignUp(wrkGrpInfo->usedSGPRs_, 16);
|
const size_t SgprWaves = maxSGPRs / amd::alignUp(wrkGrpInfo->usedSGPRs_, 16);
|
||||||
GprWaves = std::min(VgprWaves, SgprWaves);
|
GprWaves = std::min(VgprWaves, SgprWaves);
|
||||||
}
|
}
|
||||||
uint32_t simdPerCU = (device.isa().versionMajor() <= 9) ? device.info().simdPerCU_
|
|
||||||
: (wrkGrpInfo->isWGPMode_ ? 4 : 2);
|
// The table contains SIMD per CU, not per WGP, so when WGP mode is set on kernel metadata,
|
||||||
|
// multiply the number of SIMDs by 2, to account for 2CUs in 1 WGP.
|
||||||
|
uint32_t simdPerCU = device.isa().simdPerCU();
|
||||||
|
if (wrkGrpInfo->isWGPMode_) {
|
||||||
|
simdPerCU *= 2;
|
||||||
|
}
|
||||||
|
|
||||||
const size_t alu_occupancy = simdPerCU * std::min(MaxWavesPerSimd, GprWaves);
|
const size_t alu_occupancy = simdPerCU * std::min(MaxWavesPerSimd, GprWaves);
|
||||||
const int alu_limited_threads = alu_occupancy * wrkGrpInfo->wavefrontSize_;
|
const int alu_limited_threads = alu_occupancy * wrkGrpInfo->wavefrontSize_;
|
||||||
|
|
||||||
|
|||||||
새 이슈에서 참조
사용자 차단