diff --git a/level_zero/core/source/module/module_imp.cpp b/level_zero/core/source/module/module_imp.cpp index ad0b5919f6..392647f54e 100644 --- a/level_zero/core/source/module/module_imp.cpp +++ b/level_zero/core/source/module/module_imp.cpp @@ -115,14 +115,9 @@ bool ModuleTranslationUnit::createFromNativeBinary(const char *input, size_t inp auto productAbbreviation = NEO::hardwarePrefix[device->getNEODevice()->getHardwareInfo().platform.eProductFamily]; NEO::TargetDevice targetDevice = {}; - - auto copyHwInfo = device->getNEODevice()->getHardwareInfo(); - auto &hwHelper = NEO::HwHelper::get(copyHwInfo.platform.eRenderCoreFamily); - hwHelper.adjustPlatformCoreFamilyForIgc(copyHwInfo); - - targetDevice.coreFamily = copyHwInfo.platform.eRenderCoreFamily; - targetDevice.productFamily = copyHwInfo.platform.eProductFamily; - targetDevice.stepping = copyHwInfo.platform.usRevId; + targetDevice.coreFamily = device->getNEODevice()->getHardwareInfo().platform.eRenderCoreFamily; + targetDevice.productFamily = device->getNEODevice()->getHardwareInfo().platform.eProductFamily; + targetDevice.stepping = device->getNEODevice()->getHardwareInfo().platform.usRevId; targetDevice.maxPointerSizeInBytes = sizeof(uintptr_t); std::string decodeErrors; std::string decodeWarnings; diff --git a/level_zero/core/test/unit_tests/sources/module/test_module.cpp b/level_zero/core/test/unit_tests/sources/module/test_module.cpp index 361562e82d..05ca7fe3c7 100644 --- a/level_zero/core/test/unit_tests/sources/module/test_module.cpp +++ b/level_zero/core/test/unit_tests/sources/module/test_module.cpp @@ -382,17 +382,14 @@ using ModuleTranslationUnitTest = Test; HWTEST_F(ModuleTranslationUnitTest, WhenCreatingFromNativeBinaryThenSetsUpRequiredTargetProductProperly) { ZebinTestData::ValidEmptyProgram emptyProgram; + auto hwInfo = device->getNEODevice()->getHardwareInfo(); - auto copyHwInfo = device->getNEODevice()->getHardwareInfo(); - auto &hwHelper = NEO::HwHelper::get(copyHwInfo.platform.eRenderCoreFamily); - hwHelper.adjustPlatformCoreFamilyForIgc(copyHwInfo); - - emptyProgram.elfHeader->machine = copyHwInfo.platform.eProductFamily; + emptyProgram.elfHeader->machine = hwInfo.platform.eProductFamily; L0::ModuleTranslationUnit moduleTuValid(this->device); bool success = moduleTuValid.createFromNativeBinary(reinterpret_cast(emptyProgram.storage.data()), emptyProgram.storage.size()); EXPECT_TRUE(success); - emptyProgram.elfHeader->machine = copyHwInfo.platform.eProductFamily; + emptyProgram.elfHeader->machine = hwInfo.platform.eProductFamily; ++emptyProgram.elfHeader->machine; L0::ModuleTranslationUnit moduleTuInvalid(this->device); success = moduleTuInvalid.createFromNativeBinary(reinterpret_cast(emptyProgram.storage.data()), emptyProgram.storage.size()); diff --git a/opencl/source/program/program.cpp b/opencl/source/program/program.cpp index 6a28d831c4..8a8e2fd8f4 100644 --- a/opencl/source/program/program.cpp +++ b/opencl/source/program/program.cpp @@ -170,13 +170,8 @@ cl_int Program::createProgramFromBinary( auto productAbbreviation = hardwarePrefix[pDevice->getHardwareInfo().platform.eProductFamily]; TargetDevice targetDevice = {}; - - auto copyHwInfo = pDevice->getHardwareInfo(); - auto &hwHelper = HwHelper::get(copyHwInfo.platform.eRenderCoreFamily); - hwHelper.adjustPlatformCoreFamilyForIgc(copyHwInfo); - targetDevice.coreFamily = copyHwInfo.platform.eRenderCoreFamily; - - targetDevice.stepping = copyHwInfo.platform.usRevId; + targetDevice.coreFamily = pDevice->getHardwareInfo().platform.eRenderCoreFamily; + targetDevice.stepping = pDevice->getHardwareInfo().platform.usRevId; targetDevice.maxPointerSizeInBytes = sizeof(uintptr_t); std::string decodeErrors; std::string decodeWarnings; diff --git a/opencl/test/unit_test/program/process_elf_binary_tests.cpp b/opencl/test/unit_test/program/process_elf_binary_tests.cpp index 10d1c86bd2..ddeafafc9c 100644 --- a/opencl/test/unit_test/program/process_elf_binary_tests.cpp +++ b/opencl/test/unit_test/program/process_elf_binary_tests.cpp @@ -17,7 +17,6 @@ #include "opencl/test/unit_test/mocks/mock_cl_device.h" #include "opencl/test/unit_test/mocks/mock_program.h" -#include "test.h" #include "compiler_options.h" #include "gtest/gtest.h" @@ -236,7 +235,7 @@ TEST_F(ProcessElfBinaryTests, GivenNonEmptyBuildOptionsWhenCreatingProgramFromBi EXPECT_STREQ(buildOptionsNotEmpty.c_str(), options.c_str()); } -HWTEST_F(ProcessElfBinaryTests, GivenBinaryWhenIncompatiblePatchtokenVerionThenProramCreationFails) { +TEST_F(ProcessElfBinaryTests, GivenBinaryWhenIncompatiblePatchtokenVerionThenProramCreationFails) { PatchTokensTestData::ValidEmptyProgram programTokens; { NEO::Elf::ElfEncoder<> elfEncoder; diff --git a/opencl/test/unit_test/program/program_tests.cpp b/opencl/test/unit_test/program/program_tests.cpp index c354d06973..bf6049d678 100644 --- a/opencl/test/unit_test/program/program_tests.cpp +++ b/opencl/test/unit_test/program/program_tests.cpp @@ -1699,11 +1699,8 @@ TEST_F(ProgramWithDebugSymbolsTests, GivenProgramCreatedWithDashGOptionWhenGetti TargetDevice targetDevice = {}; - auto &hwHelper = NEO::HwHelper::get(defaultHwInfo->platform.eRenderCoreFamily); - auto copyHwInfo = *defaultHwInfo; - hwHelper.adjustPlatformCoreFamilyForIgc(copyHwInfo); - targetDevice.coreFamily = copyHwInfo.platform.eRenderCoreFamily; - targetDevice.stepping = copyHwInfo.platform.usRevId; + targetDevice.coreFamily = pDevice->getHardwareInfo().platform.eRenderCoreFamily; + targetDevice.stepping = pDevice->getHardwareInfo().platform.usRevId; targetDevice.maxPointerSizeInBytes = sizeof(uintptr_t); std::string decodeErrors; @@ -2786,9 +2783,8 @@ TEST_F(ProgramTests, WhenProgramIsCreatedThenItsDeviceIsProperlySet) { MockProgram programWithDeviceWithValidSpecializedDevice{executionEnvironment, nullptr, false, &validClDevice.getDevice()}; EXPECT_TRUE(wasValidClDeviceUsed(programWithDeviceWithValidSpecializedDevice)); } -using CreateProgramFromBinaryTests2 = ::testing::Test; -HWTEST_F(CreateProgramFromBinaryTests2, givenBinaryProgramWhenKernelRebulildIsForcedThenDeviceBinaryIsNotUsed) { +TEST(CreateProgramFromBinaryTests, givenBinaryProgramWhenKernelRebulildIsForcedThenDeviceBinaryIsNotUsed) { DebugManagerStateRestore dbgRestorer; DebugManager.flags.RebuildPrecompiledKernels.set(true); cl_int retVal = CL_INVALID_BINARY; @@ -2809,7 +2805,7 @@ HWTEST_F(CreateProgramFromBinaryTests2, givenBinaryProgramWhenKernelRebulildIsFo EXPECT_EQ(0U, pProgram->packedDeviceBinarySize); } -HWTEST_F(CreateProgramFromBinaryTests2, givenBinaryProgramWhenKernelRebulildIsNotForcedThenDeviceBinaryIsUsed) { +TEST(CreateProgramFromBinaryTests, givenBinaryProgramWhenKernelRebulildIsNotForcedThenDeviceBinaryIsUsed) { cl_int retVal = CL_INVALID_BINARY; PatchTokensTestData::ValidEmptyProgram programTokens; diff --git a/shared/offline_compiler/source/extra_settings.cpp b/shared/offline_compiler/source/extra_settings.cpp index 5d11a0f667..4aec6e5398 100644 --- a/shared/offline_compiler/source/extra_settings.cpp +++ b/shared/offline_compiler/source/extra_settings.cpp @@ -16,7 +16,4 @@ void OfflineCompiler::resolveExtraSettings() { CompilerOptions::concatenateAppend(internalOptions, CompilerOptions::forceEmuInt32DivRemSP); } } - -void OfflineCompiler::adjustExtraSettings(HardwareInfo &hwInfo) { -} } // namespace NEO diff --git a/shared/offline_compiler/source/offline_compiler.cpp b/shared/offline_compiler/source/offline_compiler.cpp index 86b584aa44..2740f0b0a7 100644 --- a/shared/offline_compiler/source/offline_compiler.cpp +++ b/shared/offline_compiler/source/offline_compiler.cpp @@ -425,12 +425,8 @@ int OfflineCompiler::initialize(size_t numArgs, const std::vector & if ((igcPlatform == nullptr) || (igcGtSystemInfo == nullptr) || (igcFeWa == nullptr)) { return OUT_OF_HOST_MEMORY; } - - auto copyHwInfo = hwInfo; - adjustExtraSettings(copyHwInfo); - - IGC::PlatformHelper::PopulateInterfaceWith(*igcPlatform.get(), copyHwInfo.platform); - IGC::GtSysInfoHelper::PopulateInterfaceWith(*igcGtSystemInfo.get(), copyHwInfo.gtSystemInfo); + IGC::PlatformHelper::PopulateInterfaceWith(*igcPlatform.get(), hwInfo.platform); + IGC::GtSysInfoHelper::PopulateInterfaceWith(*igcGtSystemInfo.get(), hwInfo.gtSystemInfo); // populate with features igcFeWa.get()->SetFtrDesktop(hwInfo.featureTable.ftrDesktop); igcFeWa.get()->SetFtrChannelSwizzlingXOREnabled(hwInfo.featureTable.ftrChannelSwizzlingXOREnabled); diff --git a/shared/offline_compiler/source/offline_compiler.h b/shared/offline_compiler/source/offline_compiler.h index 7347f82f7d..dfea6c3457 100644 --- a/shared/offline_compiler/source/offline_compiler.h +++ b/shared/offline_compiler/source/offline_compiler.h @@ -83,7 +83,6 @@ class OfflineCompiler { int parseCommandLine(size_t numArgs, const std::vector &allArgs); void setStatelessToStatefullBufferOffsetFlag(); void resolveExtraSettings(); - void adjustExtraSettings(HardwareInfo &hwInfo); void parseDebugSettings(); void storeBinary(char *&pDst, size_t &dstSize, const void *pSrc, const size_t srcSize); MOCKABLE_VIRTUAL int buildSourceCode(); diff --git a/shared/source/compiler_interface/compiler_interface.cpp b/shared/source/compiler_interface/compiler_interface.cpp index 3077ca7db5..0e34bcd9d6 100644 --- a/shared/source/compiler_interface/compiler_interface.cpp +++ b/shared/source/compiler_interface/compiler_interface.cpp @@ -11,7 +11,6 @@ #include "shared/source/compiler_interface/compiler_interface.inl" #include "shared/source/debug_settings/debug_settings_manager.h" #include "shared/source/device/device.h" -#include "shared/source/helpers/hw_helper.h" #include "shared/source/helpers/hw_info.h" #include "opencl/source/os_interface/os_inc_base.h" @@ -331,6 +330,7 @@ TranslationOutput::ErrorCode CompilerInterface::getSipKernelBinary(NEO::Device & bool CompilerInterface::loadFcl() { return NEO::loadCompiler(Os::frontEndDllName, fclLib, fclMain); + ; } bool CompilerInterface::loadIgc() { @@ -400,13 +400,8 @@ IGC::IgcOclDeviceCtxTagOCL *CompilerInterface::getIgcDeviceCtx(const Device &dev if (productFamily != "unk") { getHwInfoForPlatformString(productFamily, hwInfo); } - - auto &hwHelper = NEO::HwHelper::get(hwInfo->platform.eRenderCoreFamily); - auto copyHwInfo = *hwInfo; - hwHelper.adjustPlatformCoreFamilyForIgc(copyHwInfo); - - IGC::PlatformHelper::PopulateInterfaceWith(*igcPlatform, copyHwInfo.platform); - IGC::GtSysInfoHelper::PopulateInterfaceWith(*igcGtSystemInfo, copyHwInfo.gtSystemInfo); + IGC::PlatformHelper::PopulateInterfaceWith(*igcPlatform, hwInfo->platform); + IGC::GtSysInfoHelper::PopulateInterfaceWith(*igcGtSystemInfo, hwInfo->gtSystemInfo); igcFeWa.get()->SetFtrDesktop(device.getHardwareInfo().featureTable.ftrDesktop); igcFeWa.get()->SetFtrChannelSwizzlingXOREnabled(device.getHardwareInfo().featureTable.ftrChannelSwizzlingXOREnabled); diff --git a/shared/source/helpers/hw_helper.h b/shared/source/helpers/hw_helper.h index 4af1e8a750..9c6c8f9bd1 100644 --- a/shared/source/helpers/hw_helper.h +++ b/shared/source/helpers/hw_helper.h @@ -122,7 +122,6 @@ class HwHelper { virtual bool isSpecialWorkgroupSizeRequired(const HardwareInfo &hwInfo, bool isSimulation) const = 0; virtual uint32_t getGlobalTimeStampBits() const = 0; virtual uint32_t getDefaultThreadArbitrationPolicy() const = 0; - virtual void adjustPlatformCoreFamilyForIgc(HardwareInfo &hwInfo) = 0; virtual bool heapInLocalMem(const HardwareInfo &hwInfo) const = 0; virtual bool useOnlyGlobalTimestamps() const = 0; @@ -315,8 +314,6 @@ class HwHelperHw : public HwHelper { uint32_t getDefaultThreadArbitrationPolicy() const override; - void adjustPlatformCoreFamilyForIgc(HardwareInfo &hwInfo) override; - bool useOnlyGlobalTimestamps() const override; protected: diff --git a/shared/source/helpers/hw_helper_base.inl b/shared/source/helpers/hw_helper_base.inl index afae87dae6..226e3b7a20 100644 --- a/shared/source/helpers/hw_helper_base.inl +++ b/shared/source/helpers/hw_helper_base.inl @@ -179,10 +179,6 @@ bool HwHelperHw::getEnableLocalMemory(const HardwareInfo &hwInfo) const return OSInterface::osEnableLocalMemory && isLocalMemoryEnabled(hwInfo); } -template -void HwHelperHw::adjustPlatformCoreFamilyForIgc(HardwareInfo &hwInfo) { -} - template AuxTranslationMode HwHelperHw::getAuxTranslationMode() { if (DebugManager.flags.ForceAuxTranslationMode.get() != -1) { diff --git a/shared/test/unit_test/compiler_interface/compiler_interface_tests.cpp b/shared/test/unit_test/compiler_interface/compiler_interface_tests.cpp index 467f02eddd..0ce78058f5 100644 --- a/shared/test/unit_test/compiler_interface/compiler_interface_tests.cpp +++ b/shared/test/unit_test/compiler_interface/compiler_interface_tests.cpp @@ -17,7 +17,6 @@ #include "opencl/test/unit_test/global_environment.h" #include "opencl/test/unit_test/mocks/mock_cif.h" #include "opencl/test/unit_test/mocks/mock_compilers.h" -#include "test.h" #include "gmock/gmock.h" #include "hw_cmds.h" @@ -903,7 +902,7 @@ TEST_F(CompilerInterfaceTest, GivenRequestForNewIgcTranslationCtxWhenCouldNotPop setIgcDebugVars(prevDebugVars); } -HWTEST_F(CompilerInterfaceTest, givenNoDbgKeyForceUseDifferentPlatformWhenRequestForNewTranslationCtxThenUseDefaultPlatform) { +TEST_F(CompilerInterfaceTest, givenNoDbgKeyForceUseDifferentPlatformWhenRequestForNewTranslationCtxThenUseDefaultPlatform) { auto device = this->pDevice; auto retIgc = pCompilerInterface->createIgcTranslationCtx(*device, IGC::CodeType::spirV, IGC::CodeType::oclGenBin); EXPECT_NE(nullptr, retIgc);