mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 05:56:36 +08:00
fix: add unrecoverable to avoid out of bound access
Related-To: NEO-9038 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
95eb5df978
commit
ad2701ad26
@@ -165,12 +165,11 @@ template <>
|
||||
uint32_t ProductHelperHw<gfxProduct>::computeMaxNeededSubSliceSpace(const HardwareInfo &hwInfo) const {
|
||||
const uint32_t highestEnabledSlice = NEO::GfxCoreHelper::getHighestEnabledSlice(hwInfo);
|
||||
|
||||
UNRECOVERABLE_IF(highestEnabledSlice == 0);
|
||||
UNRECOVERABLE_IF(hwInfo.gtSystemInfo.MaxSlicesSupported == 0);
|
||||
auto subSlicesPerSlice = hwInfo.gtSystemInfo.MaxSubSlicesSupported / hwInfo.gtSystemInfo.MaxSlicesSupported;
|
||||
auto maxSubSlice = highestEnabledSlice * subSlicesPerSlice;
|
||||
|
||||
if (highestEnabledSlice == 0) {
|
||||
UNRECOVERABLE_IF(true);
|
||||
}
|
||||
return maxSubSlice;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user