Refactoring the use of PVC device ids

Replacing the old device id implementation
& clearing PVC XT temporary.

Related-To: NEO-6742
Signed-off-by: Daria Hinz <daria.hinz@intel.com>
This commit is contained in:
Daria Hinz
2022-02-22 18:16:19 +00:00
committed by Compute-Runtime-Automation
parent b79d9a8e10
commit 452050ae40
27 changed files with 219 additions and 318 deletions

View File

@ -7,13 +7,14 @@
if(SUPPORT_XE_HPC_CORE)
set(HW_DEFINITIONS_XE_HPC_CORE
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}hw_cmds_pvc.cpp
${CMAKE_CURRENT_SOURCE_DIR}/definitions${BRANCH_DIR_SUFFIX}os_agnostic_hw_info_config_pvc_extra.inl
${CMAKE_CURRENT_SOURCE_DIR}/definitions${BRANCH_DIR_SUFFIX}device_ids_configs_pvc.h
${CMAKE_CURRENT_SOURCE_DIR}/definitions${BRANCH_DIR_SUFFIX}hw_cmds_pvc.inl
)
set(NEO_CORE_HELPERS
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/compiler_hw_info_config_pvc.inl
)
set_property(GLOBAL APPEND PROPERTY CORE_SRCS_GENX_ALL_BASE ${HW_DEFINITIONS_XE_HPC_CORE})
set_property(GLOBAL APPEND PROPERTY NEO_CORE_HELPERS ${HW_DEFINITIONS_XE_HPC_CORE})
add_subdirectories()
endif()

View File

