mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 12:23:05 +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
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user