fix: Disable shared system USM for all KMDless modes

Related-To: NEO-16531

Signed-off-by: John Falkowski <john.falkowski@intel.com>
This commit is contained in:
John Falkowski
2025-11-20 20:14:59 +00:00
committed by Compute-Runtime-Automation
parent b864c34d16
commit fbe7a5a887
2 changed files with 42 additions and 2 deletions

View File

@@ -131,7 +131,6 @@ bool DeviceFactory::prepareDeviceEnvironmentsForProductFamilyOverride(ExecutionE
if (!productHelper.setupHardwareInfo(*hardwareInfo, *capsReader)) {
return false;
}
hardwareInfo->capabilityTable.sharedSystemMemCapabilities = 0;
}
}
}
@@ -161,6 +160,8 @@ bool DeviceFactory::prepareDeviceEnvironmentsForProductFamilyOverride(ExecutionE
[[maybe_unused]] bool result = rootDeviceEnvironment.initAilConfiguration();
DEBUG_BREAK_IF(!result);
hardwareInfo->capabilityTable.sharedSystemMemCapabilities = 0;
}
executionEnvironment.setDeviceHierarchyMode(executionEnvironment.rootDeviceEnvironments[0]->getHelper<GfxCoreHelper>());

View File

@@ -321,7 +321,7 @@ TEST_F(DeviceFactoryOverrideTest, givenFailedProductHelperSetupHardwareInfoWhenP
EXPECT_EQ(1u, productHelper->setupHardwareInfoCalled);
}
TEST_F(DeviceFactoryOverrideTest, givenTbxModeWhenPreparingDeviceEnvironmentsForProductFamilyOverrideThenSharedSystemMemCapabilitiesCleard) {
TEST_F(DeviceFactoryOverrideTest, givenTbxModeWhenPreparingDeviceEnvironmentsForProductFamilyOverrideThenSharedSystemMemCapabilitiesCleared) {
DebugManagerStateRestore stateRestore;
debugManager.flags.SetCommandStreamReceiver.set(static_cast<int>(CommandStreamReceiverType::tbx));
@@ -342,6 +342,45 @@ TEST_F(DeviceFactoryOverrideTest, givenTbxModeWhenPreparingDeviceEnvironmentsFor
EXPECT_EQ(0u, executionEnvironment.rootDeviceEnvironments[0]->getHardwareInfo()->capabilityTable.sharedSystemMemCapabilities);
}
TEST_F(DeviceFactoryOverrideTest, givenTbxWithAubModeWhenPreparingDeviceEnvironmentsForProductFamilyOverrideThenSharedSystemMemCapabilitiesCleared) {
DebugManagerStateRestore stateRestore;
debugManager.flags.SetCommandStreamReceiver.set(static_cast<int>(CommandStreamReceiverType::tbxWithAub));
struct MyMockProductHelper : MockProductHelper {
std::unique_ptr<DeviceCapsReader> getDeviceCapsReader(aub_stream::AubManager &aubManager) const override {
std::vector<uint32_t> caps;
return std::make_unique<DeviceCapsReaderMock>(caps);
}
};
auto productHelper = new MyMockProductHelper();
productHelper->setupHardwareInfoResult = true;
executionEnvironment.rootDeviceEnvironments[0]->productHelper.reset(productHelper);
auto rc = DeviceFactory::prepareDeviceEnvironmentsForProductFamilyOverride(executionEnvironment);
EXPECT_EQ(true, rc);
EXPECT_EQ(0u, executionEnvironment.rootDeviceEnvironments[0]->getHardwareInfo()->capabilityTable.sharedSystemMemCapabilities);
}
TEST_F(DeviceFactoryOverrideTest, givenAubModeWhenPreparingDeviceEnvironmentsForProductFamilyOverrideThenSharedSystemMemCapabilitiesCleared) {
DebugManagerStateRestore stateRestore;
debugManager.flags.SetCommandStreamReceiver.set(static_cast<int>(CommandStreamReceiverType::aub));
auto rc = DeviceFactory::prepareDeviceEnvironmentsForProductFamilyOverride(executionEnvironment);
EXPECT_EQ(true, rc);
EXPECT_EQ(0u, executionEnvironment.rootDeviceEnvironments[0]->getHardwareInfo()->capabilityTable.sharedSystemMemCapabilities);
}
TEST_F(DeviceFactoryOverrideTest, givenNullAubModeWhenPreparingDeviceEnvironmentsForProductFamilyOverrideThenSharedSystemMemCapabilitiesCleared) {
DebugManagerStateRestore stateRestore;
debugManager.flags.SetCommandStreamReceiver.set(static_cast<int>(CommandStreamReceiverType::nullAub));
auto rc = DeviceFactory::prepareDeviceEnvironmentsForProductFamilyOverride(executionEnvironment);
EXPECT_EQ(true, rc);
EXPECT_EQ(0u, executionEnvironment.rootDeviceEnvironments[0]->getHardwareInfo()->capabilityTable.sharedSystemMemCapabilities);
}
TEST_F(DeviceFactoryOverrideTest, givenDefaultHwInfoWhenPrepareDeviceEnvironmentsForProductFamilyOverrideIsCalledThenSlmSizeInKbEqualsMaxProgrammableSlmSize) {
DebugManagerStateRestore restore;
bool success = DeviceFactory::prepareDeviceEnvironmentsForProductFamilyOverride(executionEnvironment);