@ -0,0 +1,21 @@
/*
* Copyright (C) 2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
template <>
bool HwInfoConfigHw<gfxProduct>::isComputeDispatchAllWalkerEnableInComputeWalkerRequired(const HardwareInfo &hwInfo) const {
return false;
}
template <>
bool HwInfoConfigHw<gfxProduct>::isThreadEuRatio16ForScratchRequired(const HardwareInfo &hwInfo) const {
return true;
}
template <>
bool HwInfoConfigHw<gfxProduct>::isComputeDispatchAllWalkerEnableInCfeStateRequired(const HardwareInfo &hwInfo) const {
return true;
}

View File

@ -6,6 +6,7 @@
*/
#pragma once
#include "shared/source/commands/bxml_generator_glue.h"
#include "shared/source/helpers/debug_helpers.h"
#include "shared/source/xe_hpc_core/hw_info.h"
@ -17,8 +18,8 @@
template <class T>
struct CmdParse;
namespace NEO {
namespace NEO {
struct XE_HPC_CORE {
#include "shared/source/generated/xe_hpc_core/hw_cmds_generated_xe_hpc_core.inl"
@ -29,9 +30,6 @@ struct XE_HPC_CORE {
static constexpr uint8_t pvcBaseDieRevMask = 0b111000; // [3:5]
static constexpr uint8_t pvcBaseDieA0Masked = 0; // [3:5] == 0
static constexpr uint32_t pvcSteppingBits = 0b111;
static constexpr uint32_t pvcXlDeviceId = 0x0BD0;
static constexpr uint32_t pvcXtDeviceIds[5] = {0x0BD5, 0x0BD6, 0x0BD7, 0x0BD8, 0x0BE1};
static constexpr uint32_t pvcXtTemporaryDeviceId = 0x0BE5;
static constexpr bool isUsingL3Control = false;
static constexpr bool isUsingMediaSamplerDopClockGate = false;

View File

@ -0,0 +1,21 @@
/*
* Copyright (C) 2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/xe_hpc_core/hw_cmds_pvc.h"
namespace NEO {
bool PVC::isXlA0(const HardwareInfo &hwInfo) {
auto revId = hwInfo.platform.usRevId & pvcSteppingBits;
return (revId < 0x3);
}
bool PVC::isAtMostXtA0(const HardwareInfo &hwInfo) {
auto revId = hwInfo.platform.usRevId & pvcSteppingBits;
return (revId <= 0x3);
}
} // namespace NEO

View File

@ -7,6 +7,9 @@
#pragma once
#include "shared/source/xe_hpc_core/hw_cmds_base.h"
#include "device_ids_configs_pvc.h"
namespace NEO {
struct PVC : public XE_HPC_COREFamily {
@ -28,7 +31,22 @@ struct PVC : public XE_HPC_COREFamily {
static void adjustHardwareInfo(HardwareInfo *hwInfo);
static bool isXlA0(const HardwareInfo &hwInfo);
static bool isAtMostXtA0(const HardwareInfo &hwInfo);
static bool isXtTemporary(const HardwareInfo &hwInfo);
static bool isXl(const HardwareInfo &hwInfo) {
auto it = std::find(PVC_XL_IDS.begin(), PVC_XL_IDS.end(), hwInfo.platform.usDeviceID);
if (it != PVC_XL_IDS.end()) {
return true;
}
return false;
}
static bool isXt(const HardwareInfo &hwInfo) {
auto it = std::find(PVC_XT_IDS.begin(), PVC_XT_IDS.end(), hwInfo.platform.usDeviceID);
if (it != PVC_XT_IDS.end()) {
return true;
}
return false;
}
};
class PVC_CONFIG : public PVC {

View File

@ -415,7 +415,7 @@ uint32_t HwHelperHw<Family>::getComputeUnitsUsedForScratch(const HardwareInfo *p
const auto &hwInfoConfig = *HwInfoConfig::get(pHwInfo->platform.eProductFamily);
auto revId = pHwInfo->platform.usRevId & Family::pvcSteppingBits;
uint32_t threadEuRatio = ((0x3 <= revId) && hwInfoConfig.isThreaEuRatio16ForScratchRequired(*pHwInfo)) ? 16 : 8;
uint32_t threadEuRatio = ((0x3 <= revId) && hwInfoConfig.isThreadEuRatio16ForScratchRequired(*pHwInfo)) ? 16 : 8;
return pHwInfo->gtSystemInfo.MaxSubSlicesSupported * pHwInfo->gtSystemInfo.MaxEuPerSubSlice * threadEuRatio;
}

View File

@ -140,20 +140,6 @@ void PVC::adjustHardwareInfo(HardwareInfo *hwInfo) {
hwInfo->capabilityTable.sharedSystemMemCapabilities = (UNIFIED_SHARED_MEMORY_ACCESS | UNIFIED_SHARED_MEMORY_CONCURRENT_ACCESS | UNIFIED_SHARED_MEMORY_CONCURRENT_ATOMIC_ACCESS);
}
bool PVC::isXlA0(const HardwareInfo &hwInfo) {
auto revId = hwInfo.platform.usRevId & pvcSteppingBits;
return (revId < 0x3) && !isXtTemporary(hwInfo);
}
bool PVC::isAtMostXtA0(const HardwareInfo &hwInfo) {
auto revId = hwInfo.platform.usRevId & pvcSteppingBits;
return (revId <= 0x3) && !isXtTemporary(hwInfo);
}
bool PVC::isXtTemporary(const HardwareInfo &hwInfo) {
return (hwInfo.platform.usDeviceID == pvcXtTemporaryDeviceId);
}
void PVC::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, bool setupMultiTile) {
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * PVC::threadsPerEu;

View File

@ -28,6 +28,8 @@ const std::map<std::string, std::pair<uint32_t, uint32_t>> guidUuidOffsetMap = {
#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 "os_agnostic_hw_info_config_pvc_extra.inl"
template <>
int HwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
enableCompression(hwInfo);

View File

@ -14,16 +14,21 @@ void HwInfoConfigHw<gfxProduct>::getKernelExtendedProperties(uint32_t *fp16, uin
template <>
bool HwInfoConfigHw<gfxProduct>::isMaxThreadsForWorkgroupWARequired(const HardwareInfo &hwInfo) const {
auto deviceId = hwInfo.platform.usDeviceID;
return XE_HPC_COREFamily::pvcXlDeviceId == deviceId;
return PVC::isXl(hwInfo);
}
template <>
uint32_t HwInfoConfigHw<gfxProduct>::getHwRevIdFromStepping(uint32_t stepping, const HardwareInfo &hwInfo) const {
switch (hwInfo.platform.usDeviceID) {
default:
case XE_HPC_COREFamily::pvcXtTemporaryDeviceId:
case XE_HPC_COREFamily::pvcXlDeviceId:
if (PVC::isXt(hwInfo)) {
switch (stepping) {
case REVISION_A0:
return 0x3;
case REVISION_B:
return 0x9D;
case REVISION_C:
return 0x7;
}
} else {
switch (stepping) {
case REVISION_A0:
return 0x0;
@ -33,19 +38,8 @@ uint32_t HwInfoConfigHw<gfxProduct>::getHwRevIdFromStepping(uint32_t stepping, c
DEBUG_BREAK_IF(true);
return 0x7;
}
break;
case XE_HPC_COREFamily::pvcXtDeviceIds[0]:
case XE_HPC_COREFamily::pvcXtDeviceIds[1]:
case XE_HPC_COREFamily::pvcXtDeviceIds[2]:
switch (stepping) {
case REVISION_A0:
return 0x3;
case REVISION_B:
return 0x9D;
case REVISION_C:
return 0x7;
}
}
return CommonConstants::invalidStepping;
}
@ -137,11 +131,6 @@ bool HwInfoConfigHw<gfxProduct>::isGlobalFenceAsPostSyncOperationInComputeWalker
return !PVC::isXlA0(hwInfo);
}
template <>
bool HwInfoConfigHw<gfxProduct>::isComputeDispatchAllWalkerEnableInComputeWalkerRequired(const HardwareInfo &hwInfo) const {
return PVC::isXtTemporary(hwInfo);
}
template <>
bool HwInfoConfigHw<gfxProduct>::isGlobalFenceAsMiMemFenceCommandInCommandStreamRequired(const HardwareInfo &hwInfo) const {
return !PVC::isXlA0(hwInfo);
@ -151,13 +140,3 @@ template <>
bool HwInfoConfigHw<gfxProduct>::isAdjustProgrammableIdPreferredSlmSizeRequired(const HardwareInfo &hwInfo) const {
return PVC::isXlA0(hwInfo);
}
template <>
bool HwInfoConfigHw<gfxProduct>::isThreaEuRatio16ForScratchRequired(const HardwareInfo &hwInfo) const {
return !PVC::isXtTemporary(hwInfo);
}
template <>
bool HwInfoConfigHw<gfxProduct>::isComputeDispatchAllWalkerEnableInCfeStateRequired(const HardwareInfo &hwInfo) const {
return !PVC::isXtTemporary(hwInfo);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2021 Intel Corporation
* Copyright (C) 2021-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -18,6 +18,8 @@ constexpr static auto gfxProduct = IGFX_PVC;
#include "shared/source/xe_hpc_core/os_agnostic_hw_info_config_pvc.inl"
#include "os_agnostic_hw_info_config_pvc_extra.inl"
template <>
int HwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
enableCompression(hwInfo);