Improve getThreadEuRatioForScratch helper

Related-To: NEO-6738

Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
Kamil Kopryk
2022-03-21 17:44:02 +00:00
committed by Compute-Runtime-Automation
parent 0fd8b850a6
commit 04a141698e
7 changed files with 13 additions and 13 deletions

View File

@@ -11,8 +11,9 @@ bool HwInfoConfigHw<gfxProduct>::isComputeDispatchAllWalkerEnableInComputeWalker
}
template <>
bool HwInfoConfigHw<gfxProduct>::isThreadEuRatio16ForScratchRequired(const HardwareInfo &hwInfo) const {
return true;
uint32_t HwInfoConfigHw<gfxProduct>::getThreadEuRatioForScratch(const HardwareInfo &hwInfo) const {
auto revId = hwInfo.platform.usRevId & XE_HPC_COREFamily::pvcSteppingBits;
return (0x3 <= revId) ? 16u : 8u;
}
template <>

View File

@@ -436,8 +436,7 @@ uint32_t HwHelperHw<Family>::getComputeUnitsUsedForScratch(const HardwareInfo *p
}
const auto &hwInfoConfig = *HwInfoConfig::get(pHwInfo->platform.eProductFamily);
auto revId = pHwInfo->platform.usRevId & Family::pvcSteppingBits;
uint32_t threadEuRatio = ((0x3 <= revId) && hwInfoConfig.isThreadEuRatio16ForScratchRequired(*pHwInfo)) ? 16 : 8;
uint32_t threadEuRatio = hwInfoConfig.getThreadEuRatioForScratch(*pHwInfo);
return pHwInfo->gtSystemInfo.MaxSubSlicesSupported * pHwInfo->gtSystemInfo.MaxEuPerSubSlice * threadEuRatio;
}