mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 21:18:24 +08:00
Delete redundant adjustHwInfoForIgc method
Signed-off-by: Rafal Maziejuk <rafal.maziejuk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
abb366e3c0
commit
67ebc5d7fe
@@ -95,7 +95,6 @@ struct Device : _ze_device_handle_t {
|
||||
virtual const NEO::GfxCoreHelper &getGfxCoreHelper() = 0;
|
||||
virtual const L0GfxCoreHelper &getL0GfxCoreHelper() = 0;
|
||||
virtual const NEO::ProductHelper &getProductHelper() = 0;
|
||||
virtual const NEO::CompilerProductHelper &getCompilerProductHelper() = 0;
|
||||
|
||||
bool isImplicitScalingCapable() const {
|
||||
return implicitScalingCapable;
|
||||
|
||||
@@ -1058,10 +1058,6 @@ const NEO::ProductHelper &DeviceImp::getProductHelper() {
|
||||
return this->neoDevice->getProductHelper();
|
||||
}
|
||||
|
||||
const NEO::CompilerProductHelper &DeviceImp::getCompilerProductHelper() {
|
||||
return this->neoDevice->getCompilerProductHelper();
|
||||
}
|
||||
|
||||
NEO::OSInterface &DeviceImp::getOsInterface() { return *neoDevice->getRootDeviceEnvironment().osInterface; }
|
||||
|
||||
uint32_t DeviceImp::getPlatformInfo() const {
|
||||
|
||||
@@ -74,7 +74,6 @@ struct DeviceImp : public Device {
|
||||
const NEO::GfxCoreHelper &getGfxCoreHelper() override;
|
||||
const L0GfxCoreHelper &getL0GfxCoreHelper() override;
|
||||
const NEO::ProductHelper &getProductHelper() override;
|
||||
const NEO::CompilerProductHelper &getCompilerProductHelper() override;
|
||||
const NEO::HardwareInfo &getHwInfo() const override;
|
||||
NEO::OSInterface &getOsInterface() override;
|
||||
uint32_t getPlatformInfo() const override;
|
||||
|
||||
@@ -60,7 +60,6 @@ struct Mock<Device> : public Device {
|
||||
ADDMETHOD_NOBASE_REFRETURN(getGfxCoreHelper, NEO::GfxCoreHelper &, ());
|
||||
ADDMETHOD_NOBASE_REFRETURN(getL0GfxCoreHelper, L0GfxCoreHelper &, ());
|
||||
ADDMETHOD_NOBASE_REFRETURN(getProductHelper, NEO::ProductHelper &, ());
|
||||
ADDMETHOD_NOBASE_REFRETURN(getCompilerProductHelper, NEO::CompilerProductHelper &, ());
|
||||
ADDMETHOD_NOBASE(getBuiltinFunctionsLib, BuiltinFunctionsLib *, nullptr, ());
|
||||
ADDMETHOD_CONST_NOBASE(getMaxNumHwThreads, uint32_t, 16u, ());
|
||||
ADDMETHOD_NOBASE(activateMetricGroupsDeferred, ze_result_t, ZE_RESULT_SUCCESS, (uint32_t count, zet_metric_group_handle_t *phMetricGroups));
|
||||
|
||||
@@ -2263,18 +2263,14 @@ HWTEST_F(ModuleTranslationUnitTest, GivenRebuildFlagWhenCreatingModuleFromNative
|
||||
HWTEST_F(ModuleTranslationUnitTest, WhenCreatingFromNativeBinaryThenSetsUpRequiredTargetProductProperly) {
|
||||
ZebinTestData::ValidEmptyProgram emptyProgram;
|
||||
|
||||
auto copyHwInfo = device->getNEODevice()->getHardwareInfo();
|
||||
auto &compilerProductHelper = device->getCompilerProductHelper();
|
||||
const auto &hwInfo = device->getNEODevice()->getHardwareInfo();
|
||||
|
||||
compilerProductHelper.adjustHwInfoForIgc(copyHwInfo);
|
||||
|
||||
emptyProgram.elfHeader->machine = copyHwInfo.platform.eProductFamily;
|
||||
emptyProgram.elfHeader->machine = hwInfo.platform.eProductFamily;
|
||||
L0::ModuleTranslationUnit moduleTuValid(this->device);
|
||||
ze_result_t result = ZE_RESULT_ERROR_MODULE_BUILD_FAILURE;
|
||||
result = moduleTuValid.createFromNativeBinary(reinterpret_cast<const char *>(emptyProgram.storage.data()), emptyProgram.storage.size());
|
||||
EXPECT_EQ(result, ZE_RESULT_SUCCESS);
|
||||
|
||||
emptyProgram.elfHeader->machine = copyHwInfo.platform.eProductFamily;
|
||||
++emptyProgram.elfHeader->machine;
|
||||
L0::ModuleTranslationUnit moduleTuInvalid(this->device);
|
||||
result = moduleTuInvalid.createFromNativeBinary(reinterpret_cast<const char *>(emptyProgram.storage.data()), emptyProgram.storage.size());
|
||||
@@ -2316,12 +2312,9 @@ HWTEST_F(ModuleTranslationUnitTest, WhenCreatingFromNativeBinaryThenSetsUpPacked
|
||||
HWTEST_F(ModuleTranslationUnitTest, WhenCreatingFromZebinThenAppendAllowZebinFlagToBuildOptions) {
|
||||
ZebinTestData::ValidEmptyProgram zebin;
|
||||
|
||||
auto copyHwInfo = device->getNEODevice()->getHardwareInfo();
|
||||
auto &compilerProductHelper = device->getCompilerProductHelper();
|
||||
const auto &hwInfo = device->getNEODevice()->getHardwareInfo();
|
||||
|
||||
compilerProductHelper.adjustHwInfoForIgc(copyHwInfo);
|
||||
|
||||
zebin.elfHeader->machine = copyHwInfo.platform.eProductFamily;
|
||||
zebin.elfHeader->machine = hwInfo.platform.eProductFamily;
|
||||
L0::ModuleTranslationUnit moduleTu(this->device);
|
||||
ze_result_t result = ZE_RESULT_ERROR_MODULE_BUILD_FAILURE;
|
||||
result = moduleTu.createFromNativeBinary(reinterpret_cast<const char *>(zebin.storage.data()), zebin.storage.size());
|
||||
@@ -3637,12 +3630,9 @@ TEST_F(ModuleWithZebinTest, givenNonZebinaryFormatWhenGettingDebugInfoThenDebugZ
|
||||
HWTEST_F(ModuleWithZebinTest, givenZebinWithKernelCallingExternalFunctionThenUpdateKernelsBarrierCount) {
|
||||
ZebinTestData::ZebinWithExternalFunctionsInfo zebin;
|
||||
|
||||
auto copyHwInfo = device->getHwInfo();
|
||||
auto &compilerProductHelper = device->getCompilerProductHelper();
|
||||
const auto &hwInfo = device->getNEODevice()->getHardwareInfo();
|
||||
|
||||
compilerProductHelper.adjustHwInfoForIgc(copyHwInfo);
|
||||
|
||||
zebin.setProductFamily(static_cast<uint16_t>(copyHwInfo.platform.eProductFamily));
|
||||
zebin.setProductFamily(static_cast<uint16_t>(hwInfo.platform.eProductFamily));
|
||||
|
||||
ze_module_desc_t moduleDesc = {};
|
||||
moduleDesc.format = ZE_MODULE_FORMAT_NATIVE;
|
||||
|
||||
@@ -1979,15 +1979,7 @@ TEST_F(ProgramTests, whenCreatingFromZebinThenAppendAllowZebinFlagToBuildOptions
|
||||
}
|
||||
|
||||
ZebinTestData::ValidEmptyProgram zebin;
|
||||
|
||||
auto copyHwInfo = *defaultHwInfo;
|
||||
MockExecutionEnvironment mockExecutionEnvironment{};
|
||||
|
||||
auto &compilerProductHelper = mockExecutionEnvironment.rootDeviceEnvironments[0]->getHelper<CompilerProductHelper>();
|
||||
|
||||
compilerProductHelper.adjustHwInfoForIgc(copyHwInfo);
|
||||
|
||||
zebin.elfHeader->machine = copyHwInfo.platform.eProductFamily;
|
||||
zebin.elfHeader->machine = defaultHwInfo->platform.eProductFamily;
|
||||
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr, mockRootDeviceIndex));
|
||||
auto program = std::make_unique<MockProgram>(toClDeviceVector(*device));
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2022 Intel Corporation
|
||||
* Copyright (C) 2022-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -82,13 +82,8 @@ int OclocIgcFacade::initialize(const HardwareInfo &hwInfo) {
|
||||
|
||||
const auto compilerProductHelper = CompilerProductHelper::get(hwInfo.platform.eProductFamily);
|
||||
|
||||
auto copyHwInfo = hwInfo;
|
||||
if (compilerProductHelper) {
|
||||
compilerProductHelper->adjustHwInfoForIgc(copyHwInfo);
|
||||
}
|
||||
|
||||
populateIgcPlatform(*igcPlatform, copyHwInfo);
|
||||
IGC::GtSysInfoHelper::PopulateInterfaceWith(*igcGtSystemInfo.get(), copyHwInfo.gtSystemInfo);
|
||||
populateIgcPlatform(*igcPlatform, hwInfo);
|
||||
IGC::GtSysInfoHelper::PopulateInterfaceWith(*igcGtSystemInfo.get(), hwInfo.gtSystemInfo);
|
||||
|
||||
populateWithFeatures(igcFtrWa.get(), hwInfo, compilerProductHelper);
|
||||
|
||||
|
||||
@@ -26,8 +26,6 @@ TargetDevice getTargetDevice(const RootDeviceEnvironment &rootDeviceEnvironment)
|
||||
auto hwInfo = *rootDeviceEnvironment.getHardwareInfo();
|
||||
auto &productHelper = rootDeviceEnvironment.getHelper<ProductHelper>();
|
||||
auto &gfxCoreHelper = rootDeviceEnvironment.getHelper<GfxCoreHelper>();
|
||||
auto &compilerProductHelper = rootDeviceEnvironment.getHelper<CompilerProductHelper>();
|
||||
compilerProductHelper.adjustHwInfoForIgc(hwInfo);
|
||||
TargetDevice targetDevice = {};
|
||||
|
||||
targetDevice.coreFamily = hwInfo.platform.eRenderCoreFamily;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2022 Intel Corporation
|
||||
* Copyright (C) 2021-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -30,7 +30,6 @@ class CompilerProductHelper {
|
||||
virtual bool isForceToStatelessRequired() const = 0;
|
||||
virtual void setProductConfigForHwInfo(HardwareInfo &hwInfo, HardwareIpVersion config) const = 0;
|
||||
virtual const char *getCachingPolicyOptions(bool isDebuggerActive) const = 0;
|
||||
virtual void adjustHwInfoForIgc(HardwareInfo &hwInfo) const = 0;
|
||||
};
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
@@ -47,7 +46,6 @@ class CompilerProductHelperHw : public CompilerProductHelper {
|
||||
bool isForceToStatelessRequired() const override;
|
||||
void setProductConfigForHwInfo(HardwareInfo &hwInfo, HardwareIpVersion config) const override;
|
||||
const char *getCachingPolicyOptions(bool isDebuggerActive) const override;
|
||||
void adjustHwInfoForIgc(HardwareInfo &hwInfo) const override;
|
||||
|
||||
protected:
|
||||
CompilerProductHelperHw() = default;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2022 Intel Corporation
|
||||
* Copyright (C) 2021-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -27,7 +27,4 @@ const char *CompilerProductHelperHw<gfxProduct>::getCachingPolicyOptions(bool is
|
||||
return L1CachePolicyHelper<gfxProduct>::getCachingPolicyOptions(isDebuggerActive);
|
||||
}
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
void CompilerProductHelperHw<gfxProduct>::adjustHwInfoForIgc(HardwareInfo &hwInfo) const {}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -187,12 +187,7 @@ ZebinWithL0TestCommonModule::ZebinWithL0TestCommonModule(const NEO::HardwareInfo
|
||||
if (forceRecompilation) {
|
||||
elfHeader.machine = NEO::Elf::EM_NONE;
|
||||
} else {
|
||||
auto compilerProductHelper = NEO::CompilerProductHelper::get(hwInfo.platform.eProductFamily);
|
||||
auto copyHwInfo = hwInfo;
|
||||
|
||||
compilerProductHelper->adjustHwInfoForIgc(copyHwInfo);
|
||||
|
||||
elfHeader.machine = copyHwInfo.platform.eProductFamily;
|
||||
elfHeader.machine = hwInfo.platform.eProductFamily;
|
||||
}
|
||||
|
||||
const uint8_t testKernelData[0xac0] = {0u};
|
||||
@@ -242,12 +237,7 @@ ZebinCopyBufferSimdModule<numBits>::ZebinCopyBufferSimdModule(const NEO::Hardwar
|
||||
auto &elfHeader = elfEncoder.getElfFileHeader();
|
||||
elfHeader.type = NEO::Elf::ET_ZEBIN_EXE;
|
||||
|
||||
auto compilerProductHelper = NEO::CompilerProductHelper::get(hwInfo.platform.eProductFamily);
|
||||
auto copyHwInfo = hwInfo;
|
||||
|
||||
compilerProductHelper->adjustHwInfoForIgc(copyHwInfo);
|
||||
|
||||
elfHeader.machine = copyHwInfo.platform.eProductFamily;
|
||||
elfHeader.machine = hwInfo.platform.eProductFamily;
|
||||
|
||||
const uint8_t testKernelData[0x2c0] = {0u};
|
||||
|
||||
|
||||
@@ -69,9 +69,6 @@ TEST(ZebinValidateTargetTest, givenTargetDeviceCreatedUsingHelperFunctionWhenVal
|
||||
MockExecutionEnvironment executionEnvironment;
|
||||
auto &rootDeviceEnvironment = *executionEnvironment.rootDeviceEnvironments[0];
|
||||
auto hwInfo = *rootDeviceEnvironment.getHardwareInfo();
|
||||
auto &compilerProductHelper = rootDeviceEnvironment.getHelper<CompilerProductHelper>();
|
||||
compilerProductHelper.adjustHwInfoForIgc(hwInfo);
|
||||
|
||||
auto targetDevice = getTargetDevice(rootDeviceEnvironment);
|
||||
|
||||
EXPECT_TRUE(validateTargetDevice(targetDevice, Elf::EI_CLASS_32, hwInfo.platform.eProductFamily, hwInfo.platform.eRenderCoreFamily, AOT::UNKNOWN_ISA, {}));
|
||||
|
||||
@@ -25,16 +25,6 @@ HWTEST_F(CompilerProductHelperFixture, WhenIsMidThreadPreemptionIsSupportedIsCal
|
||||
EXPECT_TRUE(compilerProductHelper.isMidThreadPreemptionSupported(hwInfo));
|
||||
}
|
||||
|
||||
HWTEST_F(CompilerProductHelperFixture, WhenAdjustHwInfoForIgcIsCalledThenHwInfoNotChanged) {
|
||||
auto &hwInfo = *pDevice->getRootDeviceEnvironment().getMutableHardwareInfo();
|
||||
auto adjustedHwInfo = hwInfo;
|
||||
auto &compilerProductHelper = pDevice->getCompilerProductHelper();
|
||||
|
||||
compilerProductHelper.adjustHwInfoForIgc(adjustedHwInfo);
|
||||
|
||||
EXPECT_EQ(hwInfo.platform.eProductFamily, adjustedHwInfo.platform.eProductFamily);
|
||||
}
|
||||
|
||||
using IsBeforeXeHpc = IsBeforeGfxCore<IGFX_XE_HPC_CORE>;
|
||||
|
||||
HWTEST2_F(CompilerProductHelperFixture, GivenProductBeforeXeHpcWhenIsForceToStatelessRequiredThenFalseIsReturned, IsBeforeXeHpc) {
|
||||
|
||||
Reference in New Issue
Block a user