SWDEV-434846 - Correct the vgprs per simd for MI300

Change-Id: Id4862da7611f64392bfc1538fb644801ec0a9e7f
Этот коммит содержится в:
Satyanvesh Dittakavi
2023-12-12 07:46:22 +00:00
родитель 12461dbd6a
Коммит b2102fe939
2 изменённых файлов: 8 добавлений и 2 удалений
+6
Просмотреть файл
@@ -372,6 +372,12 @@ hipError_t ihipOccupancyMaxActiveBlocksPerMultiprocessor(
VgprWaves = maxVGPRs / amd::alignUp(wrkGrpInfo->usedVGPRs_, VgprGranularity);
}
if (VgprWaves == 0) {
// This should not happen ideally, but in case the usedVGPRs_/availableVGPRs_ values are
// incorrect, it can lead to a crash. By returning error, API can exit gracefully.
return hipErrorUnknown;
}
size_t GprWaves = VgprWaves;
if (wrkGrpInfo->usedSGPRs_ > 0) {
size_t maxSGPRs = device.info().sgprsPerSimd_;