fix: correct programming preferred slm size for 12.70/12.71 releases

do not exceed 96K slm allocation size

Related-To: HSD-14019148270, HSD-14019142146
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2023-06-30 09:17:21 +00:00
committed by Compute-Runtime-Automation
parent 1e8a53bd53
commit 8327a68c9b
3 changed files with 28 additions and 56 deletions

View File

@@ -12,6 +12,8 @@
#include "platforms.h"
#include "release_definitions.h"
#include <algorithm>
namespace NEO {
constexpr auto release = ReleaseType::release1270;
@@ -23,11 +25,7 @@ bool ReleaseHelperHw<release>::isPipeControlPriorToNonPipelinedStateCommandsWARe
template <>
int ReleaseHelperHw<release>::getProductMaxPreferredSlmSize(int preferredEnumValue) const {
using PREFERRED_SLM_ALLOCATION_SIZE = typename XeHpgCoreFamily::INTERFACE_DESCRIPTOR_DATA::PREFERRED_SLM_ALLOCATION_SIZE;
if (hardwareIpVersion.value == AOT::MTL_M_A0) {
return static_cast<int>(PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_96K);
}
return preferredEnumValue;
return std::min(preferredEnumValue, static_cast<int>(PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_96K));
}
} // namespace NEO

View File

@@ -12,6 +12,8 @@
#include "platforms.h"
#include "release_definitions.h"
#include <algorithm>
namespace NEO {
constexpr auto release = ReleaseType::release1271;
@@ -23,11 +25,7 @@ bool ReleaseHelperHw<release>::isPipeControlPriorToNonPipelinedStateCommandsWARe
template <>
int ReleaseHelperHw<release>::getProductMaxPreferredSlmSize(int preferredEnumValue) const {
using PREFERRED_SLM_ALLOCATION_SIZE = typename XeHpgCoreFamily::INTERFACE_DESCRIPTOR_DATA::PREFERRED_SLM_ALLOCATION_SIZE;
if (hardwareIpVersion.value == AOT::MTL_P_A0) {
return static_cast<int>(PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_96K);
}
return preferredEnumValue;
return std::min(preferredEnumValue, static_cast<int>(PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_96K));
}
} // namespace NEO