Improve hwInfoConfig xe_hpc_core helper
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com> Related-To: NEO-6738
This commit is contained in:
parent
8a8b4866cb
commit
ea3eb2ea23
|
@ -22,11 +22,12 @@
|
|||
namespace NEO {
|
||||
constexpr static auto gfxProduct = IGFX_PVC;
|
||||
const std::map<std::string, std::pair<uint32_t, uint32_t>> guidUuidOffsetMap = {
|
||||
//add new values for guid in the form of {"guid", {offset, size}} for each platform
|
||||
// add new values for guid in the form of {"guid", {offset, size}} for each platform
|
||||
{"0x0", {0x0, 0}}};
|
||||
|
||||
#include "shared/source/os_interface/linux/hw_info_config_uuid_xehp_and_later.inl"
|
||||
#include "shared/source/xe_hpc_core/os_agnostic_hw_info_config_pvc.inl"
|
||||
#include "shared/source/xe_hpc_core/os_agnostic_hw_info_config_xe_hpc_core.inl"
|
||||
|
||||
#include "os_agnostic_hw_info_config_pvc_extra.inl"
|
||||
|
||||
|
|
|
@ -5,13 +5,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
template <>
|
||||
void HwInfoConfigHw<gfxProduct>::getKernelExtendedProperties(uint32_t *fp16, uint32_t *fp32, uint32_t *fp64) {
|
||||
*fp16 = (FP_ATOMIC_EXT_FLAG_GLOBAL_LOAD_STORE | FP_ATOMIC_EXT_FLAG_GLOBAL_ADD | FP_ATOMIC_EXT_FLAG_GLOBAL_MIN_MAX);
|
||||
*fp32 = (FP_ATOMIC_EXT_FLAG_GLOBAL_LOAD_STORE | FP_ATOMIC_EXT_FLAG_GLOBAL_ADD | FP_ATOMIC_EXT_FLAG_GLOBAL_MIN_MAX);
|
||||
*fp64 = (FP_ATOMIC_EXT_FLAG_GLOBAL_LOAD_STORE | FP_ATOMIC_EXT_FLAG_GLOBAL_ADD | FP_ATOMIC_EXT_FLAG_GLOBAL_MIN_MAX);
|
||||
}
|
||||
|
||||
template <>
|
||||
bool HwInfoConfigHw<gfxProduct>::isMaxThreadsForWorkgroupWARequired(const HardwareInfo &hwInfo) const {
|
||||
return PVC::isXl(hwInfo);
|
||||
|
@ -59,16 +52,6 @@ uint32_t HwInfoConfigHw<gfxProduct>::getSteppingFromHwRevId(const HardwareInfo &
|
|||
return CommonConstants::invalidStepping;
|
||||
}
|
||||
|
||||
template <>
|
||||
void HwInfoConfigHw<gfxProduct>::adjustSamplerState(void *sampler, const HardwareInfo &hwInfo) {
|
||||
using SAMPLER_STATE = typename XE_HPC_COREFamily::SAMPLER_STATE;
|
||||
|
||||
auto samplerState = reinterpret_cast<SAMPLER_STATE *>(sampler);
|
||||
if (DebugManager.flags.ForceSamplerLowFilteringPrecision.get()) {
|
||||
samplerState->setLowQualityFilter(SAMPLER_STATE::LOW_QUALITY_FILTER_ENABLE);
|
||||
}
|
||||
}
|
||||
|
||||
template <>
|
||||
uint32_t HwInfoConfigHw<gfxProduct>::getDeviceMemoryMaxClkRate(const HardwareInfo *hwInfo) {
|
||||
bool isBaseDieA0 = (hwInfo->platform.usRevId & XE_HPC_COREFamily::pvcBaseDieRevMask) == XE_HPC_COREFamily::pvcBaseDieA0Masked;
|
||||
|
@ -79,43 +62,11 @@ uint32_t HwInfoConfigHw<gfxProduct>::getDeviceMemoryMaxClkRate(const HardwareInf
|
|||
return 0u;
|
||||
}
|
||||
|
||||
template <>
|
||||
bool HwInfoConfigHw<gfxProduct>::isDirectSubmissionSupported(const HardwareInfo &hwInfo) const {
|
||||
return true;
|
||||
}
|
||||
|
||||
template <>
|
||||
std::string HwInfoConfigHw<gfxProduct>::getDeviceMemoryName() const {
|
||||
return "HBM";
|
||||
}
|
||||
|
||||
template <>
|
||||
bool HwInfoConfigHw<gfxProduct>::isDisableOverdispatchAvailable(const HardwareInfo &hwInfo) const {
|
||||
return getSteppingFromHwRevId(hwInfo) >= REVISION_B;
|
||||
}
|
||||
|
||||
template <>
|
||||
std::pair<bool, bool> HwInfoConfigHw<gfxProduct>::isPipeControlPriorToNonPipelinedStateCommandsWARequired(const HardwareInfo &hwInfo, bool isRcs) const {
|
||||
auto isBasicWARequired = true;
|
||||
auto isExtendedWARequired = hwInfo.gtSystemInfo.CCSInfo.NumberOfCCSEnabled > 1;
|
||||
|
||||
if (DebugManager.flags.ProgramExtendedPipeControlPriorToNonPipelinedStateCommand.get() != -1) {
|
||||
isExtendedWARequired = DebugManager.flags.ProgramExtendedPipeControlPriorToNonPipelinedStateCommand.get();
|
||||
}
|
||||
|
||||
return {isBasicWARequired, isExtendedWARequired};
|
||||
}
|
||||
|
||||
template <>
|
||||
bool HwInfoConfigHw<gfxProduct>::isDcFlushAllowed() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
template <>
|
||||
bool HwInfoConfigHw<gfxProduct>::isFlushTaskAllowed() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
template <>
|
||||
bool HwInfoConfigHw<gfxProduct>::isSpecialPipelineSelectModeChanged(const HardwareInfo &hwInfo) const {
|
||||
return PVC::isAtMostXtA0(hwInfo);
|
||||
|
|
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
* Copyright (C) 2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
template <>
|
||||
std::string HwInfoConfigHw<gfxProduct>::getDeviceMemoryName() const {
|
||||
return "HBM";
|
||||
}
|
||||
|
||||
template <>
|
||||
bool HwInfoConfigHw<gfxProduct>::isDirectSubmissionSupported(const HardwareInfo &hwInfo) const {
|
||||
return true;
|
||||
}
|
||||
|
||||
template <>
|
||||
bool HwInfoConfigHw<gfxProduct>::isDcFlushAllowed() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
template <>
|
||||
bool HwInfoConfigHw<gfxProduct>::isFlushTaskAllowed() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
template <>
|
||||
std::pair<bool, bool> HwInfoConfigHw<gfxProduct>::isPipeControlPriorToNonPipelinedStateCommandsWARequired(const HardwareInfo &hwInfo, bool isRcs) const {
|
||||
auto isBasicWARequired = true;
|
||||
auto isExtendedWARequired = hwInfo.gtSystemInfo.CCSInfo.NumberOfCCSEnabled > 1;
|
||||
|
||||
if (DebugManager.flags.ProgramExtendedPipeControlPriorToNonPipelinedStateCommand.get() != -1) {
|
||||
isExtendedWARequired = DebugManager.flags.ProgramExtendedPipeControlPriorToNonPipelinedStateCommand.get();
|
||||
}
|
||||
|
||||
return {isBasicWARequired, isExtendedWARequired};
|
||||
}
|
||||
|
||||
template <>
|
||||
void HwInfoConfigHw<gfxProduct>::adjustSamplerState(void *sampler, const HardwareInfo &hwInfo) {
|
||||
using SAMPLER_STATE = typename XE_HPC_COREFamily::SAMPLER_STATE;
|
||||
|
||||
auto samplerState = reinterpret_cast<SAMPLER_STATE *>(sampler);
|
||||
if (DebugManager.flags.ForceSamplerLowFilteringPrecision.get()) {
|
||||
samplerState->setLowQualityFilter(SAMPLER_STATE::LOW_QUALITY_FILTER_ENABLE);
|
||||
}
|
||||
}
|
||||
|
||||
template <>
|
||||
void HwInfoConfigHw<gfxProduct>::getKernelExtendedProperties(uint32_t *fp16, uint32_t *fp32, uint32_t *fp64) {
|
||||
*fp16 = (FP_ATOMIC_EXT_FLAG_GLOBAL_LOAD_STORE | FP_ATOMIC_EXT_FLAG_GLOBAL_ADD | FP_ATOMIC_EXT_FLAG_GLOBAL_MIN_MAX);
|
||||
*fp32 = (FP_ATOMIC_EXT_FLAG_GLOBAL_LOAD_STORE | FP_ATOMIC_EXT_FLAG_GLOBAL_ADD | FP_ATOMIC_EXT_FLAG_GLOBAL_MIN_MAX);
|
||||
*fp64 = (FP_ATOMIC_EXT_FLAG_GLOBAL_LOAD_STORE | FP_ATOMIC_EXT_FLAG_GLOBAL_ADD | FP_ATOMIC_EXT_FLAG_GLOBAL_MIN_MAX);
|
||||
}
|
|
@ -17,6 +17,7 @@ namespace NEO {
|
|||
constexpr static auto gfxProduct = IGFX_PVC;
|
||||
|
||||
#include "shared/source/xe_hpc_core/os_agnostic_hw_info_config_pvc.inl"
|
||||
#include "shared/source/xe_hpc_core/os_agnostic_hw_info_config_xe_hpc_core.inl"
|
||||
|
||||
#include "os_agnostic_hw_info_config_pvc_extra.inl"
|
||||
|
||||
|
|
Loading…
Reference in New Issue