feature: add ForceCompatibilityMode debug flag

- allows using device binary without validating device against target
device

Related-To: HSD-13013893426

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
Mateusz Hoppe
2025-09-29 13:21:13 +00:00
committed by Compute-Runtime-Automation
parent 07abb404e0
commit 4b5f206058
4 changed files with 24 additions and 0 deletions

View File

@@ -527,6 +527,7 @@ EnableBOChunkingPrefetch = 0
EnableBOChunkingPreferredLocationHint = 0
DestroyAllocationsViaGmm = -1
EnableCompatibilityMode = 1
ForceCompatibilityMode = 0
RedirectFlushL3HostUsmToExternal = 0
ForceFlushL3AfterPostSyncForHostUsm = 0
ForceFlushL3AfterPostSyncForExternalAllocation = 0

View File

@@ -6555,6 +6555,25 @@ TEST(ValidateTargetDeviceGeneratorZebin, GivenZebinAndValidIntelGTNotesWithGener
}
}
TEST_F(IntelGTNotesFixture, GivenForceCompatibilityModeWhenValidatingTargetDeviceWithNoNotesThenReturnTrue) {
DebugManagerStateRestore dbgRestore;
TargetDevice targetDevice;
targetDevice.productFamily = productFamily;
targetDevice.coreFamily = renderCoreFamily;
targetDevice.maxPointerSizeInBytes = 8;
targetDevice.stepping = hardwareInfoTable[productFamily]->platform.usRevId;
std::string outErrReason, outWarning;
auto elf = Zebin::Elf::decodeElf<Zebin::Elf::EI_CLASS_64>(zebin.storage, outErrReason, outWarning);
EXPECT_TRUE(outWarning.empty());
EXPECT_TRUE(outErrReason.empty());
SingleDeviceBinary singleDeviceBinary{};
EXPECT_FALSE(validateTargetDevice(elf, targetDevice, outErrReason, outWarning, singleDeviceBinary.generatorFeatureVersions, singleDeviceBinary.generator));
NEO::debugManager.flags.ForceCompatibilityMode.set(true);
EXPECT_TRUE(validateTargetDevice(elf, targetDevice, outErrReason, outWarning, singleDeviceBinary.generatorFeatureVersions, singleDeviceBinary.generator));
}
TEST_F(IntelGTNotesFixture, WhenValidatingTargetDeviceGivenValidTargetDeviceAndNoNotesThenReturnFalse) {
TargetDevice targetDevice;
targetDevice.productFamily = productFamily;