Revert "Enable LUID Extension by Default"

This reverts commit e1dbc98531.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
Compute-Runtime-Validation
2023-02-27 02:32:43 +01:00
committed by Compute-Runtime-Automation
parent 8fb6206b7b
commit 859a80114b
5 changed files with 16 additions and 3 deletions

View File

@@ -24,6 +24,7 @@ namespace ult {
using LuidDeviceTest = Test<DeviceFixture>;
TEST_F(LuidDeviceTest, givenLuidDevicePropertiesStructureAndDRMDriverTypeThenUnsupportedReturned) {
DebugManager.flags.EnableL0ReadLUIDExtension.set(true);
neoDevice->executionEnvironment->rootDeviceEnvironments[0]->osInterface.reset(new NEO::OSInterface());
neoDevice->executionEnvironment->rootDeviceEnvironments[0]->osInterface->setDriverModel(std::make_unique<NEO::MockDriverModelDRM>());
ze_device_properties_t deviceProperties = {ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES};
@@ -31,10 +32,10 @@ TEST_F(LuidDeviceTest, givenLuidDevicePropertiesStructureAndDRMDriverTypeThenUns
deviceProperties.pNext = &deviceLuidProperties;
ze_result_t result = device->getProperties(&deviceProperties);
EXPECT_EQ(result, ZE_RESULT_ERROR_UNSUPPORTED_FEATURE);
DebugManager.flags.EnableL0ReadLUIDExtension.set(false);
}
TEST_F(LuidDeviceTest, givenLuidDevicePropertiesStructureAndDebugVariableFalseThenSuccessReturned) {
DebugManagerStateRestore restorer;
DebugManager.flags.EnableL0ReadLUIDExtension.set(false);
neoDevice->executionEnvironment->rootDeviceEnvironments[0]->osInterface.reset(new NEO::OSInterface());
neoDevice->executionEnvironment->rootDeviceEnvironments[0]->osInterface->setDriverModel(std::make_unique<NEO::MockDriverModelDRM>());

View File

@@ -77,14 +77,17 @@ class MockOsContextWin : public OsContextWin {
using LuidDeviceTest = Test<DeviceFixture>;
TEST_F(LuidDeviceTest, givenOsContextWinAndGetDeviceNodeMaskThenNodeMaskIsAtLeast1) {
DebugManager.flags.EnableL0ReadLUIDExtension.set(true);
auto luidMock = new MockDriverModelWDDMLUID(*neoDevice->executionEnvironment->rootDeviceEnvironments[0]);
auto defaultEngine = defaultHwInfo->capabilityTable.defaultEngineType;
OsContextWin osContext(*luidMock, 0, 0u, EngineDescriptorHelper::getDefaultDescriptor({defaultEngine, EngineUsage::Regular}));
EXPECT_GE(osContext.getDeviceNodeMask(), 1u);
delete luidMock;
DebugManager.flags.EnableL0ReadLUIDExtension.set(false);
}
TEST_F(LuidDeviceTest, givenOsContextWinAndGetLUIDArrayThenLUIDisValid) {
DebugManager.flags.EnableL0ReadLUIDExtension.set(true);
auto luidMock = new MockDriverModelWDDMLUID(*neoDevice->executionEnvironment->rootDeviceEnvironments[0]);
auto defaultEngine = defaultHwInfo->capabilityTable.defaultEngineType;
OsContextWin osContext(*luidMock, 0, 0u, EngineDescriptorHelper::getDefaultDescriptor({defaultEngine, EngineUsage::Regular}));
@@ -95,9 +98,11 @@ TEST_F(LuidDeviceTest, givenOsContextWinAndGetLUIDArrayThenLUIDisValid) {
memcpy_s(&luid, sizeof(uint64_t), luidData.data(), sizeof(uint8_t) * luidData.size());
EXPECT_NE(luid, (uint64_t)0);
delete luidMock;
DebugManager.flags.EnableL0ReadLUIDExtension.set(false);
}
TEST_F(LuidDeviceTest, givenLuidDevicePropertiesStructureAndWDDMDriverTypeThenSuccessReturned) {
DebugManager.flags.EnableL0ReadLUIDExtension.set(true);
auto defaultEngine = defaultHwInfo->capabilityTable.defaultEngineType;
auto luidMock = new MockDriverModelWDDMLUID(*neoDevice->executionEnvironment->rootDeviceEnvironments[0]);
neoDevice->executionEnvironment->rootDeviceEnvironments[0]->osInterface.reset(new NEO::OSInterface());
@@ -120,9 +125,11 @@ TEST_F(LuidDeviceTest, givenLuidDevicePropertiesStructureAndWDDMDriverTypeThenSu
EXPECT_EQ(lowLUID, (uint32_t)adapterLuid.LowPart);
EXPECT_EQ(highLUID, (uint32_t)adapterLuid.HighPart);
EXPECT_NE(deviceLuidProperties.nodeMask, (uint32_t)0);
DebugManager.flags.EnableL0ReadLUIDExtension.set(false);
}
TEST_F(LuidDeviceTest, givenLuidDevicePropertiesStructureAndDRMDriverTypeThenUnsupportedReturned) {
DebugManager.flags.EnableL0ReadLUIDExtension.set(true);
neoDevice->executionEnvironment->rootDeviceEnvironments[0]->osInterface.reset(new NEO::OSInterface());
neoDevice->executionEnvironment->rootDeviceEnvironments[0]->osInterface->setDriverModel(std::make_unique<NEO::MockDriverModelDRM>());
ze_device_properties_t deviceProperties = {ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES};
@@ -130,15 +137,18 @@ TEST_F(LuidDeviceTest, givenLuidDevicePropertiesStructureAndDRMDriverTypeThenUns
deviceProperties.pNext = &deviceLuidProperties;
ze_result_t result = device->getProperties(&deviceProperties);
EXPECT_EQ(result, ZE_RESULT_ERROR_UNSUPPORTED_FEATURE);
DebugManager.flags.EnableL0ReadLUIDExtension.set(false);
}
TEST_F(LuidDeviceTest, givenLuidDevicePropertiesStructureAndAndNoOsInterfaceThenUninitReturned) {
DebugManager.flags.EnableL0ReadLUIDExtension.set(true);
neoDevice->executionEnvironment->rootDeviceEnvironments[0]->osInterface.reset(nullptr);
ze_device_properties_t deviceProperties = {ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES};
ze_device_luid_ext_properties_t deviceLuidProperties = {ZE_STRUCTURE_TYPE_DEVICE_LUID_EXT_PROPERTIES};
deviceProperties.pNext = &deviceLuidProperties;
ze_result_t result = device->getProperties(&deviceProperties);
EXPECT_EQ(result, ZE_RESULT_ERROR_UNINITIALIZED);
DebugManager.flags.EnableL0ReadLUIDExtension.set(false);
}
} // namespace ult

View File

@@ -37,6 +37,7 @@ struct LuidDeviceTest : public ::testing::Test {
};
TEST_F(LuidDeviceTest, givenLuidDevicePropertiesStructureThenLuidAndNodeMaskSetForWDDMDriverType) {
DebugManager.flags.EnableL0ReadLUIDExtension.set(true);
NEO::MockDevice *neoDevice = nullptr;
std::unique_ptr<Mock<L0::DriverHandleImp>> driverHandle;
L0::Device *device = nullptr;
@@ -80,6 +81,7 @@ TEST_F(LuidDeviceTest, givenLuidDevicePropertiesStructureThenLuidAndNodeMaskSetF
EXPECT_EQ(lowLUID, (uint32_t)adapterLuid.LowPart);
EXPECT_EQ(highLUID, (uint32_t)adapterLuid.HighPart);
EXPECT_NE(deviceLuidProperties.nodeMask, (uint32_t)0);
DebugManager.flags.EnableL0ReadLUIDExtension.set(false);
}
} // namespace ult