mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 23:56:39 +08:00
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:
committed by
Compute-Runtime-Automation
parent
07abb404e0
commit
4b5f206058
@@ -527,6 +527,7 @@ EnableBOChunkingPrefetch = 0
|
||||
EnableBOChunkingPreferredLocationHint = 0
|
||||
DestroyAllocationsViaGmm = -1
|
||||
EnableCompatibilityMode = 1
|
||||
ForceCompatibilityMode = 0
|
||||
RedirectFlushL3HostUsmToExternal = 0
|
||||
ForceFlushL3AfterPostSyncForHostUsm = 0
|
||||
ForceFlushL3AfterPostSyncForExternalAllocation = 0
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user