mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 05:56:36 +08:00
refactor: introducing AOT platforms wrapper
Signed-off-by: Chodor, Jaroslaw <jaroslaw.chodor@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
58704a4693
commit
767755df94
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Copyright (C) 2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
namespace AOT {
|
||||
consteval PRODUCT_CONFIG getConfixMaxPlatform() {
|
||||
return CONFIG_MAX_PLATFORM;
|
||||
}
|
||||
|
||||
inline const auto &getCompatibilityMapping() {
|
||||
return compatibilityMapping;
|
||||
}
|
||||
|
||||
inline const auto &getRtlIdAcronyms() {
|
||||
return rtlIdAcronyms;
|
||||
}
|
||||
|
||||
} // namespace AOT
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2022-2024 Intel Corporation
|
||||
* Copyright (C) 2022-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -19,7 +19,7 @@
|
||||
#include "shared/source/program/program_info.h"
|
||||
#include "shared/source/utilities/logger.h"
|
||||
|
||||
#include "platforms.h"
|
||||
#include "neo_aot_platforms.h"
|
||||
|
||||
namespace NEO {
|
||||
template <>
|
||||
@@ -45,8 +45,8 @@ bool isZebin(ArrayRef<const uint8_t> binary) {
|
||||
|
||||
bool isTargetProductConfigCompatibleWithProductConfig(const AOT::PRODUCT_CONFIG &targetDeviceProductConfig,
|
||||
const AOT::PRODUCT_CONFIG &productConfig) {
|
||||
auto compatProdConfPairItr = AOT::compatibilityMapping.find(productConfig);
|
||||
if (compatProdConfPairItr != AOT::compatibilityMapping.end()) {
|
||||
auto compatProdConfPairItr = AOT::getCompatibilityMapping().find(productConfig);
|
||||
if (compatProdConfPairItr != AOT::getCompatibilityMapping().end()) {
|
||||
for (auto &compatibleConfig : compatProdConfPairItr->second)
|
||||
if (targetDeviceProductConfig == compatibleConfig)
|
||||
return true;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "shared/source/helpers/compiler_product_helper_tgllp_and_later.inl"
|
||||
|
||||
#include "compiler_product_helper_adln.inl"
|
||||
#include "platforms.h"
|
||||
#include "neo_aot_platforms.h"
|
||||
|
||||
namespace NEO {
|
||||
template <>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "shared/source/helpers/compiler_product_helper_tgllp_and_later.inl"
|
||||
|
||||
#include "compiler_product_helper_adlp.inl"
|
||||
#include "platforms.h"
|
||||
#include "neo_aot_platforms.h"
|
||||
|
||||
namespace NEO {
|
||||
template <>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include "shared/source/helpers/compiler_product_helper_product_config_default.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_tgllp_and_later.inl"
|
||||
|
||||
#include "platforms.h"
|
||||
#include "neo_aot_platforms.h"
|
||||
|
||||
namespace NEO {
|
||||
template <>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include "shared/source/helpers/compiler_product_helper_product_config_default.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_tgllp_and_later.inl"
|
||||
|
||||
#include "platforms.h"
|
||||
#include "neo_aot_platforms.h"
|
||||
|
||||
namespace NEO {
|
||||
template <>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include "shared/source/helpers/compiler_product_helper_product_config_default.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_tgllp_and_later.inl"
|
||||
|
||||
#include "platforms.h"
|
||||
#include "neo_aot_platforms.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include "shared/source/helpers/compiler_product_helper_product_config_default.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_tgllp_and_later.inl"
|
||||
|
||||
#include "platforms.h"
|
||||
#include "neo_aot_platforms.h"
|
||||
|
||||
namespace NEO {
|
||||
template <>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2022-2024 Intel Corporation
|
||||
* Copyright (C) 2022-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
#include "device_ids_configs.h"
|
||||
#include "hw_cmds.h"
|
||||
#include "platforms.h"
|
||||
#include "neo_aot_platforms.h"
|
||||
|
||||
ProductConfigHelper::ProductConfigHelper() : deviceAotInfo({
|
||||
#define DEVICE_CONFIG(productConfig, hwConfig, deviceIds, family, release) {{AOT::productConfig}, &NEO::hwConfig::hwInfo, &NEO::deviceIds, AOT::family, AOT::release, {}, {}},
|
||||
@@ -304,7 +304,7 @@ void ProductConfigHelper::initialize() {
|
||||
}
|
||||
}
|
||||
|
||||
for (const auto &[acronym, value] : AOT::rtlIdAcronyms) {
|
||||
for (const auto &[acronym, value] : AOT::getRtlIdAcronyms()) {
|
||||
if (value == device.aotConfig.value) {
|
||||
device.rtlIdAcronyms.push_back(NEO::ConstStringRef(acronym));
|
||||
}
|
||||
@@ -324,8 +324,8 @@ AOT::PRODUCT_CONFIG ProductConfigHelper::getProductConfigFromAcronym(const std::
|
||||
return deviceAcronymIt->second;
|
||||
}
|
||||
|
||||
auto rtlIdAcronymIt = std::find_if(AOT::rtlIdAcronyms.begin(), AOT::rtlIdAcronyms.end(), findMapAcronymWithoutDash(device));
|
||||
if (rtlIdAcronymIt != AOT::rtlIdAcronyms.end()) {
|
||||
auto rtlIdAcronymIt = std::find_if(AOT::getRtlIdAcronyms().begin(), AOT::getRtlIdAcronyms().end(), findMapAcronymWithoutDash(device));
|
||||
if (rtlIdAcronymIt != AOT::getRtlIdAcronyms().end()) {
|
||||
return rtlIdAcronymIt->second;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2023-2024 Intel Corporation
|
||||
* Copyright (C) 2023-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "shared/source/release_helper/release_helper.h"
|
||||
#include "shared/source/release_helper/release_helper_base.inl"
|
||||
|
||||
#include "platforms.h"
|
||||
#include "neo_aot_platforms.h"
|
||||
#include "release_definitions.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "shared/source/release_helper/release_helper_base.inl"
|
||||
#include "shared/source/xe_hpg_core/hw_cmds_xe_hpg_core_base.h"
|
||||
|
||||
#include "platforms.h"
|
||||
#include "neo_aot_platforms.h"
|
||||
#include "release_definitions.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "shared/source/release_helper/release_helper_base.inl"
|
||||
#include "shared/source/xe_hpg_core/hw_cmds_xe_hpg_core_base.h"
|
||||
|
||||
#include "platforms.h"
|
||||
#include "neo_aot_platforms.h"
|
||||
#include "release_definitions.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "shared/source/release_helper/release_helper.h"
|
||||
#include "shared/source/release_helper/release_helper_base.inl"
|
||||
|
||||
#include "platforms.h"
|
||||
#include "neo_aot_platforms.h"
|
||||
#include "release_definitions.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "shared/source/release_helper/release_helper.h"
|
||||
#include "shared/source/release_helper/release_helper_base.inl"
|
||||
|
||||
#include "platforms.h"
|
||||
#include "neo_aot_platforms.h"
|
||||
#include "release_definitions.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "shared/source/helpers/compiler_product_helper_xe_hp_and_later.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_xe_hpc_and_later.inl"
|
||||
|
||||
#include "platforms.h"
|
||||
#include "neo_aot_platforms.h"
|
||||
|
||||
namespace NEO {
|
||||
template <>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
* Copyright (C) 2024-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "shared/source/helpers/compiler_product_helper_xe_hp_and_later.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_xe_hpc_and_later.inl"
|
||||
|
||||
#include "platforms.h"
|
||||
#include "neo_aot_platforms.h"
|
||||
|
||||
namespace NEO {
|
||||
template <>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "shared/source/helpers/compiler_product_helper_xe_hp_and_later.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_xe_hpc_and_later.inl"
|
||||
|
||||
#include "platforms.h"
|
||||
#include "neo_aot_platforms.h"
|
||||
|
||||
constexpr auto gfxProduct = IGFX_PTL;
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "shared/source/xe_hpc_core/hw_cmds.h"
|
||||
#include "shared/source/xe_hpc_core/pvc/device_ids_configs_pvc.h"
|
||||
|
||||
#include "platforms.h"
|
||||
#include "neo_aot_platforms.h"
|
||||
namespace NEO {
|
||||
template <>
|
||||
uint32_t CompilerProductHelperHw<IGFX_PVC>::getDefaultHwIpVersion() const {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include "shared/source/helpers/compiler_product_helper_xe_hp_and_later.inl"
|
||||
#include "shared/source/xe_hpg_core/hw_cmds_dg2.h"
|
||||
|
||||
#include "platforms.h"
|
||||
#include "neo_aot_platforms.h"
|
||||
|
||||
namespace NEO {
|
||||
template <>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2023-2024 Intel Corporation
|
||||
* Copyright (C) 2023-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -13,4 +13,4 @@
|
||||
#include "shared/source/helpers/compiler_product_helper_tgllp_and_later.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_xe_hp_and_later.inl"
|
||||
|
||||
#include "platforms.h"
|
||||
#include "neo_aot_platforms.h"
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "shared/source/os_interface/product_helper.h"
|
||||
|
||||
#include "aubstream/product_family.h"
|
||||
#include "platforms.h"
|
||||
#include "neo_aot_platforms.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user