mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
W/A add limitation on preferred slm on some platforms
Signed-off-by: Maciej Plewka <maciej.plewka@intel.com> Related-To: NEO-7323, NEO-7340, HSD-14017341140, HSD-14017348303
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
f22890f74f
commit
72f33b898d
@@ -18,6 +18,7 @@
|
||||
#include "shared/test/unit_test/os_interface/hw_info_config_tests.h"
|
||||
|
||||
#include "aubstream/product_family.h"
|
||||
#include "platforms.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
@@ -176,3 +177,50 @@ MTLTEST_F(MtlProductHelper, givenMtlLpgWhenIsBFloat16ConversionSupportedIsCalled
|
||||
|
||||
EXPECT_FALSE(productHelper->isBFloat16ConversionSupported(hwInfo));
|
||||
}
|
||||
|
||||
MTLTEST_F(MtlProductHelper, givenMtlLpgMdA0WhengetProductMaxPreferredSlmSizeThen96KbValueReturned) {
|
||||
using PREFERRED_SLM_ALLOCATION_SIZE = typename XeHpgCoreFamily::INTERFACE_DESCRIPTOR_DATA::PREFERRED_SLM_ALLOCATION_SIZE;
|
||||
PREFERRED_SLM_ALLOCATION_SIZE preferredEnumValue = PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_0K;
|
||||
auto hwInfo = *defaultHwInfo.get();
|
||||
HardwareIpVersion aotConfig = {0};
|
||||
aotConfig.value = AOT::XE_LPG_MD_A0;
|
||||
auto &compilerProductHelper = this->executionEnvironment->rootDeviceEnvironments[0]->getHelper<CompilerProductHelper>();
|
||||
compilerProductHelper.setProductConfigForHwInfo(hwInfo, aotConfig);
|
||||
preferredEnumValue = static_cast<PREFERRED_SLM_ALLOCATION_SIZE>(productHelper->getProductMaxPreferredSlmSize(hwInfo, preferredEnumValue));
|
||||
EXPECT_EQ(preferredEnumValue, PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_96K);
|
||||
}
|
||||
|
||||
MTLTEST_F(MtlProductHelper, givenMtlLpgLgA0WhengetProductMaxPreferredSlmSizeThen96KbValueReturned) {
|
||||
using PREFERRED_SLM_ALLOCATION_SIZE = typename XeHpgCoreFamily::INTERFACE_DESCRIPTOR_DATA::PREFERRED_SLM_ALLOCATION_SIZE;
|
||||
PREFERRED_SLM_ALLOCATION_SIZE preferredEnumValue = PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_0K;
|
||||
auto hwInfo = *defaultHwInfo.get();
|
||||
HardwareIpVersion aotConfig = {0};
|
||||
aotConfig.value = AOT::XE_LPG_LG_A0;
|
||||
auto &compilerProductHelper = this->executionEnvironment->rootDeviceEnvironments[0]->getHelper<CompilerProductHelper>();
|
||||
compilerProductHelper.setProductConfigForHwInfo(hwInfo, aotConfig);
|
||||
preferredEnumValue = static_cast<PREFERRED_SLM_ALLOCATION_SIZE>(productHelper->getProductMaxPreferredSlmSize(hwInfo, preferredEnumValue));
|
||||
EXPECT_EQ(preferredEnumValue, PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_96K);
|
||||
}
|
||||
MTLTEST_F(MtlProductHelper, givenMtlLpgMdB0WhengetProductMaxPreferredSlmSizeThenPassedValueReturned) {
|
||||
using PREFERRED_SLM_ALLOCATION_SIZE = typename XeHpgCoreFamily::INTERFACE_DESCRIPTOR_DATA::PREFERRED_SLM_ALLOCATION_SIZE;
|
||||
PREFERRED_SLM_ALLOCATION_SIZE preferredEnumValue = PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_0K;
|
||||
auto hwInfo = *defaultHwInfo.get();
|
||||
HardwareIpVersion aotConfig = {0};
|
||||
aotConfig.value = AOT::XE_LPG_MD_B0;
|
||||
auto &compilerProductHelper = this->executionEnvironment->rootDeviceEnvironments[0]->getHelper<CompilerProductHelper>();
|
||||
compilerProductHelper.setProductConfigForHwInfo(hwInfo, aotConfig);
|
||||
preferredEnumValue = static_cast<PREFERRED_SLM_ALLOCATION_SIZE>(productHelper->getProductMaxPreferredSlmSize(hwInfo, preferredEnumValue));
|
||||
EXPECT_EQ(preferredEnumValue, PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_0K);
|
||||
}
|
||||
|
||||
MTLTEST_F(MtlProductHelper, givenMtlLpgLgB0WhengetProductMaxPreferredSlmSizeThenPassedValueReturned) {
|
||||
using PREFERRED_SLM_ALLOCATION_SIZE = typename XeHpgCoreFamily::INTERFACE_DESCRIPTOR_DATA::PREFERRED_SLM_ALLOCATION_SIZE;
|
||||
PREFERRED_SLM_ALLOCATION_SIZE preferredEnumValue = PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_0K;
|
||||
auto hwInfo = *defaultHwInfo.get();
|
||||
HardwareIpVersion aotConfig = {0};
|
||||
aotConfig.value = AOT::XE_LPG_LG_B0;
|
||||
auto &compilerProductHelper = this->executionEnvironment->rootDeviceEnvironments[0]->getHelper<CompilerProductHelper>();
|
||||
compilerProductHelper.setProductConfigForHwInfo(hwInfo, aotConfig);
|
||||
preferredEnumValue = static_cast<PREFERRED_SLM_ALLOCATION_SIZE>(productHelper->getProductMaxPreferredSlmSize(hwInfo, preferredEnumValue));
|
||||
EXPECT_EQ(preferredEnumValue, PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_0K);
|
||||
}
|
||||
Reference in New Issue
Block a user