mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 23:56:39 +08:00
fix: move getProductConfigFromHwInfo to CompilerProductHelper
add tests for default PVC configs Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
dd575008bc
commit
c544004b8e
@@ -11,7 +11,6 @@
|
||||
#include "shared/source/helpers/compiler_product_helper.h"
|
||||
#include "shared/source/helpers/gfx_core_helper.h"
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
#include "shared/source/os_interface/product_helper.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
@@ -24,13 +23,13 @@ std::vector<uint8_t> packDeviceBinary(const SingleDeviceBinary binary, std::stri
|
||||
|
||||
TargetDevice getTargetDevice(const RootDeviceEnvironment &rootDeviceEnvironment) {
|
||||
auto hwInfo = *rootDeviceEnvironment.getHardwareInfo();
|
||||
auto &productHelper = rootDeviceEnvironment.getHelper<ProductHelper>();
|
||||
auto &compilerProductHelper = rootDeviceEnvironment.getHelper<CompilerProductHelper>();
|
||||
auto &gfxCoreHelper = rootDeviceEnvironment.getHelper<GfxCoreHelper>();
|
||||
TargetDevice targetDevice = {};
|
||||
|
||||
targetDevice.coreFamily = hwInfo.platform.eRenderCoreFamily;
|
||||
targetDevice.productFamily = hwInfo.platform.eProductFamily;
|
||||
targetDevice.aotConfig.value = productHelper.getHwIpVersion(hwInfo);
|
||||
targetDevice.aotConfig.value = compilerProductHelper.getHwIpVersion(hwInfo);
|
||||
targetDevice.stepping = hwInfo.platform.usRevId;
|
||||
targetDevice.maxPointerSizeInBytes = sizeof(uintptr_t);
|
||||
targetDevice.grfSize = hwInfo.capabilityTable.grfSize;
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
namespace NEO {
|
||||
template <>
|
||||
uint32_t ProductHelperHw<gfxProduct>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
||||
return AOT::EHL;
|
||||
}
|
||||
} // namespace NEO
|
||||
@@ -15,12 +15,19 @@
|
||||
#include "shared/source/helpers/compiler_product_helper_disable_split_matrix_multiply_accumulate.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_enable_subgroup_local_block_io.inl"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
namespace NEO {
|
||||
template <>
|
||||
uint64_t CompilerProductHelperHw<IGFX_ELKHARTLAKE>::getHwInfoConfig(const HardwareInfo &hwInfo) const {
|
||||
return 0x100040008;
|
||||
}
|
||||
|
||||
template <>
|
||||
uint32_t CompilerProductHelperHw<IGFX_ELKHARTLAKE>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
||||
return AOT::EHL;
|
||||
}
|
||||
|
||||
static EnableCompilerProductHelper<IGFX_ELKHARTLAKE> enableCompilerProductHelperEHL;
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -15,12 +15,19 @@
|
||||
#include "shared/source/helpers/compiler_product_helper_disable_split_matrix_multiply_accumulate.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_enable_subgroup_local_block_io.inl"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
namespace NEO {
|
||||
template <>
|
||||
uint64_t CompilerProductHelperHw<IGFX_ICELAKE_LP>::getHwInfoConfig(const HardwareInfo &hwInfo) const {
|
||||
return 0x100080008;
|
||||
}
|
||||
|
||||
template <>
|
||||
uint32_t CompilerProductHelperHw<IGFX_ICELAKE_LP>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
||||
return AOT::ICL;
|
||||
}
|
||||
|
||||
static EnableCompilerProductHelper<IGFX_ICELAKE_LP> enableCompilerProductHelperICLLP;
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -15,12 +15,19 @@
|
||||
#include "shared/source/helpers/compiler_product_helper_disable_split_matrix_multiply_accumulate.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_enable_subgroup_local_block_io.inl"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
namespace NEO {
|
||||
template <>
|
||||
uint64_t CompilerProductHelperHw<IGFX_LAKEFIELD>::getHwInfoConfig(const HardwareInfo &hwInfo) const {
|
||||
return 0x100080008;
|
||||
}
|
||||
|
||||
template <>
|
||||
uint32_t CompilerProductHelperHw<IGFX_LAKEFIELD>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
||||
return AOT::LKF;
|
||||
}
|
||||
|
||||
static EnableCompilerProductHelper<IGFX_LAKEFIELD> enableCompilerProductHelperLKF;
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -23,11 +23,6 @@ bool ProductHelperHw<gfxProduct>::isReturnedCmdSizeForMediaSamplerAdjustmentRequ
|
||||
return true;
|
||||
}
|
||||
|
||||
template <>
|
||||
uint32_t ProductHelperHw<gfxProduct>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
||||
return AOT::ICL;
|
||||
}
|
||||
|
||||
template <>
|
||||
std::optional<aub_stream::ProductFamily> ProductHelperHw<gfxProduct>::getAubStreamProductFamily() const {
|
||||
return aub_stream::ProductFamily::Icllp;
|
||||
|
||||
@@ -11,11 +11,8 @@
|
||||
#include "shared/source/os_interface/product_helper.inl"
|
||||
#include "shared/source/os_interface/product_helper_bdw_and_later.inl"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
constexpr static auto gfxProduct = IGFX_ELKHARTLAKE;
|
||||
|
||||
#include "shared/source/gen11/ehl/os_agnostic_product_helper_ehl.inl"
|
||||
namespace NEO {
|
||||
|
||||
template <>
|
||||
|
||||
@@ -11,8 +11,6 @@
|
||||
#include "shared/source/os_interface/product_helper.inl"
|
||||
#include "shared/source/os_interface/product_helper_bdw_and_later.inl"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
constexpr static auto gfxProduct = IGFX_ICELAKE_LP;
|
||||
#include "shared/source/gen11/icllp/os_agnostic_product_helper_icllp.inl"
|
||||
namespace NEO {
|
||||
|
||||
@@ -11,10 +11,7 @@
|
||||
#include "shared/source/os_interface/product_helper.inl"
|
||||
#include "shared/source/os_interface/product_helper_bdw_and_later.inl"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
constexpr static auto gfxProduct = IGFX_LAKEFIELD;
|
||||
#include "shared/source/gen11/lkf/os_agnostic_product_helper_lkf.inl"
|
||||
namespace NEO {
|
||||
|
||||
template <>
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
namespace NEO {
|
||||
template <>
|
||||
uint32_t ProductHelperHw<gfxProduct>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
||||
return AOT::LKF;
|
||||
}
|
||||
} // namespace NEO
|
||||
@@ -10,10 +10,6 @@
|
||||
#include "shared/source/os_interface/product_helper.inl"
|
||||
#include "shared/source/os_interface/product_helper_bdw_and_later.inl"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
constexpr static auto gfxProduct = IGFX_ELKHARTLAKE;
|
||||
|
||||
#include "shared/source/gen11/ehl/os_agnostic_product_helper_ehl.inl"
|
||||
|
||||
template class NEO::ProductHelperHw<gfxProduct>;
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
#include "shared/source/os_interface/product_helper.inl"
|
||||
#include "shared/source/os_interface/product_helper_bdw_and_later.inl"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
constexpr static auto gfxProduct = IGFX_ICELAKE_LP;
|
||||
|
||||
#include "shared/source/gen11/icllp/os_agnostic_product_helper_icllp.inl"
|
||||
|
||||
@@ -10,10 +10,6 @@
|
||||
#include "shared/source/os_interface/product_helper.inl"
|
||||
#include "shared/source/os_interface/product_helper_bdw_and_later.inl"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
constexpr static auto gfxProduct = IGFX_LAKEFIELD;
|
||||
|
||||
#include "shared/source/gen11/lkf/os_agnostic_product_helper_lkf.inl"
|
||||
|
||||
template class NEO::ProductHelperHw<gfxProduct>;
|
||||
|
||||
@@ -17,11 +17,6 @@ uint32_t ProductHelperHw<gfxProduct>::getHwRevIdFromStepping(uint32_t stepping,
|
||||
return CommonConstants::invalidStepping;
|
||||
}
|
||||
|
||||
template <>
|
||||
uint32_t ProductHelperHw<gfxProduct>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
||||
return AOT::ADL_N;
|
||||
}
|
||||
|
||||
template <>
|
||||
uint32_t ProductHelperHw<gfxProduct>::getSteppingFromHwRevId(const HardwareInfo &hwInfo) const {
|
||||
switch (hwInfo.platform.usRevId) {
|
||||
|
||||
@@ -21,11 +21,6 @@ uint32_t ProductHelperHw<gfxProduct>::getHwRevIdFromStepping(uint32_t stepping,
|
||||
return CommonConstants::invalidStepping;
|
||||
}
|
||||
|
||||
template <>
|
||||
uint32_t ProductHelperHw<gfxProduct>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
||||
return AOT::ADL_P;
|
||||
}
|
||||
|
||||
template <>
|
||||
uint32_t ProductHelperHw<gfxProduct>::getSteppingFromHwRevId(const HardwareInfo &hwInfo) const {
|
||||
switch (hwInfo.platform.usRevId) {
|
||||
|
||||
@@ -22,9 +22,9 @@ uint32_t ProductHelperHw<gfxProduct>::getHwRevIdFromStepping(uint32_t stepping,
|
||||
}
|
||||
|
||||
template <>
|
||||
uint32_t ProductHelperHw<gfxProduct>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
||||
return AOT::ADL_S;
|
||||
}
|
||||
std::optional<aub_stream::ProductFamily> ProductHelperHw<gfxProduct>::getAubStreamProductFamily() const {
|
||||
return aub_stream::ProductFamily::Adls;
|
||||
};
|
||||
|
||||
template <>
|
||||
uint32_t ProductHelperHw<gfxProduct>::getSteppingFromHwRevId(const HardwareInfo &hwInfo) const {
|
||||
@@ -37,11 +37,6 @@ uint32_t ProductHelperHw<gfxProduct>::getSteppingFromHwRevId(const HardwareInfo
|
||||
return CommonConstants::invalidStepping;
|
||||
}
|
||||
|
||||
template <>
|
||||
std::optional<aub_stream::ProductFamily> ProductHelperHw<gfxProduct>::getAubStreamProductFamily() const {
|
||||
return aub_stream::ProductFamily::Adls;
|
||||
};
|
||||
|
||||
template <>
|
||||
bool ProductHelperHw<gfxProduct>::pipeControlWARequired(const HardwareInfo &hwInfo) const {
|
||||
return GfxCoreHelper::isWorkaroundRequired(REVISION_A0, REVISION_B, hwInfo, *this);
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
template <>
|
||||
uint64_t CompilerProductHelperHw<IGFX_ROCKETLAKE>::getHwInfoConfig(const HardwareInfo &hwInfo) const {
|
||||
return 0x100020010;
|
||||
}
|
||||
template <>
|
||||
bool CompilerProductHelperHw<IGFX_ROCKETLAKE>::isForceEmuInt32DivRemSPRequired() const {
|
||||
return true;
|
||||
}
|
||||
@@ -21,11 +21,6 @@ uint32_t ProductHelperHw<gfxProduct>::getHwRevIdFromStepping(uint32_t stepping,
|
||||
return CommonConstants::invalidStepping;
|
||||
}
|
||||
|
||||
template <>
|
||||
uint32_t ProductHelperHw<gfxProduct>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
||||
return AOT::DG1;
|
||||
}
|
||||
|
||||
template <>
|
||||
uint32_t ProductHelperHw<gfxProduct>::getSteppingFromHwRevId(const HardwareInfo &hwInfo) const {
|
||||
switch (hwInfo.platform.usRevId) {
|
||||
|
||||
@@ -16,9 +16,15 @@
|
||||
#include "shared/source/helpers/compiler_product_helper_tgllp_and_later.inl"
|
||||
|
||||
#include "compiler_product_helper_adln.inl"
|
||||
#include "platforms.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
template <>
|
||||
uint32_t CompilerProductHelperHw<IGFX_ALDERLAKE_N>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
||||
return AOT::ADL_N;
|
||||
}
|
||||
|
||||
static EnableCompilerProductHelper<IGFX_ALDERLAKE_N> enableCompilerProductHelperADLN;
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -16,9 +16,15 @@
|
||||
#include "shared/source/helpers/compiler_product_helper_tgllp_and_later.inl"
|
||||
|
||||
#include "compiler_product_helper_adlp.inl"
|
||||
#include "platforms.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
template <>
|
||||
uint32_t CompilerProductHelperHw<IGFX_ALDERLAKE_P>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
||||
return AOT::ADL_P;
|
||||
}
|
||||
|
||||
static EnableCompilerProductHelper<IGFX_ALDERLAKE_P> enableCompilerProductHelperADLP;
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -15,12 +15,19 @@
|
||||
#include "shared/source/helpers/compiler_product_helper_enable_subgroup_local_block_io.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_tgllp_and_later.inl"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
namespace NEO {
|
||||
template <>
|
||||
uint64_t CompilerProductHelperHw<IGFX_ALDERLAKE_S>::getHwInfoConfig(const HardwareInfo &hwInfo) const {
|
||||
return 0x100020010;
|
||||
}
|
||||
|
||||
template <>
|
||||
uint32_t CompilerProductHelperHw<IGFX_ALDERLAKE_S>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
||||
return AOT::ADL_S;
|
||||
}
|
||||
|
||||
static EnableCompilerProductHelper<IGFX_ALDERLAKE_S> enableCompilerProductHelperADLS;
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -15,12 +15,19 @@
|
||||
#include "shared/source/helpers/compiler_product_helper_enable_subgroup_local_block_io.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_tgllp_and_later.inl"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
namespace NEO {
|
||||
template <>
|
||||
uint64_t CompilerProductHelperHw<IGFX_DG1>::getHwInfoConfig(const HardwareInfo &hwInfo) const {
|
||||
return 0x100060010;
|
||||
}
|
||||
|
||||
template <>
|
||||
uint32_t CompilerProductHelperHw<IGFX_DG1>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
||||
return AOT::DG1;
|
||||
}
|
||||
|
||||
static EnableCompilerProductHelper<IGFX_DG1> enableCompilerProductHelperDG1;
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -15,9 +15,24 @@
|
||||
#include "shared/source/helpers/compiler_product_helper_enable_subgroup_local_block_io.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_tgllp_and_later.inl"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
#include "shared/source/gen12lp/compiler_product_helper_rkl.inl"
|
||||
template <>
|
||||
uint64_t CompilerProductHelperHw<IGFX_ROCKETLAKE>::getHwInfoConfig(const HardwareInfo &hwInfo) const {
|
||||
return 0x100020010;
|
||||
}
|
||||
template <>
|
||||
bool CompilerProductHelperHw<IGFX_ROCKETLAKE>::isForceEmuInt32DivRemSPRequired() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
template <>
|
||||
uint32_t CompilerProductHelperHw<IGFX_ROCKETLAKE>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
||||
return AOT::RKL;
|
||||
}
|
||||
|
||||
static EnableCompilerProductHelper<IGFX_ROCKETLAKE> enableCompilerProductHelperRKL;
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -15,12 +15,19 @@
|
||||
#include "shared/source/helpers/compiler_product_helper_enable_subgroup_local_block_io.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_tgllp_and_later.inl"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
namespace NEO {
|
||||
template <>
|
||||
uint64_t CompilerProductHelperHw<IGFX_TIGERLAKE_LP>::getHwInfoConfig(const HardwareInfo &hwInfo) const {
|
||||
return 0x100060010;
|
||||
}
|
||||
|
||||
template <>
|
||||
uint32_t CompilerProductHelperHw<IGFX_TIGERLAKE_LP>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
||||
return AOT::TGL;
|
||||
}
|
||||
|
||||
static EnableCompilerProductHelper<IGFX_TIGERLAKE_LP> enableCompilerProductHelperTGLLP;
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -12,8 +12,6 @@
|
||||
#include "shared/source/os_interface/product_helper.inl"
|
||||
#include "shared/source/os_interface/product_helper_bdw_and_later.inl"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
constexpr static auto gfxProduct = IGFX_ALDERLAKE_N;
|
||||
|
||||
#include "shared/source/gen12lp/adln/os_agnostic_product_helper_adln.inl"
|
||||
|
||||
@@ -14,8 +14,6 @@
|
||||
#include "shared/source/os_interface/product_helper.inl"
|
||||
#include "shared/source/os_interface/product_helper_bdw_and_later.inl"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
constexpr static auto gfxProduct = IGFX_ALDERLAKE_P;
|
||||
|
||||
#include "shared/source/gen12lp/adlp/os_agnostic_product_helper_adlp.inl"
|
||||
|
||||
@@ -12,8 +12,6 @@
|
||||
#include "shared/source/os_interface/product_helper.inl"
|
||||
#include "shared/source/os_interface/product_helper_bdw_and_later.inl"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
constexpr static auto gfxProduct = IGFX_ALDERLAKE_S;
|
||||
|
||||
#include "shared/source/gen12lp/adls/os_agnostic_product_helper_adls.inl"
|
||||
|
||||
@@ -12,8 +12,6 @@
|
||||
#include "shared/source/os_interface/product_helper.inl"
|
||||
#include "shared/source/os_interface/product_helper_bdw_and_later.inl"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
constexpr static auto gfxProduct = IGFX_DG1;
|
||||
|
||||
#include "shared/source/gen12lp/dg1/os_agnostic_product_helper_dg1.inl"
|
||||
|
||||
@@ -12,8 +12,6 @@
|
||||
#include "shared/source/os_interface/product_helper.inl"
|
||||
#include "shared/source/os_interface/product_helper_bdw_and_later.inl"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
constexpr static auto gfxProduct = IGFX_ROCKETLAKE;
|
||||
|
||||
#include "shared/source/gen12lp/os_agnostic_product_helper_gen12lp.inl"
|
||||
|
||||
@@ -12,8 +12,6 @@
|
||||
#include "shared/source/os_interface/product_helper.inl"
|
||||
#include "shared/source/os_interface/product_helper_bdw_and_later.inl"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
constexpr static auto gfxProduct = IGFX_TIGERLAKE_LP;
|
||||
|
||||
#include "shared/source/gen12lp/os_agnostic_product_helper_gen12lp.inl"
|
||||
|
||||
@@ -21,11 +21,6 @@ uint32_t ProductHelperHw<gfxProduct>::getHwRevIdFromStepping(uint32_t stepping,
|
||||
return CommonConstants::invalidStepping;
|
||||
}
|
||||
|
||||
template <>
|
||||
uint32_t ProductHelperHw<gfxProduct>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
||||
return AOT::RKL;
|
||||
}
|
||||
|
||||
template <>
|
||||
uint32_t ProductHelperHw<gfxProduct>::getSteppingFromHwRevId(const HardwareInfo &hwInfo) const {
|
||||
switch (hwInfo.platform.usRevId) {
|
||||
|
||||
@@ -23,11 +23,6 @@ uint32_t ProductHelperHw<gfxProduct>::getHwRevIdFromStepping(uint32_t stepping,
|
||||
return CommonConstants::invalidStepping;
|
||||
}
|
||||
|
||||
template <>
|
||||
uint32_t ProductHelperHw<gfxProduct>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
||||
return AOT::TGL;
|
||||
}
|
||||
|
||||
template <>
|
||||
uint32_t ProductHelperHw<gfxProduct>::getSteppingFromHwRevId(const HardwareInfo &hwInfo) const {
|
||||
switch (hwInfo.platform.usRevId) {
|
||||
|
||||
@@ -12,8 +12,6 @@
|
||||
#include "shared/source/os_interface/product_helper.inl"
|
||||
#include "shared/source/os_interface/product_helper_bdw_and_later.inl"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
constexpr static auto gfxProduct = IGFX_ALDERLAKE_N;
|
||||
|
||||
#include "shared/source/gen12lp/adln/os_agnostic_product_helper_adln.inl"
|
||||
|
||||
@@ -14,8 +14,6 @@
|
||||
#include "shared/source/os_interface/product_helper.inl"
|
||||
#include "shared/source/os_interface/product_helper_bdw_and_later.inl"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
constexpr static auto gfxProduct = IGFX_ALDERLAKE_P;
|
||||
|
||||
#include "shared/source/gen12lp/adlp/os_agnostic_product_helper_adlp.inl"
|
||||
|
||||
@@ -12,8 +12,6 @@
|
||||
#include "shared/source/os_interface/product_helper.inl"
|
||||
#include "shared/source/os_interface/product_helper_bdw_and_later.inl"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
constexpr static auto gfxProduct = IGFX_ALDERLAKE_S;
|
||||
|
||||
#include "shared/source/gen12lp/adls/os_agnostic_product_helper_adls.inl"
|
||||
|
||||
@@ -12,8 +12,6 @@
|
||||
#include "shared/source/os_interface/product_helper.inl"
|
||||
#include "shared/source/os_interface/product_helper_bdw_and_later.inl"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
constexpr static auto gfxProduct = IGFX_DG1;
|
||||
|
||||
#include "shared/source/gen12lp/dg1/os_agnostic_product_helper_dg1.inl"
|
||||
|
||||
@@ -12,8 +12,6 @@
|
||||
#include "shared/source/os_interface/product_helper.inl"
|
||||
#include "shared/source/os_interface/product_helper_bdw_and_later.inl"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
constexpr static auto gfxProduct = IGFX_ROCKETLAKE;
|
||||
|
||||
#include "shared/source/gen12lp/os_agnostic_product_helper_gen12lp.inl"
|
||||
|
||||
@@ -12,8 +12,6 @@
|
||||
#include "shared/source/os_interface/product_helper.inl"
|
||||
#include "shared/source/os_interface/product_helper_bdw_and_later.inl"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
constexpr static auto gfxProduct = IGFX_TIGERLAKE_LP;
|
||||
|
||||
#include "shared/source/gen12lp/os_agnostic_product_helper_gen12lp.inl"
|
||||
|
||||
@@ -8,11 +8,6 @@
|
||||
#include "aubstream/product_family.h"
|
||||
|
||||
namespace NEO {
|
||||
template <>
|
||||
uint32_t ProductHelperHw<gfxProduct>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
||||
return AOT::BDW;
|
||||
}
|
||||
|
||||
template <>
|
||||
std::optional<aub_stream::ProductFamily> ProductHelperHw<gfxProduct>::getAubStreamProductFamily() const {
|
||||
return aub_stream::ProductFamily::Bdw;
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
template <>
|
||||
bool CompilerProductHelperHw<IGFX_BROADWELL>::isStatelessToStatefulBufferOffsetSupported() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
template <>
|
||||
uint64_t CompilerProductHelperHw<IGFX_BROADWELL>::getHwInfoConfig(const HardwareInfo &hwInfo) const {
|
||||
return 0x100030008;
|
||||
}
|
||||
@@ -15,9 +15,24 @@
|
||||
#include "shared/source/helpers/compiler_product_helper_disable_split_matrix_multiply_accumulate.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_disable_subgroup_local_block_io.inl"
|
||||
|
||||
namespace NEO {
|
||||
#include "platforms.h"
|
||||
|
||||
namespace NEO {
|
||||
template <>
|
||||
uint32_t CompilerProductHelperHw<IGFX_BROADWELL>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
||||
return AOT::BDW;
|
||||
}
|
||||
|
||||
template <>
|
||||
bool CompilerProductHelperHw<IGFX_BROADWELL>::isStatelessToStatefulBufferOffsetSupported() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
template <>
|
||||
uint64_t CompilerProductHelperHw<IGFX_BROADWELL>::getHwInfoConfig(const HardwareInfo &hwInfo) const {
|
||||
return 0x100030008;
|
||||
}
|
||||
|
||||
#include "shared/source/gen8/compiler_product_helper_bdw.inl"
|
||||
static EnableCompilerProductHelper<IGFX_BROADWELL> enableCompilerProductHelperBDW;
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -11,8 +11,6 @@
|
||||
#include "shared/source/os_interface/product_helper.inl"
|
||||
#include "shared/source/os_interface/product_helper_bdw_and_later.inl"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
constexpr static auto gfxProduct = IGFX_BROADWELL;
|
||||
|
||||
#include "shared/source/gen8/bdw/os_agnostic_product_helper_bdw.inl"
|
||||
|
||||
@@ -11,8 +11,6 @@
|
||||
#include "shared/source/os_interface/product_helper.inl"
|
||||
#include "shared/source/os_interface/product_helper_bdw_and_later.inl"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
constexpr static auto gfxProduct = IGFX_BROADWELL;
|
||||
|
||||
#include "shared/source/gen8/bdw/os_agnostic_product_helper_bdw.inl"
|
||||
|
||||
@@ -8,11 +8,6 @@
|
||||
#include "aubstream/product_family.h"
|
||||
|
||||
namespace NEO {
|
||||
template <>
|
||||
uint32_t ProductHelperHw<gfxProduct>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
||||
return AOT::APL;
|
||||
}
|
||||
|
||||
template <>
|
||||
std::optional<aub_stream::ProductFamily> ProductHelperHw<gfxProduct>::getAubStreamProductFamily() const {
|
||||
return aub_stream::ProductFamily::Bxt;
|
||||
|
||||
@@ -5,30 +5,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen9/cfl/device_ids_configs_cfl.h"
|
||||
|
||||
#include "aubstream/product_family.h"
|
||||
#include "platforms.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
namespace NEO {
|
||||
template <>
|
||||
uint32_t ProductHelperHw<gfxProduct>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
||||
auto deviceId = hwInfo.platform.usDeviceID;
|
||||
bool isCfl = (std::find(cflDeviceIds.begin(), cflDeviceIds.end(), deviceId) != cflDeviceIds.end());
|
||||
bool isWhl = (std::find(whlDeviceIds.begin(), whlDeviceIds.end(), deviceId) != whlDeviceIds.end());
|
||||
bool isCml = (std::find(cmlDeviceIds.begin(), cmlDeviceIds.end(), deviceId) != cmlDeviceIds.end());
|
||||
|
||||
if (isCfl) {
|
||||
return AOT::CFL;
|
||||
} else if (isCml) {
|
||||
return AOT::CML;
|
||||
} else if (isWhl) {
|
||||
return AOT::WHL;
|
||||
}
|
||||
return AOT::UNKNOWN_ISA;
|
||||
}
|
||||
|
||||
template <>
|
||||
std::optional<aub_stream::ProductFamily> ProductHelperHw<gfxProduct>::getAubStreamProductFamily() const {
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
#include "shared/source/helpers/compiler_product_helper_disable_split_matrix_multiply_accumulate.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_disable_subgroup_local_block_io.inl"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
template <>
|
||||
@@ -27,6 +29,11 @@ uint32_t CompilerProductHelperHw<IGFX_BROXTON>::getNumThreadsPerEu() const {
|
||||
return 6;
|
||||
}
|
||||
|
||||
template <>
|
||||
uint32_t CompilerProductHelperHw<IGFX_BROXTON>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
||||
return AOT::APL;
|
||||
}
|
||||
|
||||
static EnableCompilerProductHelper<IGFX_BROXTON> enableCompilerProductHelperBXT;
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen9/cfl/device_ids_configs_cfl.h"
|
||||
#include "shared/source/helpers/compiler_aot_config_bdw_and_later.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper.h"
|
||||
#include "shared/source/helpers/compiler_product_helper_base.inl"
|
||||
@@ -15,12 +16,33 @@
|
||||
#include "shared/source/helpers/compiler_product_helper_disable_split_matrix_multiply_accumulate.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_disable_subgroup_local_block_io.inl"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
namespace NEO {
|
||||
template <>
|
||||
uint64_t CompilerProductHelperHw<IGFX_COFFEELAKE>::getHwInfoConfig(const HardwareInfo &hwInfo) const {
|
||||
return 0x100030006;
|
||||
}
|
||||
|
||||
template <>
|
||||
uint32_t CompilerProductHelperHw<IGFX_COFFEELAKE>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
||||
auto deviceId = hwInfo.platform.usDeviceID;
|
||||
bool isCfl = (std::find(cflDeviceIds.begin(), cflDeviceIds.end(), deviceId) != cflDeviceIds.end());
|
||||
bool isWhl = (std::find(whlDeviceIds.begin(), whlDeviceIds.end(), deviceId) != whlDeviceIds.end());
|
||||
bool isCml = (std::find(cmlDeviceIds.begin(), cmlDeviceIds.end(), deviceId) != cmlDeviceIds.end());
|
||||
|
||||
if (isCfl) {
|
||||
return AOT::CFL;
|
||||
} else if (isCml) {
|
||||
return AOT::CML;
|
||||
} else if (isWhl) {
|
||||
return AOT::WHL;
|
||||
}
|
||||
return AOT::UNKNOWN_ISA;
|
||||
}
|
||||
|
||||
static EnableCompilerProductHelper<IGFX_COFFEELAKE> enableCompilerProductHelperCFL;
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
#include "shared/source/helpers/compiler_product_helper_disable_split_matrix_multiply_accumulate.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_disable_subgroup_local_block_io.inl"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
namespace NEO {
|
||||
template <>
|
||||
uint64_t CompilerProductHelperHw<IGFX_GEMINILAKE>::getHwInfoConfig(const HardwareInfo &hwInfo) const {
|
||||
@@ -26,6 +28,11 @@ uint32_t CompilerProductHelperHw<IGFX_GEMINILAKE>::getNumThreadsPerEu() const {
|
||||
return 6;
|
||||
}
|
||||
|
||||
template <>
|
||||
uint32_t CompilerProductHelperHw<IGFX_GEMINILAKE>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
||||
return AOT::GLK;
|
||||
}
|
||||
|
||||
static EnableCompilerProductHelper<IGFX_GEMINILAKE> enableCompilerProductHelperGLK;
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen9/kbl/device_ids_configs_kbl.h"
|
||||
#include "shared/source/helpers/compiler_aot_config_bdw_and_later.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper.h"
|
||||
#include "shared/source/helpers/compiler_product_helper_base.inl"
|
||||
@@ -15,12 +16,30 @@
|
||||
#include "shared/source/helpers/compiler_product_helper_disable_split_matrix_multiply_accumulate.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_disable_subgroup_local_block_io.inl"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
namespace NEO {
|
||||
template <>
|
||||
uint64_t CompilerProductHelperHw<IGFX_KABYLAKE>::getHwInfoConfig(const HardwareInfo &hwInfo) const {
|
||||
return 0x100030006;
|
||||
}
|
||||
|
||||
template <>
|
||||
uint32_t CompilerProductHelperHw<IGFX_KABYLAKE>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
||||
auto deviceId = hwInfo.platform.usDeviceID;
|
||||
bool isKbl = (std::find(kblDeviceIds.begin(), kblDeviceIds.end(), deviceId) != kblDeviceIds.end());
|
||||
bool isAml = (std::find(amlDeviceIds.begin(), amlDeviceIds.end(), deviceId) != amlDeviceIds.end());
|
||||
|
||||
if (isKbl) {
|
||||
return AOT::KBL;
|
||||
} else if (isAml) {
|
||||
return AOT::AML;
|
||||
}
|
||||
return AOT::UNKNOWN_ISA;
|
||||
}
|
||||
|
||||
static EnableCompilerProductHelper<IGFX_KABYLAKE> enableCompilerProductHelperKBL;
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
#include "shared/source/helpers/compiler_product_helper_disable_split_matrix_multiply_accumulate.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_disable_subgroup_local_block_io.inl"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
template <>
|
||||
@@ -22,6 +24,11 @@ uint64_t CompilerProductHelperHw<IGFX_SKYLAKE>::getHwInfoConfig(const HardwareIn
|
||||
return 0x100030008;
|
||||
}
|
||||
|
||||
template <>
|
||||
uint32_t CompilerProductHelperHw<IGFX_SKYLAKE>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
||||
return AOT::SKL;
|
||||
}
|
||||
|
||||
static EnableCompilerProductHelper<IGFX_SKYLAKE> enableCompilerProductHelperSKL;
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -8,11 +8,6 @@
|
||||
#include "aubstream/product_family.h"
|
||||
|
||||
namespace NEO {
|
||||
template <>
|
||||
uint32_t ProductHelperHw<gfxProduct>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
||||
return AOT::GLK;
|
||||
}
|
||||
|
||||
template <>
|
||||
std::optional<aub_stream::ProductFamily> ProductHelperHw<gfxProduct>::getAubStreamProductFamily() const {
|
||||
return aub_stream::ProductFamily::Glk;
|
||||
|
||||
@@ -5,27 +5,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen9/kbl/device_ids_configs_kbl.h"
|
||||
|
||||
#include "aubstream/product_family.h"
|
||||
#include "platforms.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
namespace NEO {
|
||||
template <>
|
||||
uint32_t ProductHelperHw<gfxProduct>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
||||
auto deviceId = hwInfo.platform.usDeviceID;
|
||||
bool isKbl = (std::find(kblDeviceIds.begin(), kblDeviceIds.end(), deviceId) != kblDeviceIds.end());
|
||||
bool isAml = (std::find(amlDeviceIds.begin(), amlDeviceIds.end(), deviceId) != amlDeviceIds.end());
|
||||
|
||||
if (isKbl) {
|
||||
return AOT::KBL;
|
||||
} else if (isAml) {
|
||||
return AOT::AML;
|
||||
}
|
||||
return AOT::UNKNOWN_ISA;
|
||||
}
|
||||
|
||||
template <>
|
||||
std::optional<aub_stream::ProductFamily> ProductHelperHw<gfxProduct>::getAubStreamProductFamily() const {
|
||||
|
||||
@@ -13,8 +13,6 @@
|
||||
#include "shared/source/os_interface/product_helper.inl"
|
||||
#include "shared/source/os_interface/product_helper_bdw_and_later.inl"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
constexpr static auto gfxProduct = IGFX_BROXTON;
|
||||
|
||||
#include "shared/source/gen9/bxt/os_agnostic_product_helper_bxt.inl"
|
||||
|
||||
@@ -13,8 +13,6 @@
|
||||
#include "shared/source/os_interface/product_helper.inl"
|
||||
#include "shared/source/os_interface/product_helper_bdw_and_later.inl"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
constexpr static auto gfxProduct = IGFX_GEMINILAKE;
|
||||
|
||||
#include "shared/source/gen9/glk/os_agnostic_product_helper_glk.inl"
|
||||
|
||||
@@ -11,8 +11,6 @@
|
||||
#include "shared/source/os_interface/product_helper.inl"
|
||||
#include "shared/source/os_interface/product_helper_bdw_and_later.inl"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
constexpr static auto gfxProduct = IGFX_SKYLAKE;
|
||||
|
||||
#include "shared/source/gen9/skl/os_agnostic_product_helper_skl.inl"
|
||||
|
||||
@@ -8,11 +8,6 @@
|
||||
#include "aubstream/product_family.h"
|
||||
|
||||
namespace NEO {
|
||||
template <>
|
||||
uint32_t ProductHelperHw<gfxProduct>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
||||
return AOT::SKL;
|
||||
}
|
||||
|
||||
template <>
|
||||
std::optional<aub_stream::ProductFamily> ProductHelperHw<gfxProduct>::getAubStreamProductFamily() const {
|
||||
return aub_stream::ProductFamily::Skl;
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
#include "shared/source/os_interface/product_helper.inl"
|
||||
#include "shared/source/os_interface/product_helper_bdw_and_later.inl"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
constexpr static auto gfxProduct = IGFX_BROXTON;
|
||||
|
||||
#include "shared/source/gen9/bxt/os_agnostic_product_helper_bxt.inl"
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
#include "shared/source/os_interface/product_helper.inl"
|
||||
#include "shared/source/os_interface/product_helper_bdw_and_later.inl"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
constexpr static auto gfxProduct = IGFX_GEMINILAKE;
|
||||
|
||||
#include "shared/source/gen9/glk/os_agnostic_product_helper_glk.inl"
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
#include "shared/source/os_interface/product_helper.inl"
|
||||
#include "shared/source/os_interface/product_helper_bdw_and_later.inl"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
constexpr static auto gfxProduct = IGFX_SKYLAKE;
|
||||
|
||||
#include "shared/source/gen9/skl/os_agnostic_product_helper_skl.inl"
|
||||
|
||||
@@ -185,7 +185,7 @@ endif()
|
||||
|
||||
if(SUPPORT_MTL_AND_LATER)
|
||||
list(APPEND NEO_CORE_HELPERS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/compiler_aot_config_mtl_and_later.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/compiler_product_helper_mtl_and_later.inl
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
@@ -7,8 +7,17 @@
|
||||
|
||||
#include "shared/source/helpers/compiler_product_helper.h"
|
||||
|
||||
#include "shared/source/debug_settings/debug_settings_manager.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
CompilerProductHelperCreateFunctionType compilerProductHelperFactory[IGFX_MAX_PRODUCT] = {};
|
||||
|
||||
uint32_t CompilerProductHelper::getHwIpVersion(const HardwareInfo &hwInfo) const {
|
||||
if (DebugManager.flags.OverrideHwIpVersion.get() != -1) {
|
||||
return DebugManager.flags.OverrideHwIpVersion.get();
|
||||
}
|
||||
return getProductConfigFromHwInfo(hwInfo);
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -56,8 +56,10 @@ class CompilerProductHelper {
|
||||
virtual std::string getDeviceExtensions(const HardwareInfo &hwInfo, const ReleaseHelper *releaseHelper) const = 0;
|
||||
|
||||
virtual ~CompilerProductHelper() = default;
|
||||
uint32_t getHwIpVersion(const HardwareInfo &hwInfo) const;
|
||||
|
||||
protected:
|
||||
virtual uint32_t getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const = 0;
|
||||
CompilerProductHelper() = default;
|
||||
};
|
||||
|
||||
@@ -93,6 +95,7 @@ class CompilerProductHelperHw : public CompilerProductHelper {
|
||||
~CompilerProductHelperHw() override = default;
|
||||
|
||||
protected:
|
||||
uint32_t getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const override;
|
||||
CompilerProductHelperHw() = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "shared/source/debug_settings/debug_settings_manager.h"
|
||||
#include "shared/source/helpers/cache_policy.h"
|
||||
#include "shared/source/helpers/compiler_product_helper.h"
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2022-2023 Intel Corporation
|
||||
* Copyright (C) 2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -10,6 +10,10 @@
|
||||
|
||||
namespace NEO {
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
uint32_t CompilerProductHelperHw<gfxProduct>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
||||
return hwInfo.ipVersion.value;
|
||||
}
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
void CompilerProductHelperHw<gfxProduct>::setProductConfigForHwInfo(HardwareInfo &hwInfo, HardwareIpVersion config) const {
|
||||
hwInfo.ipVersion = config;
|
||||
}
|
||||
@@ -54,9 +54,5 @@ if(SUPPORT_DG2_AND_LATER)
|
||||
list(APPEND NEO_CORE_OS_INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/product_helper_dg2_and_later.inl)
|
||||
endif()
|
||||
|
||||
if(SUPPORT_MTL_AND_LATER)
|
||||
list(APPEND NEO_CORE_OS_INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/product_helper_mtl_and_later.inl)
|
||||
endif()
|
||||
|
||||
set_property(GLOBAL PROPERTY NEO_CORE_OS_INTERFACE ${NEO_CORE_OS_INTERFACE})
|
||||
add_subdirectories()
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "shared/source/debug_settings/debug_settings_manager.h"
|
||||
#include "shared/source/execution_environment/execution_environment.h"
|
||||
#include "shared/source/execution_environment/root_device_environment.h"
|
||||
#include "shared/source/helpers/compiler_product_helper.h"
|
||||
#include "shared/source/helpers/constants.h"
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
#include "shared/source/helpers/ptr_math.h"
|
||||
@@ -19,7 +20,6 @@
|
||||
#include "shared/source/os_interface/linux/i915.h"
|
||||
#include "shared/source/os_interface/linux/memory_info.h"
|
||||
#include "shared/source/os_interface/linux/os_context_linux.h"
|
||||
#include "shared/source/os_interface/product_helper.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <sstream>
|
||||
@@ -58,8 +58,8 @@ void IoctlHelper::fillExecObject(ExecObject &execObject, uint32_t handle, uint64
|
||||
void IoctlHelper::setupIpVersion() {
|
||||
auto &rootDeviceEnvironment = drm.getRootDeviceEnvironment();
|
||||
auto &hwInfo = *rootDeviceEnvironment.getMutableHardwareInfo();
|
||||
auto &productHelper = rootDeviceEnvironment.getHelper<ProductHelper>();
|
||||
hwInfo.ipVersion.value = productHelper.getHwIpVersion(hwInfo);
|
||||
auto &compilerProductHelper = rootDeviceEnvironment.getHelper<CompilerProductHelper>();
|
||||
hwInfo.ipVersion.value = compilerProductHelper.getHwIpVersion(hwInfo);
|
||||
}
|
||||
|
||||
void IoctlHelper::logExecObject(const ExecObject &execObject, std::stringstream &logger, size_t size) {
|
||||
|
||||
@@ -90,7 +90,6 @@ class ProductHelper {
|
||||
virtual bool obtainBlitterPreference(const HardwareInfo &hwInfo) const = 0;
|
||||
virtual bool isBlitterFullySupported(const HardwareInfo &hwInfo) const = 0;
|
||||
virtual bool isPageTableManagerSupported(const HardwareInfo &hwInfo) const = 0;
|
||||
virtual uint32_t getHwIpVersion(const HardwareInfo &hwInfo) const = 0;
|
||||
virtual uint32_t getHwRevIdFromStepping(uint32_t stepping, const HardwareInfo &hwInfo) const = 0;
|
||||
virtual uint32_t getSteppingFromHwRevId(const HardwareInfo &hwInfo) const = 0;
|
||||
virtual uint32_t getAubStreamSteppingFromHwRevId(const HardwareInfo &hwInfo) const = 0;
|
||||
@@ -215,6 +214,5 @@ class ProductHelper {
|
||||
|
||||
virtual LocalMemoryAccessMode getDefaultLocalMemoryAccessMode(const HardwareInfo &hwInfo) const = 0;
|
||||
virtual void fillScmPropertiesSupportStructureBase(StateComputeModePropertiesSupport &propertiesSupport) const = 0;
|
||||
virtual uint32_t getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const = 0;
|
||||
};
|
||||
} // namespace NEO
|
||||
|
||||
@@ -212,14 +212,6 @@ uint32_t ProductHelperHw<gfxProduct>::getSteppingFromHwRevId(const HardwareInfo
|
||||
return CommonConstants::invalidStepping;
|
||||
}
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
uint32_t ProductHelperHw<gfxProduct>::getHwIpVersion(const HardwareInfo &hwInfo) const {
|
||||
if (DebugManager.flags.OverrideHwIpVersion.get() != -1) {
|
||||
return DebugManager.flags.OverrideHwIpVersion.get();
|
||||
}
|
||||
return getProductConfigFromHwInfo(hwInfo);
|
||||
}
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
uint32_t ProductHelperHw<gfxProduct>::getAubStreamSteppingFromHwRevId(const HardwareInfo &hwInfo) const {
|
||||
switch (getSteppingFromHwRevId(hwInfo)) {
|
||||
|
||||
@@ -44,7 +44,6 @@ class ProductHelperHw : public ProductHelper {
|
||||
bool isBlitterFullySupported(const HardwareInfo &hwInfo) const override;
|
||||
bool isPageTableManagerSupported(const HardwareInfo &hwInfo) const override;
|
||||
bool overrideGfxPartitionLayoutForWsl() const override;
|
||||
uint32_t getHwIpVersion(const HardwareInfo &hwInfo) const override;
|
||||
uint32_t getHwRevIdFromStepping(uint32_t stepping, const HardwareInfo &hwInfo) const override;
|
||||
uint32_t getSteppingFromHwRevId(const HardwareInfo &hwInfo) const override;
|
||||
uint32_t getAubStreamSteppingFromHwRevId(const HardwareInfo &hwInfo) const override;
|
||||
@@ -169,7 +168,6 @@ class ProductHelperHw : public ProductHelper {
|
||||
void enableCompression(HardwareInfo *hwInfo) const;
|
||||
void enableBlitterOperationsSupport(HardwareInfo *hwInfo) const;
|
||||
bool getConcurrentAccessMemCapabilitiesSupported(UsmAccessCapabilities capability) const;
|
||||
uint32_t getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const override;
|
||||
uint64_t getHostMemCapabilitiesValue() const;
|
||||
bool getHostMemCapabilitiesSupported(const HardwareInfo *hwInfo) const;
|
||||
LocalMemoryAccessMode getDefaultLocalMemoryAccessMode(const HardwareInfo &hwInfo) const override;
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/os_interface/product_helper.h"
|
||||
|
||||
namespace NEO {
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
uint32_t ProductHelperHw<gfxProduct>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
||||
return hwInfo.ipVersion.value;
|
||||
}
|
||||
} // namespace NEO
|
||||
@@ -6,8 +6,8 @@
|
||||
*/
|
||||
|
||||
#include "shared/source/execution_environment/root_device_environment.h"
|
||||
#include "shared/source/helpers/compiler_product_helper.h"
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
#include "shared/source/os_interface/product_helper.h"
|
||||
#include "shared/source/os_interface/windows/wddm/wddm.h"
|
||||
|
||||
namespace NEO {
|
||||
@@ -15,7 +15,7 @@ namespace NEO {
|
||||
void Wddm::populateAdditionalAdapterInfoOptions(const ADAPTER_INFO_KMD &adapterInfo) {
|
||||
}
|
||||
void Wddm::populateIpVersion(HardwareInfo &hwInfo) {
|
||||
auto &productHelper = rootDeviceEnvironment.getHelper<ProductHelper>();
|
||||
hwInfo.ipVersion.value = productHelper.getHwIpVersion(hwInfo);
|
||||
auto &compilerProductHelper = rootDeviceEnvironment.getHelper<CompilerProductHelper>();
|
||||
hwInfo.ipVersion.value = compilerProductHelper.getHwIpVersion(hwInfo);
|
||||
}
|
||||
} // namespace NEO
|
||||
|
||||
@@ -15,13 +15,40 @@
|
||||
#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 "shared/source/xe_hpc_core/hw_cmds.h"
|
||||
#include "shared/source/xe_hpc_core/pvc/device_ids_configs_pvc.h"
|
||||
|
||||
#include "compiler_product_helper_pvc.inl"
|
||||
|
||||
#include "platforms.h"
|
||||
namespace NEO {
|
||||
|
||||
static EnableCompilerProductHelper<IGFX_PVC> enableCompilerProductHelperPVC;
|
||||
|
||||
template <>
|
||||
uint32_t CompilerProductHelperHw<IGFX_PVC>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
||||
auto deviceId = hwInfo.platform.usDeviceID;
|
||||
bool isPvcXl = (std::find(pvcXlDeviceIds.begin(), pvcXlDeviceIds.end(), deviceId) != pvcXlDeviceIds.end());
|
||||
bool isPvcXt = (std::find(pvcXtDeviceIds.begin(), pvcXtDeviceIds.end(), deviceId) != pvcXtDeviceIds.end());
|
||||
if (isPvcXl) {
|
||||
switch (hwInfo.platform.usRevId & PVC::pvcSteppingBits) {
|
||||
case 0x0:
|
||||
return AOT::PVC_XL_A0;
|
||||
default:
|
||||
case 0x1:
|
||||
return AOT::PVC_XL_A0P;
|
||||
}
|
||||
} else if (isPvcXt) {
|
||||
switch (hwInfo.platform.usRevId & PVC::pvcSteppingBits) {
|
||||
case 0x3:
|
||||
return AOT::PVC_XT_A0;
|
||||
case 0x5:
|
||||
return AOT::PVC_XT_B0;
|
||||
case 0x6:
|
||||
return AOT::PVC_XT_B1;
|
||||
default:
|
||||
case 0x7:
|
||||
return AOT::PVC_XT_C0;
|
||||
}
|
||||
}
|
||||
return AOT::UNKNOWN_ISA;
|
||||
}
|
||||
template <>
|
||||
uint32_t CompilerProductHelperHw<IGFX_PVC>::matchRevisionIdWithProductConfig(HardwareIpVersion ipVersion, uint32_t revisionID) const {
|
||||
HardwareIpVersion pvcConfig = ipVersion;
|
||||
@@ -29,4 +56,6 @@ uint32_t CompilerProductHelperHw<IGFX_PVC>::matchRevisionIdWithProductConfig(Har
|
||||
return pvcConfig.value;
|
||||
}
|
||||
|
||||
static EnableCompilerProductHelper<IGFX_PVC> enableCompilerProductHelperPVC;
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -21,8 +21,6 @@
|
||||
#include "shared/source/utilities/directory.h"
|
||||
#include "shared/source/xe_hpc_core/hw_cmds_pvc.h"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
constexpr static auto gfxProduct = IGFX_PVC;
|
||||
|
||||
namespace NEO {
|
||||
|
||||
@@ -58,36 +58,6 @@ uint32_t ProductHelperHw<gfxProduct>::getSteppingFromHwRevId(const HardwareInfo
|
||||
return CommonConstants::invalidStepping;
|
||||
}
|
||||
|
||||
template <>
|
||||
uint32_t ProductHelperHw<gfxProduct>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
||||
uint32_t stepping = getSteppingFromHwRevId(hwInfo);
|
||||
if (stepping == CommonConstants::invalidStepping) {
|
||||
return AOT::UNKNOWN_ISA;
|
||||
}
|
||||
|
||||
if (PVC::isXl(hwInfo)) {
|
||||
switch (hwInfo.platform.usRevId) {
|
||||
case 0x0:
|
||||
return AOT::PVC_XL_A0;
|
||||
default:
|
||||
case 0x1:
|
||||
return AOT::PVC_XL_A0P;
|
||||
}
|
||||
} else {
|
||||
switch (hwInfo.platform.usRevId) {
|
||||
case 0x3:
|
||||
return AOT::PVC_XT_A0;
|
||||
case 05:
|
||||
return AOT::PVC_XT_B0;
|
||||
case 06:
|
||||
return AOT::PVC_XT_B1;
|
||||
default:
|
||||
case 07:
|
||||
return AOT::PVC_XT_C0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template <>
|
||||
bool ProductHelperHw<gfxProduct>::isDisableOverdispatchAvailable(const HardwareInfo &hwInfo) const {
|
||||
return getSteppingFromHwRevId(hwInfo) >= REVISION_B;
|
||||
|
||||
@@ -12,8 +12,6 @@
|
||||
#include "shared/source/os_interface/product_helper_xehp_and_later.inl"
|
||||
#include "shared/source/xe_hpc_core/hw_cmds_pvc.h"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
constexpr static auto gfxProduct = IGFX_PVC;
|
||||
|
||||
#include "shared/source/xe_hpc_core/os_agnostic_product_helper_xe_hpc_core.inl"
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
#include "shared/source/xe_hpg_core/hw_cmds_dg2.h"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
namespace NEO {
|
||||
template <>
|
||||
uint64_t CompilerProductHelperHw<IGFX_DG2>::getHwInfoConfig(const HardwareInfo &hwInfo) const {
|
||||
@@ -15,4 +17,32 @@ uint64_t CompilerProductHelperHw<IGFX_DG2>::getHwInfoConfig(const HardwareInfo &
|
||||
}
|
||||
return 0x200040010;
|
||||
}
|
||||
|
||||
template <>
|
||||
uint32_t CompilerProductHelperHw<IGFX_DG2>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
||||
if (DG2::isG10(hwInfo)) {
|
||||
switch (hwInfo.platform.usRevId) {
|
||||
case 0x0:
|
||||
return AOT::DG2_G10_A0;
|
||||
case 0x1:
|
||||
return AOT::DG2_G10_A1;
|
||||
case 0x4:
|
||||
return AOT::DG2_G10_B0;
|
||||
case 0x8:
|
||||
return AOT::DG2_G10_C0;
|
||||
}
|
||||
} else if (DG2::isG11(hwInfo)) {
|
||||
switch (hwInfo.platform.usRevId) {
|
||||
case 0x0:
|
||||
return AOT::DG2_G11_A0;
|
||||
case 0x4:
|
||||
return AOT::DG2_G11_B0;
|
||||
case 0x5:
|
||||
return AOT::DG2_G11_B1;
|
||||
}
|
||||
} else if (DG2::isG12(hwInfo)) {
|
||||
return AOT::DG2_G12_A0;
|
||||
}
|
||||
return AOT::UNKNOWN_ISA;
|
||||
}
|
||||
} // namespace NEO
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
namespace NEO {
|
||||
template <>
|
||||
uint32_t ProductHelperHw<gfxProduct>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
||||
if (DG2::isG10(hwInfo)) {
|
||||
switch (hwInfo.platform.usRevId) {
|
||||
case 0x0:
|
||||
return AOT::DG2_G10_A0;
|
||||
case 0x1:
|
||||
return AOT::DG2_G10_A1;
|
||||
case 0x4:
|
||||
return AOT::DG2_G10_B0;
|
||||
case 0x8:
|
||||
return AOT::DG2_G10_C0;
|
||||
}
|
||||
} else if (DG2::isG11(hwInfo)) {
|
||||
switch (hwInfo.platform.usRevId) {
|
||||
case 0x0:
|
||||
return AOT::DG2_G11_A0;
|
||||
case 0x4:
|
||||
return AOT::DG2_G11_B0;
|
||||
case 0x5:
|
||||
return AOT::DG2_G11_B1;
|
||||
}
|
||||
} else if (DG2::isG12(hwInfo)) {
|
||||
return AOT::DG2_G12_A0;
|
||||
}
|
||||
return AOT::UNKNOWN_ISA;
|
||||
}
|
||||
} // namespace NEO
|
||||
@@ -10,7 +10,6 @@
|
||||
#include "shared/source/memory_manager/memory_manager.h"
|
||||
|
||||
#include "aubstream/product_family.h"
|
||||
#include "os_agnostic_product_helper_dg2_extra.inl"
|
||||
|
||||
namespace NEO {
|
||||
template <>
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/helpers/compiler_aot_config_mtl_and_later.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper.h"
|
||||
#include "shared/source/helpers/compiler_product_helper_base.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_enable_subgroup_local_block_io.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_mtl_and_later.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_tgllp_and_later.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_xe_hp_and_later.inl"
|
||||
#include "shared/source/xe_hpg_core/hw_cmds_mtl.h"
|
||||
|
||||
@@ -20,8 +20,6 @@
|
||||
#include "shared/source/os_interface/product_helper_xehp_and_later.inl"
|
||||
#include "shared/source/xe_hpg_core/hw_cmds_dg2.h"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
constexpr static auto gfxProduct = IGFX_DG2;
|
||||
|
||||
#include "shared/source/xe_hpg_core/dg2/os_agnostic_product_helper_dg2.inl"
|
||||
|
||||
@@ -10,12 +10,9 @@
|
||||
#include "shared/source/os_interface/product_helper.h"
|
||||
#include "shared/source/os_interface/product_helper.inl"
|
||||
#include "shared/source/os_interface/product_helper_dg2_and_later.inl"
|
||||
#include "shared/source/os_interface/product_helper_mtl_and_later.inl"
|
||||
#include "shared/source/os_interface/product_helper_xehp_and_later.inl"
|
||||
#include "shared/source/xe_hpg_core/hw_cmds_mtl.h"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
constexpr static auto gfxProduct = IGFX_METEORLAKE;
|
||||
|
||||
namespace NEO {
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "shared/source/memory_manager/allocation_type.h"
|
||||
|
||||
#include "aubstream/product_family.h"
|
||||
#include "platforms.h"
|
||||
|
||||
namespace NEO {
|
||||
template <>
|
||||
@@ -95,7 +96,7 @@ uint64_t ProductHelperHw<gfxProduct>::overridePatIndex(AllocationType allocation
|
||||
template <>
|
||||
int ProductHelperHw<gfxProduct>::getProductMaxPreferredSlmSize(const HardwareInfo &hwInfo, int preferredEnumValue) const {
|
||||
using PREFERRED_SLM_ALLOCATION_SIZE = typename XeHpgCoreFamily::INTERFACE_DESCRIPTOR_DATA::PREFERRED_SLM_ALLOCATION_SIZE;
|
||||
if (getProductConfigFromHwInfo(hwInfo) == AOT::MTL_M_A0 || getProductConfigFromHwInfo(hwInfo) == AOT::MTL_P_A0) {
|
||||
if (hwInfo.ipVersion.value == AOT::MTL_M_A0 || hwInfo.ipVersion.value == AOT::MTL_P_A0) {
|
||||
return static_cast<int>(PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_96K);
|
||||
} else {
|
||||
return preferredEnumValue;
|
||||
|
||||
@@ -15,8 +15,6 @@
|
||||
#include "shared/source/os_interface/product_helper_xehp_and_later.inl"
|
||||
#include "shared/source/xe_hpg_core/hw_cmds_dg2.h"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
constexpr static auto gfxProduct = IGFX_DG2;
|
||||
|
||||
#include "shared/source/xe_hpg_core/dg2/os_agnostic_product_helper_dg2.inl"
|
||||
|
||||
@@ -9,12 +9,9 @@
|
||||
#include "shared/source/os_interface/product_helper.h"
|
||||
#include "shared/source/os_interface/product_helper.inl"
|
||||
#include "shared/source/os_interface/product_helper_dg2_and_later.inl"
|
||||
#include "shared/source/os_interface/product_helper_mtl_and_later.inl"
|
||||
#include "shared/source/os_interface/product_helper_xehp_and_later.inl"
|
||||
#include "shared/source/xe_hpg_core/hw_cmds_mtl.h"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
constexpr static auto gfxProduct = IGFX_METEORLAKE;
|
||||
|
||||
#include "shared/source/xe_hpg_core/mtl/os_agnostic_product_helper_mtl.inl"
|
||||
|
||||
Reference in New Issue
Block a user