2
0

SWDEV-373173 - Handle kernel compilation WGP/cumode in occupancy calculation

Change-Id: Id0225683a578c3275a35f8f807a57b6379746392


[ROCm/clr commit: ce8f441c14]
Este cometimento está contido em:
Anusha GodavarthySurya
2023-01-02 12:26:12 +00:00
cometido por Anusha Godavarthy Surya
ascendente a7a887ab05
cometimento e333f99dec
+3 -2
Ver ficheiro
@@ -352,8 +352,9 @@ hipError_t ihipOccupancyMaxActiveBlocksPerMultiprocessor(
const size_t SgprWaves = maxSGPRs / amd::alignUp(wrkGrpInfo->usedSGPRs_, 16);
GprWaves = std::min(VgprWaves, SgprWaves);
}
const size_t alu_occupancy = device.info().simdPerCU_ * std::min(MaxWavesPerSimd, GprWaves);
uint32_t simdPerCU = (device.isa().versionMajor() <= 9) ? device.info().simdPerCU_
: (wrkGrpInfo->isWGPMode_ ? 4 : 2);
const size_t alu_occupancy = simdPerCU * std::min(MaxWavesPerSimd, GprWaves);
const int alu_limited_threads = alu_occupancy * wrkGrpInfo->wavefrontSize_;
int lds_occupancy_wgs = INT_MAX;