Unify definition of hardware ip version
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
parent
103f522f18
commit
23fd280334
|
@ -2277,8 +2277,8 @@ HWTEST_F(ModuleTranslationUnitTest, WhenCreatingFromNativeBinaryThenSetsUpPacked
|
||||||
PatchTokensTestData::ValidEmptyProgram programTokens;
|
PatchTokensTestData::ValidEmptyProgram programTokens;
|
||||||
const auto &hwInfoConfig = *NEO::HwInfoConfig::get(productFamily);
|
const auto &hwInfoConfig = *NEO::HwInfoConfig::get(productFamily);
|
||||||
NEO::HardwareInfo hwInfo = *NEO::defaultHwInfo;
|
NEO::HardwareInfo hwInfo = *NEO::defaultHwInfo;
|
||||||
AheadOfTimeConfig aotConfig = {0};
|
HardwareIpVersion aotConfig = {0};
|
||||||
aotConfig.ProductConfig = hwInfoConfig.getProductConfigFromHwInfo(hwInfo);
|
aotConfig.value = hwInfoConfig.getProductConfigFromHwInfo(hwInfo);
|
||||||
|
|
||||||
NEO::Ar::ArEncoder encoder;
|
NEO::Ar::ArEncoder encoder;
|
||||||
std::string requiredProduct = NEO::hardwarePrefix[productFamily];
|
std::string requiredProduct = NEO::hardwarePrefix[productFamily];
|
||||||
|
@ -2293,7 +2293,7 @@ HWTEST_F(ModuleTranslationUnitTest, WhenCreatingFromNativeBinaryThenSetsUpPacked
|
||||||
|
|
||||||
NEO::TargetDevice target;
|
NEO::TargetDevice target;
|
||||||
target.coreFamily = static_cast<GFXCORE_FAMILY>(programTokens.header->Device);
|
target.coreFamily = static_cast<GFXCORE_FAMILY>(programTokens.header->Device);
|
||||||
target.aotConfig.ProductConfig = hwInfoConfig.getProductConfigFromHwInfo(hwInfo);
|
target.aotConfig.value = hwInfoConfig.getProductConfigFromHwInfo(hwInfo);
|
||||||
target.stepping = programTokens.header->SteppingId;
|
target.stepping = programTokens.header->SteppingId;
|
||||||
target.maxPointerSizeInBytes = programTokens.header->GPUPointerSizeInBytes;
|
target.maxPointerSizeInBytes = programTokens.header->GPUPointerSizeInBytes;
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ TEST_F(OclocArgHelperTests, givenProductOrAotConfigWhenParseMajorMinorRevisionVa
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const auto &device : enabledDeviceConfigs) {
|
for (const auto &device : enabledDeviceConfigs) {
|
||||||
auto productConfig = static_cast<AOT::PRODUCT_CONFIG>(device.aotConfig.ProductConfig);
|
auto productConfig = static_cast<AOT::PRODUCT_CONFIG>(device.aotConfig.value);
|
||||||
auto configStr0 = ProductConfigHelper::parseMajorMinorRevisionValue(productConfig);
|
auto configStr0 = ProductConfigHelper::parseMajorMinorRevisionValue(productConfig);
|
||||||
auto configStr1 = ProductConfigHelper::parseMajorMinorRevisionValue(device.aotConfig);
|
auto configStr1 = ProductConfigHelper::parseMajorMinorRevisionValue(device.aotConfig);
|
||||||
EXPECT_STREQ(configStr0.c_str(), configStr1.c_str());
|
EXPECT_STREQ(configStr0.c_str(), configStr1.c_str());
|
||||||
|
@ -56,7 +56,7 @@ TEST_F(OclocArgHelperTests, givenProductConfigAcronymWhenCheckAllEnabledThenCorr
|
||||||
EXPECT_TRUE(acronymFound);
|
EXPECT_TRUE(acronymFound);
|
||||||
|
|
||||||
device.acronyms.clear();
|
device.acronyms.clear();
|
||||||
device.aotConfig.ProductConfig = AOT::UNKNOWN_ISA;
|
device.aotConfig.value = AOT::UNKNOWN_ISA;
|
||||||
|
|
||||||
enabledAcronyms = argHelper->getEnabledProductAcronyms();
|
enabledAcronyms = argHelper->getEnabledProductAcronyms();
|
||||||
acronymFound = std::any_of(enabledAcronyms.begin(), enabledAcronyms.end(), findAcronym(acronym));
|
acronymFound = std::any_of(enabledAcronyms.begin(), enabledAcronyms.end(), findAcronym(acronym));
|
||||||
|
|
|
@ -191,7 +191,7 @@ TEST(OclocFatBinaryRequestedFatBinary, givenDeviceArgToFatBinaryWhenConfigIsNotF
|
||||||
auto aotConfig = allEnabledDeviceConfigs[0].aotConfig;
|
auto aotConfig = allEnabledDeviceConfigs[0].aotConfig;
|
||||||
|
|
||||||
std::stringstream majorString;
|
std::stringstream majorString;
|
||||||
majorString << aotConfig.ProductConfigID.Major;
|
majorString << aotConfig.architecture;
|
||||||
auto major = majorString.str();
|
auto major = majorString.str();
|
||||||
|
|
||||||
auto aotValue0 = argHelper->productConfigHelper->getProductConfigForVersionValue(major);
|
auto aotValue0 = argHelper->productConfigHelper->getProductConfigForVersionValue(major);
|
||||||
|
|
|
@ -16,9 +16,9 @@ TEST_P(OclocProductConfigTests, GivenProductConfigValuesWhenInitHardwareInfoThen
|
||||||
auto &allSupportedConfigs = mockOfflineCompiler->argHelper->productConfigHelper->getDeviceAotInfo();
|
auto &allSupportedConfigs = mockOfflineCompiler->argHelper->productConfigHelper->getDeviceAotInfo();
|
||||||
|
|
||||||
for (const auto &deviceConfig : allSupportedConfigs) {
|
for (const auto &deviceConfig : allSupportedConfigs) {
|
||||||
if (aotConfig.ProductConfig == deviceConfig.aotConfig.ProductConfig) {
|
if (aotConfig.value == deviceConfig.aotConfig.value) {
|
||||||
deviceId = deviceConfig.deviceIds->front();
|
deviceId = deviceConfig.deviceIds->front();
|
||||||
revId = deviceConfig.aotConfig.ProductConfigID.Revision;
|
revId = deviceConfig.aotConfig.revision;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,11 +12,11 @@
|
||||||
namespace NEO {
|
namespace NEO {
|
||||||
struct OclocProductConfigTests : public ::testing::TestWithParam<std::tuple<AOT::PRODUCT_CONFIG, PRODUCT_FAMILY>> {
|
struct OclocProductConfigTests : public ::testing::TestWithParam<std::tuple<AOT::PRODUCT_CONFIG, PRODUCT_FAMILY>> {
|
||||||
void SetUp() override {
|
void SetUp() override {
|
||||||
std::tie(aotConfig.ProductConfig, productFamily) = GetParam();
|
std::tie(aotConfig.value, productFamily) = GetParam();
|
||||||
mockOfflineCompiler = std::make_unique<MockOfflineCompiler>();
|
mockOfflineCompiler = std::make_unique<MockOfflineCompiler>();
|
||||||
}
|
}
|
||||||
|
|
||||||
AheadOfTimeConfig aotConfig;
|
HardwareIpVersion aotConfig;
|
||||||
PRODUCT_FAMILY productFamily;
|
PRODUCT_FAMILY productFamily;
|
||||||
std::unique_ptr<MockOfflineCompiler> mockOfflineCompiler;
|
std::unique_ptr<MockOfflineCompiler> mockOfflineCompiler;
|
||||||
};
|
};
|
||||||
|
|
|
@ -534,7 +534,7 @@ TEST_F(MockOfflineCompilerTests, givenProductConfigValueAndRevisionIdWhenInitHwI
|
||||||
auto config = AOT::UNKNOWN_ISA;
|
auto config = AOT::UNKNOWN_ISA;
|
||||||
for (const auto &deviceMapConfig : allEnabledDeviceConfigs) {
|
for (const auto &deviceMapConfig : allEnabledDeviceConfigs) {
|
||||||
if (productFamily == deviceMapConfig.hwInfo->platform.eProductFamily) {
|
if (productFamily == deviceMapConfig.hwInfo->platform.eProductFamily) {
|
||||||
config = static_cast<AOT::PRODUCT_CONFIG>(deviceMapConfig.aotConfig.ProductConfig);
|
config = static_cast<AOT::PRODUCT_CONFIG>(deviceMapConfig.aotConfig.value);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -809,7 +809,7 @@ TEST_F(OfflineCompilerTests, givenProductAcronymWhenIdsCommandIsInvokeThenSucces
|
||||||
std::vector<std::string> expected{};
|
std::vector<std::string> expected{};
|
||||||
auto product = ProductConfigHelper::getProductConfigForAcronym(productAcronym.str());
|
auto product = ProductConfigHelper::getProductConfigForAcronym(productAcronym.str());
|
||||||
for (const auto &device : supportedDevicesConfigs) {
|
for (const auto &device : supportedDevicesConfigs) {
|
||||||
if (device.aotConfig.ProductConfig == product) {
|
if (device.aotConfig.value == product) {
|
||||||
auto config = ProductConfigHelper::parseMajorMinorRevisionValue(device.aotConfig);
|
auto config = ProductConfigHelper::parseMajorMinorRevisionValue(device.aotConfig);
|
||||||
expected.push_back(config);
|
expected.push_back(config);
|
||||||
}
|
}
|
||||||
|
|
|
@ -164,7 +164,7 @@ bool OclocArgHelper::getHwInfoForProductConfig(uint32_t productConfig, NEO::Hard
|
||||||
|
|
||||||
const auto &deviceAotMap = productConfigHelper->getDeviceAotInfo();
|
const auto &deviceAotMap = productConfigHelper->getDeviceAotInfo();
|
||||||
for (auto &deviceConfig : deviceAotMap) {
|
for (auto &deviceConfig : deviceAotMap) {
|
||||||
if (deviceConfig.aotConfig.ProductConfig == productConfig) {
|
if (deviceConfig.aotConfig.value == productConfig) {
|
||||||
hwInfo = *deviceConfig.hwInfo;
|
hwInfo = *deviceConfig.hwInfo;
|
||||||
if (hwInfoConfig) {
|
if (hwInfoConfig) {
|
||||||
setHwInfoValuesFromConfig(hwInfoConfig, hwInfo);
|
setHwInfoValuesFromConfig(hwInfoConfig, hwInfo);
|
||||||
|
|
|
@ -86,8 +86,8 @@ void getProductsForRange(unsigned int productFrom, unsigned int productTo, std::
|
||||||
auto &allSuppportedProducts = argHelper->productConfigHelper->getDeviceAotInfo();
|
auto &allSuppportedProducts = argHelper->productConfigHelper->getDeviceAotInfo();
|
||||||
|
|
||||||
for (const auto &device : allSuppportedProducts) {
|
for (const auto &device : allSuppportedProducts) {
|
||||||
auto validAcronym = device.aotConfig.ProductConfig >= productFrom;
|
auto validAcronym = device.aotConfig.value >= productFrom;
|
||||||
validAcronym &= device.aotConfig.ProductConfig <= productTo;
|
validAcronym &= device.aotConfig.value <= productTo;
|
||||||
validAcronym &= !device.acronyms.empty();
|
validAcronym &= !device.acronyms.empty();
|
||||||
if (validAcronym) {
|
if (validAcronym) {
|
||||||
out.push_back(device.acronyms.front());
|
out.push_back(device.acronyms.front());
|
||||||
|
|
|
@ -170,7 +170,7 @@ int OfflineCompiler::queryAcronymIds(size_t numArgs, const std::vector<std::stri
|
||||||
} else if (helper->productConfigHelper->isProductConfig(queryAcronym)) {
|
} else if (helper->productConfigHelper->isProductConfig(queryAcronym)) {
|
||||||
auto product = ProductConfigHelper::getProductConfigForAcronym(queryAcronym);
|
auto product = ProductConfigHelper::getProductConfigForAcronym(queryAcronym);
|
||||||
for (const auto &device : enabledDevices) {
|
for (const auto &device : enabledDevices) {
|
||||||
if (device.aotConfig.ProductConfig == product) {
|
if (device.aotConfig.value == product) {
|
||||||
matchedVersions.push_back(ProductConfigHelper::parseMajorMinorRevisionValue(device.aotConfig));
|
matchedVersions.push_back(ProductConfigHelper::parseMajorMinorRevisionValue(device.aotConfig));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@ TargetDevice targetDeviceFromHwInfo(const HardwareInfo &hwInfo) {
|
||||||
|
|
||||||
targetDevice.coreFamily = hwInfo.platform.eRenderCoreFamily;
|
targetDevice.coreFamily = hwInfo.platform.eRenderCoreFamily;
|
||||||
targetDevice.productFamily = hwInfo.platform.eProductFamily;
|
targetDevice.productFamily = hwInfo.platform.eProductFamily;
|
||||||
targetDevice.aotConfig.ProductConfig = hwInfoConfig.getProductConfigFromHwInfo(hwInfo);
|
targetDevice.aotConfig.value = hwInfoConfig.getProductConfigFromHwInfo(hwInfo);
|
||||||
targetDevice.stepping = hwInfo.platform.usRevId;
|
targetDevice.stepping = hwInfo.platform.usRevId;
|
||||||
targetDevice.maxPointerSizeInBytes = sizeof(uintptr_t);
|
targetDevice.maxPointerSizeInBytes = sizeof(uintptr_t);
|
||||||
targetDevice.grfSize = hwInfo.capabilityTable.grfSize;
|
targetDevice.grfSize = hwInfo.capabilityTable.grfSize;
|
||||||
|
|
|
@ -57,7 +57,7 @@ inline const char *asString(DecodeError err) {
|
||||||
struct TargetDevice {
|
struct TargetDevice {
|
||||||
GFXCORE_FAMILY coreFamily = IGFX_UNKNOWN_CORE;
|
GFXCORE_FAMILY coreFamily = IGFX_UNKNOWN_CORE;
|
||||||
PRODUCT_FAMILY productFamily = IGFX_UNKNOWN;
|
PRODUCT_FAMILY productFamily = IGFX_UNKNOWN;
|
||||||
AheadOfTimeConfig aotConfig = {0};
|
HardwareIpVersion aotConfig = {0};
|
||||||
uint32_t stepping = 0U;
|
uint32_t stepping = 0U;
|
||||||
uint32_t maxPointerSizeInBytes = 4U;
|
uint32_t maxPointerSizeInBytes = 4U;
|
||||||
uint32_t grfSize = 32U;
|
uint32_t grfSize = 32U;
|
||||||
|
|
|
@ -79,6 +79,7 @@ set(NEO_CORE_HELPERS
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_tgllp_and_later.inl
|
${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_tgllp_and_later.inl
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/hw_info.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/hw_info.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/hw_info.h
|
${CMAKE_CURRENT_SOURCE_DIR}/hw_info.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/hw_ip_version.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/hw_walk_order.h
|
${CMAKE_CURRENT_SOURCE_DIR}/hw_walk_order.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/kernel_helpers.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/kernel_helpers.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/kernel_helpers.h
|
${CMAKE_CURRENT_SOURCE_DIR}/kernel_helpers.h
|
||||||
|
|
|
@ -10,8 +10,8 @@
|
||||||
|
|
||||||
namespace NEO {
|
namespace NEO {
|
||||||
template <PRODUCT_FAMILY gfxProduct>
|
template <PRODUCT_FAMILY gfxProduct>
|
||||||
void CompilerProductHelperHw<gfxProduct>::setProductConfigForHwInfo(HardwareInfo &hwInfo, AheadOfTimeConfig config) const {
|
void CompilerProductHelperHw<gfxProduct>::setProductConfigForHwInfo(HardwareInfo &hwInfo, HardwareIpVersion config) const {
|
||||||
hwInfo.platform.usRevId = config.ProductConfigID.Revision;
|
hwInfo.platform.usRevId = config.revision;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace NEO
|
} // namespace NEO
|
||||||
|
|
|
@ -28,7 +28,7 @@ class CompilerProductHelper {
|
||||||
virtual bool isForceEmuInt32DivRemSPRequired() const = 0;
|
virtual bool isForceEmuInt32DivRemSPRequired() const = 0;
|
||||||
virtual bool isStatelessToStatefulBufferOffsetSupported() const = 0;
|
virtual bool isStatelessToStatefulBufferOffsetSupported() const = 0;
|
||||||
virtual bool isForceToStatelessRequired() const = 0;
|
virtual bool isForceToStatelessRequired() const = 0;
|
||||||
virtual void setProductConfigForHwInfo(HardwareInfo &hwInfo, AheadOfTimeConfig config) const = 0;
|
virtual void setProductConfigForHwInfo(HardwareInfo &hwInfo, HardwareIpVersion config) const = 0;
|
||||||
virtual const char *getCachingPolicyOptions(bool isDebuggerActive) const = 0;
|
virtual const char *getCachingPolicyOptions(bool isDebuggerActive) const = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ class CompilerProductHelperHw : public CompilerProductHelper {
|
||||||
bool isForceEmuInt32DivRemSPRequired() const override;
|
bool isForceEmuInt32DivRemSPRequired() const override;
|
||||||
bool isStatelessToStatefulBufferOffsetSupported() const override;
|
bool isStatelessToStatefulBufferOffsetSupported() const override;
|
||||||
bool isForceToStatelessRequired() const override;
|
bool isForceToStatelessRequired() const override;
|
||||||
void setProductConfigForHwInfo(HardwareInfo &hwInfo, AheadOfTimeConfig config) const override;
|
void setProductConfigForHwInfo(HardwareInfo &hwInfo, HardwareIpVersion config) const override;
|
||||||
const char *getCachingPolicyOptions(bool isDebuggerActive) const override;
|
const char *getCachingPolicyOptions(bool isDebuggerActive) const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#include "shared/source/direct_submission/direct_submission_properties.h"
|
#include "shared/source/direct_submission/direct_submission_properties.h"
|
||||||
|
#include "shared/source/helpers/hw_ip_version.h"
|
||||||
#include "shared/source/helpers/kmd_notify_properties.h"
|
#include "shared/source/helpers/kmd_notify_properties.h"
|
||||||
|
|
||||||
#include "gtsysinfo.h"
|
#include "gtsysinfo.h"
|
||||||
|
@ -133,15 +134,6 @@ inline bool operator==(const RuntimeCapabilityTable &lhs, const RuntimeCapabilit
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct HardwareIpVersion {
|
|
||||||
uint8_t architecture{};
|
|
||||||
uint8_t release{};
|
|
||||||
uint8_t revision{};
|
|
||||||
|
|
||||||
protected:
|
|
||||||
uint8_t reserved[5]{};
|
|
||||||
};
|
|
||||||
|
|
||||||
struct HardwareInfo {
|
struct HardwareInfo {
|
||||||
HardwareInfo() = default;
|
HardwareInfo() = default;
|
||||||
HardwareInfo(const PLATFORM *platform, const FeatureTable *featureTable, const WorkaroundTable *workaroundTable,
|
HardwareInfo(const PLATFORM *platform, const FeatureTable *featureTable, const WorkaroundTable *workaroundTable,
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2022 Intel Corporation
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
|
namespace NEO {
|
||||||
|
struct HardwareIpVersion {
|
||||||
|
union {
|
||||||
|
uint32_t value;
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
uint32_t revision : 6;
|
||||||
|
uint32_t reserved : 8;
|
||||||
|
uint32_t release : 8;
|
||||||
|
uint32_t architecture : 10;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
} // namespace NEO
|
|
@ -21,7 +21,7 @@ ProductConfigHelper::ProductConfigHelper() : deviceAotInfo({
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ProductConfigHelper::compareConfigs(DeviceAotInfo deviceAotInfo0, DeviceAotInfo deviceAotInfo1) {
|
bool ProductConfigHelper::compareConfigs(DeviceAotInfo deviceAotInfo0, DeviceAotInfo deviceAotInfo1) {
|
||||||
return deviceAotInfo0.aotConfig.ProductConfig < deviceAotInfo1.aotConfig.ProductConfig;
|
return deviceAotInfo0.aotConfig.value < deviceAotInfo1.aotConfig.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<DeviceAotInfo> &ProductConfigHelper::getDeviceAotInfo() {
|
std::vector<DeviceAotInfo> &ProductConfigHelper::getDeviceAotInfo() {
|
||||||
|
@ -181,15 +181,15 @@ std::vector<NEO::ConstStringRef> ProductConfigHelper::getDeprecatedAcronyms() {
|
||||||
return deprecatedAcronyms;
|
return deprecatedAcronyms;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string ProductConfigHelper::parseMajorMinorRevisionValue(AheadOfTimeConfig config) {
|
std::string ProductConfigHelper::parseMajorMinorRevisionValue(NEO::HardwareIpVersion config) {
|
||||||
std::stringstream stringConfig;
|
std::stringstream stringConfig;
|
||||||
stringConfig << config.ProductConfigID.Major << "." << config.ProductConfigID.Minor << "." << config.ProductConfigID.Revision;
|
stringConfig << config.architecture << "." << config.release << "." << config.revision;
|
||||||
return stringConfig.str();
|
return stringConfig.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string ProductConfigHelper::parseMajorMinorValue(AheadOfTimeConfig config) {
|
std::string ProductConfigHelper::parseMajorMinorValue(NEO::HardwareIpVersion config) {
|
||||||
std::stringstream stringConfig;
|
std::stringstream stringConfig;
|
||||||
stringConfig << config.ProductConfigID.Major << "." << config.ProductConfigID.Minor;
|
stringConfig << config.architecture << "." << config.release;
|
||||||
return stringConfig.str();
|
return stringConfig.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -229,10 +229,10 @@ AOT::PRODUCT_CONFIG ProductConfigHelper::getProductConfigForVersionValue(const s
|
||||||
return AOT::UNKNOWN_ISA;
|
return AOT::UNKNOWN_ISA;
|
||||||
}
|
}
|
||||||
|
|
||||||
AheadOfTimeConfig product = {0};
|
NEO::HardwareIpVersion product = {0};
|
||||||
product.ProductConfigID.Major = major;
|
product.architecture = major;
|
||||||
product.ProductConfigID.Minor = minor;
|
product.release = minor;
|
||||||
product.ProductConfigID.Revision = revision;
|
product.revision = revision;
|
||||||
|
|
||||||
return static_cast<AOT::PRODUCT_CONFIG>(product.ProductConfig);
|
return static_cast<AOT::PRODUCT_CONFIG>(product.value);
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "shared/source/helpers/hw_ip_version.h"
|
||||||
#include "shared/source/utilities/const_stringref.h"
|
#include "shared/source/utilities/const_stringref.h"
|
||||||
|
|
||||||
#include "igfxfmid.h"
|
#include "igfxfmid.h"
|
||||||
|
@ -26,21 +27,8 @@ namespace NEO {
|
||||||
struct HardwareInfo;
|
struct HardwareInfo;
|
||||||
} // namespace NEO
|
} // namespace NEO
|
||||||
|
|
||||||
struct AheadOfTimeConfig {
|
|
||||||
union {
|
|
||||||
uint32_t ProductConfig;
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
uint32_t Revision : 6;
|
|
||||||
uint32_t Reserved : 8;
|
|
||||||
uint32_t Minor : 8;
|
|
||||||
uint32_t Major : 10;
|
|
||||||
} ProductConfigID;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
struct DeviceAotInfo {
|
struct DeviceAotInfo {
|
||||||
AheadOfTimeConfig aotConfig = {};
|
NEO::HardwareIpVersion aotConfig{};
|
||||||
const NEO::HardwareInfo *hwInfo = nullptr;
|
const NEO::HardwareInfo *hwInfo = nullptr;
|
||||||
const std::vector<unsigned short> *deviceIds = nullptr;
|
const std::vector<unsigned short> *deviceIds = nullptr;
|
||||||
AOT::FAMILY family = {};
|
AOT::FAMILY family = {};
|
||||||
|
@ -48,7 +36,7 @@ struct DeviceAotInfo {
|
||||||
std::vector<NEO::ConstStringRef> acronyms{};
|
std::vector<NEO::ConstStringRef> acronyms{};
|
||||||
|
|
||||||
bool operator==(const DeviceAotInfo &rhs) {
|
bool operator==(const DeviceAotInfo &rhs) {
|
||||||
return aotConfig.ProductConfig == rhs.aotConfig.ProductConfig && family == rhs.family && release == rhs.release && hwInfo == rhs.hwInfo;
|
return aotConfig.value == rhs.aotConfig.value && family == rhs.family && release == rhs.release && hwInfo == rhs.hwInfo;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -59,13 +47,13 @@ struct ProductConfigHelper {
|
||||||
MismatchedValue = -1,
|
MismatchedValue = -1,
|
||||||
};
|
};
|
||||||
static void adjustDeviceName(std::string &device);
|
static void adjustDeviceName(std::string &device);
|
||||||
static std::string parseMajorMinorValue(AheadOfTimeConfig config);
|
static std::string parseMajorMinorValue(NEO::HardwareIpVersion config);
|
||||||
static std::string parseMajorMinorRevisionValue(AheadOfTimeConfig config);
|
static std::string parseMajorMinorRevisionValue(NEO::HardwareIpVersion config);
|
||||||
static int parseProductConfigFromString(const std::string &device, size_t begin, size_t end);
|
static int parseProductConfigFromString(const std::string &device, size_t begin, size_t end);
|
||||||
inline static std::string parseMajorMinorRevisionValue(AOT::PRODUCT_CONFIG config) {
|
inline static std::string parseMajorMinorRevisionValue(AOT::PRODUCT_CONFIG config) {
|
||||||
std::stringstream stringConfig;
|
std::stringstream stringConfig;
|
||||||
AheadOfTimeConfig aotConfig = {0};
|
NEO::HardwareIpVersion aotConfig = {0};
|
||||||
aotConfig.ProductConfig = config;
|
aotConfig.value = config;
|
||||||
return parseMajorMinorRevisionValue(aotConfig);
|
return parseMajorMinorRevisionValue(aotConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -107,7 +95,7 @@ struct ProductConfigHelper {
|
||||||
|
|
||||||
template <typename EqComparableT>
|
template <typename EqComparableT>
|
||||||
static auto findProductConfig(const EqComparableT &lhs) {
|
static auto findProductConfig(const EqComparableT &lhs) {
|
||||||
return [&lhs](const auto &rhs) { return lhs == rhs.aotConfig.ProductConfig; };
|
return [&lhs](const auto &rhs) { return lhs == rhs.aotConfig.value; };
|
||||||
}
|
}
|
||||||
|
|
||||||
void initialize();
|
void initialize();
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
void ProductConfigHelper::initialize() {
|
void ProductConfigHelper::initialize() {
|
||||||
for (auto &device : deviceAotInfo) {
|
for (auto &device : deviceAotInfo) {
|
||||||
for (const auto &[acronym, value] : AOT::deviceAcronyms) {
|
for (const auto &[acronym, value] : AOT::deviceAcronyms) {
|
||||||
if (value == device.aotConfig.ProductConfig) {
|
if (value == device.aotConfig.value) {
|
||||||
device.acronyms.push_back(NEO::ConstStringRef(acronym));
|
device.acronyms.push_back(NEO::ConstStringRef(acronym));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,8 +60,8 @@ TEST(UnpackSingleDeviceBinaryAr, WhenBinaryWithProductConfigIsFoundThenChooseItA
|
||||||
PatchTokensTestData::ValidEmptyProgram programTokens;
|
PatchTokensTestData::ValidEmptyProgram programTokens;
|
||||||
const auto &hwInfoConfig = *NEO::HwInfoConfig::get(productFamily);
|
const auto &hwInfoConfig = *NEO::HwInfoConfig::get(productFamily);
|
||||||
NEO::HardwareInfo hwInfo = *NEO::defaultHwInfo;
|
NEO::HardwareInfo hwInfo = *NEO::defaultHwInfo;
|
||||||
AheadOfTimeConfig aotConfig = {0};
|
NEO::HardwareIpVersion aotConfig = {0};
|
||||||
aotConfig.ProductConfig = hwInfoConfig.getProductConfigFromHwInfo(hwInfo);
|
aotConfig.value = hwInfoConfig.getProductConfigFromHwInfo(hwInfo);
|
||||||
|
|
||||||
NEO::Ar::ArEncoder encoder;
|
NEO::Ar::ArEncoder encoder;
|
||||||
std::string requiredProduct = NEO::hardwarePrefix[productFamily];
|
std::string requiredProduct = NEO::hardwarePrefix[productFamily];
|
||||||
|
@ -101,8 +101,8 @@ TEST(UnpackSingleDeviceBinaryAr, WhenBinaryWithProductConfigIsFoundThenPackedTar
|
||||||
PatchTokensTestData::ValidEmptyProgram programTokens;
|
PatchTokensTestData::ValidEmptyProgram programTokens;
|
||||||
const auto &hwInfoConfig = *NEO::HwInfoConfig::get(productFamily);
|
const auto &hwInfoConfig = *NEO::HwInfoConfig::get(productFamily);
|
||||||
NEO::HardwareInfo hwInfo = *NEO::defaultHwInfo;
|
NEO::HardwareInfo hwInfo = *NEO::defaultHwInfo;
|
||||||
AheadOfTimeConfig aotConfig = {0};
|
NEO::HardwareIpVersion aotConfig = {0};
|
||||||
aotConfig.ProductConfig = hwInfoConfig.getProductConfigFromHwInfo(hwInfo);
|
aotConfig.value = hwInfoConfig.getProductConfigFromHwInfo(hwInfo);
|
||||||
|
|
||||||
NEO::Ar::ArEncoder encoder;
|
NEO::Ar::ArEncoder encoder;
|
||||||
std::string requiredProduct = NEO::hardwarePrefix[productFamily];
|
std::string requiredProduct = NEO::hardwarePrefix[productFamily];
|
||||||
|
@ -132,8 +132,8 @@ TEST(UnpackSingleDeviceBinaryAr, WhenMultipleBinariesMatchedThenChooseBestMatch)
|
||||||
PatchTokensTestData::ValidEmptyProgram programTokens;
|
PatchTokensTestData::ValidEmptyProgram programTokens;
|
||||||
const auto &hwInfoConfig = *NEO::HwInfoConfig::get(productFamily);
|
const auto &hwInfoConfig = *NEO::HwInfoConfig::get(productFamily);
|
||||||
NEO::HardwareInfo hwInfo = *NEO::defaultHwInfo;
|
NEO::HardwareInfo hwInfo = *NEO::defaultHwInfo;
|
||||||
AheadOfTimeConfig aotConfig = {0};
|
NEO::HardwareIpVersion aotConfig = {0};
|
||||||
aotConfig.ProductConfig = hwInfoConfig.getProductConfigFromHwInfo(hwInfo);
|
aotConfig.value = hwInfoConfig.getProductConfigFromHwInfo(hwInfo);
|
||||||
|
|
||||||
NEO::Ar::ArEncoder encoder;
|
NEO::Ar::ArEncoder encoder;
|
||||||
std::string requiredProduct = NEO::hardwarePrefix[productFamily];
|
std::string requiredProduct = NEO::hardwarePrefix[productFamily];
|
||||||
|
@ -148,7 +148,7 @@ TEST(UnpackSingleDeviceBinaryAr, WhenMultipleBinariesMatchedThenChooseBestMatch)
|
||||||
|
|
||||||
NEO::TargetDevice target;
|
NEO::TargetDevice target;
|
||||||
target.coreFamily = static_cast<GFXCORE_FAMILY>(programTokens.header->Device);
|
target.coreFamily = static_cast<GFXCORE_FAMILY>(programTokens.header->Device);
|
||||||
target.aotConfig.ProductConfig = hwInfoConfig.getProductConfigFromHwInfo(hwInfo);
|
target.aotConfig.value = hwInfoConfig.getProductConfigFromHwInfo(hwInfo);
|
||||||
target.stepping = programTokens.header->SteppingId;
|
target.stepping = programTokens.header->SteppingId;
|
||||||
target.maxPointerSizeInBytes = programTokens.header->GPUPointerSizeInBytes;
|
target.maxPointerSizeInBytes = programTokens.header->GPUPointerSizeInBytes;
|
||||||
|
|
||||||
|
@ -241,8 +241,8 @@ TEST(UnpackSingleDeviceBinaryAr, WhenFailedToUnpackMatchWithProductConfigThenTry
|
||||||
|
|
||||||
const auto &hwInfoConfig = *NEO::HwInfoConfig::get(productFamily);
|
const auto &hwInfoConfig = *NEO::HwInfoConfig::get(productFamily);
|
||||||
NEO::HardwareInfo hwInfo = *NEO::defaultHwInfo;
|
NEO::HardwareInfo hwInfo = *NEO::defaultHwInfo;
|
||||||
AheadOfTimeConfig aotConfig = {0};
|
NEO::HardwareIpVersion aotConfig = {0};
|
||||||
aotConfig.ProductConfig = hwInfoConfig.getProductConfigFromHwInfo(hwInfo);
|
aotConfig.value = hwInfoConfig.getProductConfigFromHwInfo(hwInfo);
|
||||||
|
|
||||||
std::string requiredProductConfig = ProductConfigHelper::parseMajorMinorRevisionValue(aotConfig);
|
std::string requiredProductConfig = ProductConfigHelper::parseMajorMinorRevisionValue(aotConfig);
|
||||||
|
|
||||||
|
@ -259,7 +259,7 @@ TEST(UnpackSingleDeviceBinaryAr, WhenFailedToUnpackMatchWithProductConfigThenTry
|
||||||
|
|
||||||
NEO::TargetDevice target;
|
NEO::TargetDevice target;
|
||||||
target.coreFamily = static_cast<GFXCORE_FAMILY>(programTokens.header->Device);
|
target.coreFamily = static_cast<GFXCORE_FAMILY>(programTokens.header->Device);
|
||||||
target.aotConfig.ProductConfig = hwInfoConfig.getProductConfigFromHwInfo(hwInfo);
|
target.aotConfig.value = hwInfoConfig.getProductConfigFromHwInfo(hwInfo);
|
||||||
target.stepping = programTokens.header->SteppingId;
|
target.stepping = programTokens.header->SteppingId;
|
||||||
target.maxPointerSizeInBytes = programTokens.header->GPUPointerSizeInBytes;
|
target.maxPointerSizeInBytes = programTokens.header->GPUPointerSizeInBytes;
|
||||||
|
|
||||||
|
@ -349,8 +349,8 @@ TEST(UnpackSingleDeviceBinaryAr, WhenDeviceBinaryNotMatchedButIrWithProductConfi
|
||||||
PatchTokensTestData::ValidEmptyProgram programTokens;
|
PatchTokensTestData::ValidEmptyProgram programTokens;
|
||||||
const auto &hwInfoConfig = *NEO::HwInfoConfig::get(productFamily);
|
const auto &hwInfoConfig = *NEO::HwInfoConfig::get(productFamily);
|
||||||
NEO::HardwareInfo hwInfo = *NEO::defaultHwInfo;
|
NEO::HardwareInfo hwInfo = *NEO::defaultHwInfo;
|
||||||
AheadOfTimeConfig aotConfig = {0};
|
NEO::HardwareIpVersion aotConfig = {0};
|
||||||
aotConfig.ProductConfig = hwInfoConfig.getProductConfigFromHwInfo(hwInfo);
|
aotConfig.value = hwInfoConfig.getProductConfigFromHwInfo(hwInfo);
|
||||||
|
|
||||||
std::string requiredProductConfig = ProductConfigHelper::parseMajorMinorRevisionValue(aotConfig);
|
std::string requiredProductConfig = ProductConfigHelper::parseMajorMinorRevisionValue(aotConfig);
|
||||||
std::string requiredProduct = NEO::hardwarePrefix[productFamily];
|
std::string requiredProduct = NEO::hardwarePrefix[productFamily];
|
||||||
|
@ -369,7 +369,7 @@ TEST(UnpackSingleDeviceBinaryAr, WhenDeviceBinaryNotMatchedButIrWithProductConfi
|
||||||
target.coreFamily = static_cast<GFXCORE_FAMILY>(programTokens.header->Device);
|
target.coreFamily = static_cast<GFXCORE_FAMILY>(programTokens.header->Device);
|
||||||
target.stepping = programTokens.header->SteppingId;
|
target.stepping = programTokens.header->SteppingId;
|
||||||
target.maxPointerSizeInBytes = programTokens.header->GPUPointerSizeInBytes;
|
target.maxPointerSizeInBytes = programTokens.header->GPUPointerSizeInBytes;
|
||||||
target.aotConfig.ProductConfig = hwInfoConfig.getProductConfigFromHwInfo(hwInfo);
|
target.aotConfig.value = hwInfoConfig.getProductConfigFromHwInfo(hwInfo);
|
||||||
|
|
||||||
auto arData = encoder.encode();
|
auto arData = encoder.encode();
|
||||||
std::string unpackErrors;
|
std::string unpackErrors;
|
||||||
|
@ -573,8 +573,8 @@ TEST(UnpackSingleDeviceBinaryAr, WhenCouldNotFindBinaryWithRightPointerSizeThenU
|
||||||
|
|
||||||
const auto &hwInfoConfig = *NEO::HwInfoConfig::get(productFamily);
|
const auto &hwInfoConfig = *NEO::HwInfoConfig::get(productFamily);
|
||||||
NEO::HardwareInfo hwInfo = *NEO::defaultHwInfo;
|
NEO::HardwareInfo hwInfo = *NEO::defaultHwInfo;
|
||||||
AheadOfTimeConfig aotConfig = {0};
|
NEO::HardwareIpVersion aotConfig = {0};
|
||||||
aotConfig.ProductConfig = hwInfoConfig.getProductConfigFromHwInfo(hwInfo);
|
aotConfig.value = hwInfoConfig.getProductConfigFromHwInfo(hwInfo);
|
||||||
|
|
||||||
std::string requiredProductConfig = ProductConfigHelper::parseMajorMinorRevisionValue(aotConfig);
|
std::string requiredProductConfig = ProductConfigHelper::parseMajorMinorRevisionValue(aotConfig);
|
||||||
std::string requiredProduct = NEO::hardwarePrefix[productFamily];
|
std::string requiredProduct = NEO::hardwarePrefix[productFamily];
|
||||||
|
|
|
@ -39,7 +39,7 @@ struct ProductConfigHwInfoTests : public ProductConfigTest<::testing::TestWithPa
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
PRODUCT_FAMILY prod = IGFX_UNKNOWN;
|
PRODUCT_FAMILY prod = IGFX_UNKNOWN;
|
||||||
const AheadOfTimeConfig invalidConfig = {CommonConstants::invalidRevisionID};
|
const HardwareIpVersion invalidConfig = {CommonConstants::invalidRevisionID};
|
||||||
};
|
};
|
||||||
|
|
||||||
using ProductConfigTests = ProductConfigTest<::testing::Test>;
|
using ProductConfigTests = ProductConfigTest<::testing::Test>;
|
||||||
|
|
|
@ -49,10 +49,10 @@ HWTEST2_F(CompilerProductHelperFixture, givenAotConfigWhenSetHwInfoRevisionIdThe
|
||||||
auto hwInfo = *defaultHwInfo;
|
auto hwInfo = *defaultHwInfo;
|
||||||
auto &productHelper = getHelper<ProductHelper>();
|
auto &productHelper = getHelper<ProductHelper>();
|
||||||
auto productConfig = productHelper.getProductConfigFromHwInfo(*defaultHwInfo);
|
auto productConfig = productHelper.getProductConfigFromHwInfo(*defaultHwInfo);
|
||||||
AheadOfTimeConfig aotConfig = {0};
|
HardwareIpVersion aotConfig = {0};
|
||||||
aotConfig.ProductConfig = productConfig;
|
aotConfig.value = productConfig;
|
||||||
CompilerProductHelper::get(hwInfo.platform.eProductFamily)->setProductConfigForHwInfo(hwInfo, aotConfig);
|
CompilerProductHelper::get(hwInfo.platform.eProductFamily)->setProductConfigForHwInfo(hwInfo, aotConfig);
|
||||||
EXPECT_EQ(hwInfo.platform.usRevId, aotConfig.ProductConfigID.Revision);
|
EXPECT_EQ(hwInfo.platform.usRevId, aotConfig.revision);
|
||||||
}
|
}
|
||||||
|
|
||||||
HWTEST2_F(CompilerProductHelperFixture, givenAtMostXeHPWhenGetCachingPolicyOptionsThenReturnNullptr, IsAtMostXeHpCore) {
|
HWTEST2_F(CompilerProductHelperFixture, givenAtMostXeHPWhenGetCachingPolicyOptionsThenReturnNullptr, IsAtMostXeHpCore) {
|
||||||
|
|
|
@ -241,7 +241,7 @@ TEST_F(AotDeviceInfoTests, givenProductOrAotConfigWhenParseMajorMinorRevisionVal
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const auto &device : enabledDeviceConfigs) {
|
for (const auto &device : enabledDeviceConfigs) {
|
||||||
auto productConfig = static_cast<AOT::PRODUCT_CONFIG>(device.aotConfig.ProductConfig);
|
auto productConfig = static_cast<AOT::PRODUCT_CONFIG>(device.aotConfig.value);
|
||||||
auto configStr0 = ProductConfigHelper::parseMajorMinorRevisionValue(productConfig);
|
auto configStr0 = ProductConfigHelper::parseMajorMinorRevisionValue(productConfig);
|
||||||
auto configStr1 = ProductConfigHelper::parseMajorMinorRevisionValue(device.aotConfig);
|
auto configStr1 = ProductConfigHelper::parseMajorMinorRevisionValue(device.aotConfig);
|
||||||
EXPECT_STREQ(configStr0.c_str(), configStr1.c_str());
|
EXPECT_STREQ(configStr0.c_str(), configStr1.c_str());
|
||||||
|
@ -268,7 +268,7 @@ TEST_F(AotDeviceInfoTests, givenProductConfigAcronymWhenCheckAllEnabledThenCorre
|
||||||
EXPECT_TRUE(acronymFound);
|
EXPECT_TRUE(acronymFound);
|
||||||
|
|
||||||
device.acronyms.clear();
|
device.acronyms.clear();
|
||||||
device.aotConfig.ProductConfig = AOT::UNKNOWN_ISA;
|
device.aotConfig.value = AOT::UNKNOWN_ISA;
|
||||||
|
|
||||||
enabledAcronyms = productConfigHelper->getAllProductAcronyms();
|
enabledAcronyms = productConfigHelper->getAllProductAcronyms();
|
||||||
acronymFound = std::any_of(enabledAcronyms.begin(), enabledAcronyms.end(), findAcronym(acronym));
|
acronymFound = std::any_of(enabledAcronyms.begin(), enabledAcronyms.end(), findAcronym(acronym));
|
||||||
|
@ -425,7 +425,7 @@ TEST_F(AotDeviceInfoTests, givenNotFullConfigWhenGetProductConfigThenUnknownIsaI
|
||||||
}
|
}
|
||||||
auto aotConfig = allEnabledDeviceConfigs[0].aotConfig;
|
auto aotConfig = allEnabledDeviceConfigs[0].aotConfig;
|
||||||
std::stringstream majorString;
|
std::stringstream majorString;
|
||||||
majorString << aotConfig.ProductConfigID.Major;
|
majorString << aotConfig.architecture;
|
||||||
auto major = majorString.str();
|
auto major = majorString.str();
|
||||||
|
|
||||||
auto aotValue0 = ProductConfigHelper::getProductConfigForVersionValue(major);
|
auto aotValue0 = ProductConfigHelper::getProductConfigForVersionValue(major);
|
||||||
|
@ -481,7 +481,7 @@ TEST_F(AotDeviceInfoTests, givenProductConfigWhenGetDeviceAotInfoThenCorrectValu
|
||||||
DeviceAotInfo aotInfo{};
|
DeviceAotInfo aotInfo{};
|
||||||
|
|
||||||
for (auto &product : enabledProducts) {
|
for (auto &product : enabledProducts) {
|
||||||
auto productConfig = static_cast<AOT::PRODUCT_CONFIG>(product.aotConfig.ProductConfig);
|
auto productConfig = static_cast<AOT::PRODUCT_CONFIG>(product.aotConfig.value);
|
||||||
EXPECT_TRUE(productConfigHelper->getDeviceAotInfoForProductConfig(productConfig, aotInfo));
|
EXPECT_TRUE(productConfigHelper->getDeviceAotInfoForProductConfig(productConfig, aotInfo));
|
||||||
EXPECT_TRUE(aotInfo == product);
|
EXPECT_TRUE(aotInfo == product);
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,9 +28,9 @@ PVCTEST_F(PvcUnpackSingleDeviceBinaryAr, WhenFailedToUnpackMatchWithPvcProductCo
|
||||||
PatchTokensTestData::ValidEmptyProgram programTokens;
|
PatchTokensTestData::ValidEmptyProgram programTokens;
|
||||||
PatchTokensTestData::ValidEmptyProgram programTokensWrongTokenVersion;
|
PatchTokensTestData::ValidEmptyProgram programTokensWrongTokenVersion;
|
||||||
|
|
||||||
AheadOfTimeConfig aotConfig0{}, aotConfig1{};
|
NEO::HardwareIpVersion aotConfig0{}, aotConfig1{};
|
||||||
aotConfig0.ProductConfig = AOT::PVC_XL_A0;
|
aotConfig0.value = AOT::PVC_XL_A0;
|
||||||
aotConfig1.ProductConfig = AOT::PVC_XL_A0P;
|
aotConfig1.value = AOT::PVC_XL_A0P;
|
||||||
|
|
||||||
std::string requiredProductConfig = ProductConfigHelper::parseMajorMinorRevisionValue(aotConfig0);
|
std::string requiredProductConfig = ProductConfigHelper::parseMajorMinorRevisionValue(aotConfig0);
|
||||||
std::string anotherProductConfig = ProductConfigHelper::parseMajorMinorRevisionValue(aotConfig1);
|
std::string anotherProductConfig = ProductConfigHelper::parseMajorMinorRevisionValue(aotConfig1);
|
||||||
|
|
|
@ -74,10 +74,10 @@ PVCTEST_F(PvcProductHelperLinux, givenProductHelperWhenAskedIfPatIndexProgrammin
|
||||||
|
|
||||||
PVCTEST_F(PvcProductHelperLinux, givenAotConfigWhenSetHwInfoRevisionIdForPvcThenCorrectValueIsSet) {
|
PVCTEST_F(PvcProductHelperLinux, givenAotConfigWhenSetHwInfoRevisionIdForPvcThenCorrectValueIsSet) {
|
||||||
for (const auto &config : AOT_PVC::productConfigs) {
|
for (const auto &config : AOT_PVC::productConfigs) {
|
||||||
AheadOfTimeConfig aotConfig = {0};
|
HardwareIpVersion aotConfig = {0};
|
||||||
aotConfig.ProductConfig = config;
|
aotConfig.value = config;
|
||||||
CompilerProductHelper::get(pInHwInfo.platform.eProductFamily)->setProductConfigForHwInfo(pInHwInfo, aotConfig);
|
CompilerProductHelper::get(pInHwInfo.platform.eProductFamily)->setProductConfigForHwInfo(pInHwInfo, aotConfig);
|
||||||
EXPECT_EQ(pInHwInfo.platform.usRevId, aotConfig.ProductConfigID.Revision);
|
EXPECT_EQ(pInHwInfo.platform.usRevId, aotConfig.revision);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,9 +28,9 @@ DG2TEST_F(Dg2UnpackSingleDeviceBinaryAr, WhenFailedToUnpackMatchWithDg2ProductCo
|
||||||
PatchTokensTestData::ValidEmptyProgram programTokens;
|
PatchTokensTestData::ValidEmptyProgram programTokens;
|
||||||
PatchTokensTestData::ValidEmptyProgram programTokensWrongTokenVersion;
|
PatchTokensTestData::ValidEmptyProgram programTokensWrongTokenVersion;
|
||||||
|
|
||||||
AheadOfTimeConfig aotConfig0{}, aotConfig1{};
|
NEO::HardwareIpVersion aotConfig0{}, aotConfig1{};
|
||||||
aotConfig0.ProductConfig = AOT::DG2_G10_A0;
|
aotConfig0.value = AOT::DG2_G10_A0;
|
||||||
aotConfig1.ProductConfig = AOT::DG2_G10_B0;
|
aotConfig1.value = AOT::DG2_G10_B0;
|
||||||
|
|
||||||
std::string requiredProductConfig = ProductConfigHelper::parseMajorMinorRevisionValue(aotConfig0);
|
std::string requiredProductConfig = ProductConfigHelper::parseMajorMinorRevisionValue(aotConfig0);
|
||||||
std::string anotherProductConfig = ProductConfigHelper::parseMajorMinorRevisionValue(aotConfig1);
|
std::string anotherProductConfig = ProductConfigHelper::parseMajorMinorRevisionValue(aotConfig1);
|
||||||
|
|
Loading…
Reference in New Issue