feature: Add support for MTL

Related-To: NEO-7111

Signed-off-by: Naklicki, Mateusz <mateusz.naklicki@intel.com>
This commit is contained in:
Naklicki, Mateusz
2022-12-01 12:50:08 +00:00
committed by Compute-Runtime-Automation
parent ceda3f65c2
commit a7d8a93b4e
69 changed files with 2075 additions and 5 deletions

View File

@@ -29,6 +29,7 @@ target_sources(neo_shared_tests PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/get_info_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/hash_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/heap_assigner_shared_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/hw_aot_config_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_default_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_tests_dg2_or_below.cpp

View File

@@ -0,0 +1,67 @@
/*
* Copyright (C) 2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/helpers/compiler_hw_info_config.h"
#include "shared/test/unit_test/fixtures/product_config_fixture.h"
using namespace NEO;
HWTEST2_P(ProductConfigHwInfoBadArchTests, givenAotConfigWithIncorrectArchWhenGetProductConfigThenUnknownIsaIsReturned, IsAtLeastMtl) {
HardwareIpVersion aotConfig = {0};
aotConfig.value = productConfig;
hwInfo.ipVersion.architecture = invalidConfig.architecture;
hwInfo.ipVersion.release = aotConfig.release;
hwInfo.ipVersion.revision = aotConfig.revision;
auto ret = productHelper->getProductConfigFromHwInfo(hwInfo);
EXPECT_EQ(ret, AOT::UNKNOWN_ISA);
}
HWTEST2_P(ProductConfigHwInfoBadRevisionTests, givenAotConfigWithIncorrectRevisionIdWhenGetProductConfigThenUnknownIsaIsReturned, IsAtLeastMtl) {
HardwareIpVersion aotConfig = {0};
aotConfig.value = productConfig;
hwInfo.ipVersion.architecture = aotConfig.architecture;
hwInfo.ipVersion.release = aotConfig.release;
hwInfo.ipVersion.revision = invalidConfig.revision;
auto ret = productHelper->getProductConfigFromHwInfo(hwInfo);
EXPECT_EQ(ret, AOT::UNKNOWN_ISA);
}
HWTEST2_P(ProductConfigHwInfoTests, givenAotConfigWhenSetHwInfoGmdIdThenCorrectValueIsSet, IsAtLeastMtl) {
HardwareIpVersion aotConfig = {0};
aotConfig.value = productConfig;
CompilerProductHelper::get(productFamily)->setProductConfigForHwInfo(hwInfo, aotConfig);
EXPECT_EQ(hwInfo.ipVersion.architecture, aotConfig.architecture);
EXPECT_EQ(hwInfo.ipVersion.release, aotConfig.release);
EXPECT_EQ(hwInfo.ipVersion.revision, aotConfig.revision);
}
HWTEST2_P(ProductConfigHwInfoTests, givenAotConfigWithIncorrectReleaseWhenGetProductConfigThenUnknownIsaIsReturned, IsAtLeastMtl) {
HardwareIpVersion aotConfig = {0};
aotConfig.value = productConfig;
hwInfo.ipVersion.architecture = aotConfig.architecture;
hwInfo.ipVersion.release = invalidConfig.release;
hwInfo.ipVersion.revision = aotConfig.revision;
auto ret = productHelper->getProductConfigFromHwInfo(hwInfo);
EXPECT_EQ(ret, AOT::UNKNOWN_ISA);
}
HWTEST2_P(ProductConfigHwInfoTests, givenUnknownAotConfigWhenGetProductConfigThenUnknownIsaIsReturned, IsAtLeastMtl) {
hwInfo.ipVersion = {};
auto ret = productHelper->getProductConfigFromHwInfo(hwInfo);
EXPECT_EQ(ret, AOT::UNKNOWN_ISA);
}
HWTEST2_P(ProductConfigHwInfoTests, givenAotConfigWhenGetProductConfigThenCorrectValueIsReturned, IsAtLeastMtl) {
HardwareIpVersion aotConfig = {0};
aotConfig.value = productConfig;
hwInfo.ipVersion.architecture = aotConfig.architecture;
hwInfo.ipVersion.release = aotConfig.release;
hwInfo.ipVersion.revision = aotConfig.revision;
auto ret = productHelper->getProductConfigFromHwInfo(hwInfo);
EXPECT_EQ(ret, productConfig);
}