diff --git a/shared/source/debug_settings/debug_variables_base.inl b/shared/source/debug_settings/debug_variables_base.inl index 47395e06e3..1ec3d9fe20 100644 --- a/shared/source/debug_settings/debug_variables_base.inl +++ b/shared/source/debug_settings/debug_variables_base.inl @@ -675,6 +675,7 @@ DECLARE_DEBUG_VARIABLE(int64_t, ReadOnlyAllocationsTypeMask, 0, "0: default, >0 DECLARE_DEBUG_VARIABLE(bool, IgnoreZebinUnknownAttributes, false, "enable to treat unknown zebin attributes as warning instead of error") DECLARE_DEBUG_VARIABLE(std::string, FinalizerInputType, std::string("unk"), "unk: default (N/A), input type for finalizer") DECLARE_DEBUG_VARIABLE(std::string, FinalizerLibraryName, std::string("unk"), "Library name for finalizer") +DECLARE_DEBUG_VARIABLE(std::string, IgcLibraryName, std::string("unk"), "Library name for igc") DECLARE_DEBUG_SCOPED_V(int32_t, UseIgcAsFcl, 0, S_RT | S_OCLOC, "0: platform default, 1: force use IGC, 2: force use FCL") DECLARE_DEBUG_VARIABLE(int32_t, EnableGlobalTimestampViaSubmission, -1, "-1: OS Interface, 0: OS Interface, 1: Submission. This flag sets the type of method to get timestamp for getGlobalTimestamps"); diff --git a/shared/source/helpers/compiler_product_helper_base.inl b/shared/source/helpers/compiler_product_helper_base.inl index de50c55bc1..30d5cc38cc 100644 --- a/shared/source/helpers/compiler_product_helper_base.inl +++ b/shared/source/helpers/compiler_product_helper_base.inl @@ -316,6 +316,9 @@ bool CompilerProductHelperHw::isForceBindlessRequired(const Hardware template const char *CompilerProductHelperHw::getCustomIgcLibraryName() const { + if (debugManager.flags.IgcLibraryName.get() != "unk") { + return debugManager.flags.IgcLibraryName.getRef().c_str(); + } return nullptr; } diff --git a/shared/test/common/test_files/igdrcl.config b/shared/test/common/test_files/igdrcl.config index 1933f518c0..751a2f6467 100644 --- a/shared/test/common/test_files/igdrcl.config +++ b/shared/test/common/test_files/igdrcl.config @@ -667,4 +667,5 @@ ExposeSingleDevice=-1 OverrideCopyOffloadMode = -1 UseSingleListForTemporaryAllocations = -1 OverrideMaxMemAllocSizeMb = -1 +IgcLibraryName = unk # Please don't edit below this line diff --git a/shared/test/unit_test/helpers/compiler_product_helper_tests.cpp b/shared/test/unit_test/helpers/compiler_product_helper_tests.cpp index e32e151a54..92c7f65e9d 100644 --- a/shared/test/unit_test/helpers/compiler_product_helper_tests.cpp +++ b/shared/test/unit_test/helpers/compiler_product_helper_tests.cpp @@ -29,6 +29,14 @@ HWTEST_F(CompilerProductHelperFixture, WhenIsMidThreadPreemptionIsSupportedIsCal EXPECT_TRUE(compilerProductHelper.isMidThreadPreemptionSupported(hwInfo)); } +TEST(CompilerProductHelperTest, GivenIgcLibraryNameDebugKeyWhenQueryingForCustomIgcLibraryNameThenDebugKeyValueisReturned) { + DebugManagerStateRestore restorer; + + debugManager.flags.IgcLibraryName.set("my_custom_igc.so"); + auto compilerProductHelper = CompilerProductHelper::create(defaultHwInfo->platform.eProductFamily); + EXPECT_STREQ("my_custom_igc.so", compilerProductHelper->getCustomIgcLibraryName()); +} + TEST(CompilerProductHelperTest, WhenCompilerProductHelperCreateIsCalledWithUnknownProductThenNullptrIsReturned) { EXPECT_EQ(nullptr, CompilerProductHelper::create(IGFX_UNKNOWN)); }