Remove not used method

Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
Dunajski, Bartosz
2022-10-05 13:37:57 +00:00
committed by Compute-Runtime-Automation
parent 88113fbaad
commit ad2d3d0289
14 changed files with 25 additions and 79 deletions

View File

@ -252,10 +252,7 @@ bool ModuleTranslationUnit::createFromNativeBinary(const char *input, size_t inp
UNRECOVERABLE_IF((nullptr == device) || (nullptr == device->getNEODevice()));
auto productAbbreviation = NEO::hardwarePrefix[device->getNEODevice()->getHardwareInfo().platform.eProductFamily];
auto copyHwInfo = device->getNEODevice()->getHardwareInfo();
NEO::CompilerHwInfoConfig::get(copyHwInfo.platform.eProductFamily)->adjustHwInfoForIgc(copyHwInfo);
NEO::TargetDevice targetDevice = NEO::targetDeviceFromHwInfo(copyHwInfo);
NEO::TargetDevice targetDevice = NEO::targetDeviceFromHwInfo(device->getNEODevice()->getHardwareInfo());
std::string decodeErrors;
std::string decodeWarnings;
ArrayRef<const uint8_t> archive(reinterpret_cast<const uint8_t *>(input), inputSize);

View File

@ -2089,15 +2089,14 @@ HWTEST_F(ModuleTranslationUnitTest, GivenRebuildFlagWhenCreatingModuleFromNative
HWTEST_F(ModuleTranslationUnitTest, WhenCreatingFromNativeBinaryThenSetsUpRequiredTargetProductProperly) {
ZebinTestData::ValidEmptyProgram emptyProgram;
NEO::HardwareInfo copyHwInfo = device->getNEODevice()->getHardwareInfo();
NEO::CompilerHwInfoConfig::get(copyHwInfo.platform.eProductFamily)->adjustHwInfoForIgc(copyHwInfo);
auto &hwInfo = device->getNEODevice()->getHardwareInfo();
emptyProgram.elfHeader->machine = copyHwInfo.platform.eProductFamily;
emptyProgram.elfHeader->machine = hwInfo.platform.eProductFamily;
L0::ModuleTranslationUnit moduleTuValid(this->device);
bool success = moduleTuValid.createFromNativeBinary(reinterpret_cast<const char *>(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<const char *>(emptyProgram.storage.data()), emptyProgram.storage.size());
@ -2138,10 +2137,9 @@ HWTEST_F(ModuleTranslationUnitTest, WhenCreatingFromNativeBinaryThenSetsUpPacked
HWTEST_F(ModuleTranslationUnitTest, WhenCreatingFromZebinThenAppendAllowZebinFlagToBuildOptions) {
ZebinTestData::ValidEmptyProgram zebin;
NEO::HardwareInfo copyHwInfo = device->getNEODevice()->getHardwareInfo();
NEO::CompilerHwInfoConfig::get(copyHwInfo.platform.eProductFamily)->adjustHwInfoForIgc(copyHwInfo);
auto &hwInfo = device->getNEODevice()->getHardwareInfo();
zebin.elfHeader->machine = copyHwInfo.platform.eProductFamily;
zebin.elfHeader->machine = hwInfo.platform.eProductFamily;
L0::ModuleTranslationUnit moduleTu(this->device);
bool success = moduleTu.createFromNativeBinary(reinterpret_cast<const char *>(zebin.storage.data()), zebin.storage.size());
EXPECT_TRUE(success);
@ -2166,10 +2164,7 @@ kernels:
zebin.appendSection(NEO::Elf::SHT_PROGBITS, NEO::Elf::SectionsNamesZebin::textPrefix.str() + "some_kernel", {});
zebin.appendSection(NEO::Elf::SHT_PROGBITS, NEO::Elf::SectionsNamesZebin::textPrefix.str() + "some_other_kernel", {});
NEO::HardwareInfo copyHwInfo = device->getNEODevice()->getHardwareInfo();
NEO::CompilerHwInfoConfig::get(copyHwInfo.platform.eProductFamily)->adjustHwInfoForIgc(copyHwInfo);
zebin.elfHeader->machine = copyHwInfo.platform.eProductFamily;
zebin.elfHeader->machine = device->getNEODevice()->getHardwareInfo().platform.eProductFamily;
L0::ModuleTranslationUnit moduleTuValid(this->device);
bool success = moduleTuValid.createFromNativeBinary(reinterpret_cast<const char *>(zebin.storage.data()), zebin.storage.size());
@ -3161,10 +3156,7 @@ TEST_F(ModuleWithZebinTest, givenNonZebinaryFormatWhenGettingDebugInfoThenDebugZ
HWTEST_F(ModuleWithZebinTest, givenZebinWithKernelCallingExternalFunctionThenUpdateKernelsBarrierCount) {
ZebinTestData::ZebinWithExternalFunctionsInfo zebin;
NEO::HardwareInfo copyHwInfo = device->getHwInfo();
NEO::CompilerHwInfoConfig::get(copyHwInfo.platform.eProductFamily)->adjustHwInfoForIgc(copyHwInfo);
zebin.setProductFamily(static_cast<uint16_t>(copyHwInfo.platform.eProductFamily));
zebin.setProductFamily(static_cast<uint16_t>(device->getHwInfo().platform.eProductFamily));
ze_module_desc_t moduleDesc = {};
moduleDesc.format = ZE_MODULE_FORMAT_NATIVE;

View File

@ -38,7 +38,7 @@ components:
dest_dir: kernels_bin
type: git
branch: kernels_bin
revision: 1977-391
revision: 1977-393
kmdaf:
branch: kmdaf
dest_dir: kmdaf

View File

@ -166,10 +166,7 @@ cl_int Program::createProgramFromBinary(
auto hwInfo = executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->getHardwareInfo();
auto productAbbreviation = hardwarePrefix[hwInfo->platform.eProductFamily];
auto copyHwInfo = *hwInfo;
CompilerHwInfoConfig::get(copyHwInfo.platform.eProductFamily)->adjustHwInfoForIgc(copyHwInfo);
TargetDevice targetDevice = targetDeviceFromHwInfo(copyHwInfo);
TargetDevice targetDevice = targetDeviceFromHwInfo(*hwInfo);
std::string decodeErrors;
std::string decodeWarnings;
auto singleDeviceBinary = unpackSingleDeviceBinary(archive, ConstStringRef(productAbbreviation, strlen(productAbbreviation)), targetDevice,

View File

@ -2051,11 +2051,8 @@ TEST_F(ProgramTests, whenCreatingFromZebinThenAppendAllowZebinFlagToBuildOptions
GTEST_SKIP();
}
auto copyHwInfo = *defaultHwInfo;
CompilerHwInfoConfig::get(copyHwInfo.platform.eProductFamily)->adjustHwInfoForIgc(copyHwInfo);
ZebinTestData::ValidEmptyProgram zebin;
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));

View File

@ -81,13 +81,8 @@ int OclocIgcFacade::initialize(const HardwareInfo &hwInfo) {
const auto compilerHwInfoConfig = CompilerHwInfoConfig::get(hwInfo.platform.eProductFamily);
auto copyHwInfo = hwInfo;
if (compilerHwInfoConfig) {
compilerHwInfoConfig->adjustHwInfoForIgc(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);
populateWithFeatures(igcFtrWa.get(), hwInfo, compilerHwInfoConfig);

View File

@ -436,11 +436,8 @@ IGC::IgcOclDeviceCtxTagOCL *CompilerInterface::getIgcDeviceCtx(const Device &dev
getHwInfoForPlatformString(productFamily, hwInfo);
}
auto copyHwInfo = *hwInfo;
CompilerHwInfoConfig::get(copyHwInfo.platform.eProductFamily)->adjustHwInfoForIgc(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);
igcFtrWa->SetFtrDesktop(device.getHardwareInfo().featureTable.flags.ftrDesktop);
igcFtrWa->SetFtrChannelSwizzlingXOREnabled(device.getHardwareInfo().featureTable.flags.ftrChannelSwizzlingXOREnabled);

View File

@ -28,7 +28,6 @@ class CompilerHwInfoConfig {
virtual bool isForceEmuInt32DivRemSPRequired() const = 0;
virtual bool isStatelessToStatefulBufferOffsetSupported() const = 0;
virtual bool isForceToStatelessRequired() const = 0;
virtual void adjustHwInfoForIgc(HardwareInfo &hwInfo) const = 0;
virtual void setProductConfigForHwInfo(HardwareInfo &hwInfo, AheadOfTimeConfig config) const = 0;
virtual const char *getCachingPolicyOptions(bool isDebuggerActive) const = 0;
};
@ -45,7 +44,6 @@ class CompilerHwInfoConfigHw : public CompilerHwInfoConfig {
bool isForceEmuInt32DivRemSPRequired() const override;
bool isStatelessToStatefulBufferOffsetSupported() const override;
bool isForceToStatelessRequired() const override;
void adjustHwInfoForIgc(HardwareInfo &hwInfo) const override;
void setProductConfigForHwInfo(HardwareInfo &hwInfo, AheadOfTimeConfig config) const override;
const char *getCachingPolicyOptions(bool isDebuggerActive) const override;

View File

@ -21,10 +21,6 @@ bool CompilerHwInfoConfigHw<gfxProduct>::isStatelessToStatefulBufferOffsetSuppor
return true;
}
template <PRODUCT_FAMILY gfxProduct>
void CompilerHwInfoConfigHw<gfxProduct>::adjustHwInfoForIgc(HardwareInfo &hwInfo) const {
}
template <PRODUCT_FAMILY gfxProduct>
const char *CompilerHwInfoConfigHw<gfxProduct>::getCachingPolicyOptions(bool isDebuggerActive) const {
return L1CachePolicyHelper<gfxProduct>::getCachingPolicyOptions(isDebuggerActive);

View File

@ -27,10 +27,7 @@ template <enabledIrFormat irFormat = enabledIrFormat::NONE>
struct MockElfBinaryPatchtokens {
MockElfBinaryPatchtokens(const HardwareInfo &hwInfo) : MockElfBinaryPatchtokens(std::string{}, hwInfo){};
MockElfBinaryPatchtokens(const std::string &buildOptions, const HardwareInfo &hwInfo) {
auto copyHwInfo = hwInfo;
CompilerHwInfoConfig::get(copyHwInfo.platform.eProductFamily)->adjustHwInfoForIgc(copyHwInfo);
mockDevBinaryHeader.Device = copyHwInfo.platform.eRenderCoreFamily;
mockDevBinaryHeader.Device = hwInfo.platform.eRenderCoreFamily;
mockDevBinaryHeader.GPUPointerSizeInBytes = sizeof(void *);
mockDevBinaryHeader.Version = iOpenCL::CURRENT_ICBE_VERSION;
constexpr size_t mockDevBinaryDataSize = sizeof(mockDevBinaryHeader) + mockDataSize;

View File

@ -83,13 +83,10 @@ inline uint32_t pushBackArgInfoToken(std::vector<uint8_t> &outStream,
struct ValidEmptyProgram : NEO::PatchTokenBinary::ProgramFromPatchtokens {
ValidEmptyProgram() {
auto copyHwInfo = *NEO::defaultHwInfo;
NEO::CompilerHwInfoConfig::get(copyHwInfo.platform.eProductFamily)->adjustHwInfoForIgc(copyHwInfo);
iOpenCL::SProgramBinaryHeader headerTok = {};
headerTok.Magic = iOpenCL::MAGIC_CL;
headerTok.Version = iOpenCL::CURRENT_ICBE_VERSION;
headerTok.Device = copyHwInfo.platform.eRenderCoreFamily;
headerTok.Device = NEO::defaultHwInfo->platform.eRenderCoreFamily;
headerTok.GPUPointerSizeInBytes = sizeof(uintptr_t);
this->decodeStatus = NEO::DecodeError::Success;

View File

@ -186,9 +186,7 @@ ZebinWithL0TestCommonModule::ZebinWithL0TestCommonModule(const NEO::HardwareInfo
if (forceRecompilation) {
elfHeader.machine = NEO::Elf::EM_NONE;
} else {
auto adjustedHwInfo = hwInfo;
NEO::CompilerHwInfoConfig::get(productFamily)->adjustHwInfoForIgc(adjustedHwInfo);
elfHeader.machine = adjustedHwInfo.platform.eProductFamily;
elfHeader.machine = hwInfo.platform.eProductFamily;
}
const uint8_t testKernelData[0xac0] = {0u};

View File

@ -877,11 +877,8 @@ HWTEST_F(CompilerInterfaceTest, givenNoDbgKeyForceUseDifferentPlatformWhenReques
auto igcPlatform = devCtx->GetPlatformHandle();
auto igcSysInfo = devCtx->GetGTSystemInfoHandle();
HardwareInfo copyHwInfo = device->getHardwareInfo();
NEO::CompilerHwInfoConfig::get(copyHwInfo.platform.eProductFamily)->adjustHwInfoForIgc(copyHwInfo);
EXPECT_EQ(copyHwInfo.platform.eProductFamily, igcPlatform->GetProductFamily());
EXPECT_EQ(copyHwInfo.platform.eRenderCoreFamily, igcPlatform->GetRenderCoreFamily());
EXPECT_EQ(device->getHardwareInfo().platform.eProductFamily, igcPlatform->GetProductFamily());
EXPECT_EQ(device->getHardwareInfo().platform.eRenderCoreFamily, igcPlatform->GetRenderCoreFamily());
EXPECT_EQ(device->getHardwareInfo().gtSystemInfo.SliceCount, igcSysInfo->GetSliceCount());
EXPECT_EQ(device->getHardwareInfo().gtSystemInfo.SubSliceCount, igcSysInfo->GetSubSliceCount());
EXPECT_EQ(device->getHardwareInfo().gtSystemInfo.EUCount, igcSysInfo->GetEUCount());
@ -902,11 +899,8 @@ HWTEST_F(CompilerInterfaceTest, givenDbgKeyForceUseDifferentPlatformWhenRequestF
auto igcPlatform = devCtx->GetPlatformHandle();
auto igcSysInfo = devCtx->GetGTSystemInfoHandle();
HardwareInfo copyHwInfo = *hardwareInfoTable[dbgProdFamily];
NEO::CompilerHwInfoConfig::get(copyHwInfo.platform.eProductFamily)->adjustHwInfoForIgc(copyHwInfo);
EXPECT_EQ(copyHwInfo.platform.eProductFamily, igcPlatform->GetProductFamily());
EXPECT_EQ(copyHwInfo.platform.eRenderCoreFamily, igcPlatform->GetRenderCoreFamily());
EXPECT_EQ(hardwareInfoTable[dbgProdFamily]->platform.eProductFamily, igcPlatform->GetProductFamily());
EXPECT_EQ(hardwareInfoTable[dbgProdFamily]->platform.eRenderCoreFamily, igcPlatform->GetRenderCoreFamily());
EXPECT_EQ(dbgSystemInfo.SliceCount, igcSysInfo->GetSliceCount());
EXPECT_EQ(dbgSystemInfo.SubSliceCount, igcSysInfo->GetSubSliceCount());
EXPECT_EQ(dbgSystemInfo.DualSubSliceCount, igcSysInfo->GetSubSliceCount());

View File

@ -127,9 +127,6 @@ TEST(ProgramDumper, givenProgramWithPatchtokensThenProperlyCreatesDump) {
unknownToken1.Token = NUM_PATCH_TOKENS;
progWithConst.unhandledTokens.push_back(&unknownToken1);
NEO::HardwareInfo copyHwInfo = *NEO::defaultHwInfo;
NEO::CompilerHwInfoConfig::get(copyHwInfo.platform.eProductFamily)->adjustHwInfoForIgc(copyHwInfo);
std::string generated = NEO::PatchTokenBinary::asString(progWithConst);
std::stringstream expected;
expected << R"===(Program of size : )===" << progWithConst.blobs.programInfo.size() << R"===( decoded successfully
@ -139,7 +136,7 @@ struct SProgramBinaryHeader {
<< CURRENT_ICBE_VERSION << R"===(
uint32_t Device; // = )==="
<< copyHwInfo.platform.eRenderCoreFamily << R"===(
<< NEO::defaultHwInfo->platform.eRenderCoreFamily << R"===(
uint32_t GPUPointerSizeInBytes; // = )==="
<< progWithConst.header->GPUPointerSizeInBytes << R"===(
@ -271,9 +268,6 @@ TEST(ProgramDumper, givenProgramWithKernelThenProperlyCreatesDump) {
std::string generated = NEO::PatchTokenBinary::asString(program);
std::stringstream expected;
NEO::HardwareInfo copyHwInfo = *NEO::defaultHwInfo;
NEO::CompilerHwInfoConfig::get(copyHwInfo.platform.eProductFamily)->adjustHwInfoForIgc(copyHwInfo);
expected << R"===(Program of size : )===" << program.blobs.programInfo.size() << R"===( decoded successfully
struct SProgramBinaryHeader {
uint32_t Magic; // = 1229870147
@ -281,7 +275,7 @@ struct SProgramBinaryHeader {
<< iOpenCL::CURRENT_ICBE_VERSION << R"===(
uint32_t Device; // = )==="
<< copyHwInfo.platform.eRenderCoreFamily << R"===(
<< NEO::defaultHwInfo->platform.eRenderCoreFamily << R"===(
uint32_t GPUPointerSizeInBytes; // = )==="
<< program.header->GPUPointerSizeInBytes << R"===(
@ -357,9 +351,6 @@ TEST(ProgramDumper, givenProgramWithMultipleKerneslThenProperlyCreatesDump) {
std::string generated = NEO::PatchTokenBinary::asString(program);
std::stringstream expected;
NEO::HardwareInfo copyHwInfo = *NEO::defaultHwInfo;
NEO::CompilerHwInfoConfig::get(copyHwInfo.platform.eProductFamily)->adjustHwInfoForIgc(copyHwInfo);
expected << R"===(Program of size : )===" << program.blobs.programInfo.size() << R"===( decoded successfully
struct SProgramBinaryHeader {
uint32_t Magic; // = 1229870147
@ -367,7 +358,7 @@ struct SProgramBinaryHeader {
<< iOpenCL::CURRENT_ICBE_VERSION << R"===(
uint32_t Device; // = )==="
<< copyHwInfo.platform.eRenderCoreFamily << R"===(
<< NEO::defaultHwInfo->platform.eRenderCoreFamily << R"===(
uint32_t GPUPointerSizeInBytes; // = )==="
<< program.header->GPUPointerSizeInBytes << R"===(