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:
Mateusz Jablonski
2023-04-18 08:54:04 +00:00
committed by Compute-Runtime-Automation
parent dd575008bc
commit c544004b8e
125 changed files with 456 additions and 479 deletions

View File

@@ -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()

View File

@@ -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) {

View File

@@ -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

View File

@@ -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)) {

View File

@@ -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;

View File

@@ -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

View File

@@ -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