Enable LUID Extension by Default
Related-To: LOCI-3884 Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
This commit is contained in:
parent
3488f294b2
commit
8b4fe7093d
|
@ -24,7 +24,6 @@ namespace ult {
|
||||||
using LuidDeviceTest = Test<DeviceFixture>;
|
using LuidDeviceTest = Test<DeviceFixture>;
|
||||||
|
|
||||||
TEST_F(LuidDeviceTest, givenLuidDevicePropertiesStructureAndDRMDriverTypeThenUnsupportedReturned) {
|
TEST_F(LuidDeviceTest, givenLuidDevicePropertiesStructureAndDRMDriverTypeThenUnsupportedReturned) {
|
||||||
DebugManager.flags.EnableL0ReadLUIDExtension.set(true);
|
|
||||||
neoDevice->executionEnvironment->rootDeviceEnvironments[0]->osInterface.reset(new NEO::OSInterface());
|
neoDevice->executionEnvironment->rootDeviceEnvironments[0]->osInterface.reset(new NEO::OSInterface());
|
||||||
neoDevice->executionEnvironment->rootDeviceEnvironments[0]->osInterface->setDriverModel(std::make_unique<NEO::MockDriverModelDRM>());
|
neoDevice->executionEnvironment->rootDeviceEnvironments[0]->osInterface->setDriverModel(std::make_unique<NEO::MockDriverModelDRM>());
|
||||||
ze_device_properties_t deviceProperties = {ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES};
|
ze_device_properties_t deviceProperties = {ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES};
|
||||||
|
@ -32,10 +31,10 @@ TEST_F(LuidDeviceTest, givenLuidDevicePropertiesStructureAndDRMDriverTypeThenUns
|
||||||
deviceProperties.pNext = &deviceLuidProperties;
|
deviceProperties.pNext = &deviceLuidProperties;
|
||||||
ze_result_t result = device->getProperties(&deviceProperties);
|
ze_result_t result = device->getProperties(&deviceProperties);
|
||||||
EXPECT_EQ(result, ZE_RESULT_ERROR_UNSUPPORTED_FEATURE);
|
EXPECT_EQ(result, ZE_RESULT_ERROR_UNSUPPORTED_FEATURE);
|
||||||
DebugManager.flags.EnableL0ReadLUIDExtension.set(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(LuidDeviceTest, givenLuidDevicePropertiesStructureAndDebugVariableFalseThenSuccessReturned) {
|
TEST_F(LuidDeviceTest, givenLuidDevicePropertiesStructureAndDebugVariableFalseThenSuccessReturned) {
|
||||||
|
DebugManagerStateRestore restorer;
|
||||||
DebugManager.flags.EnableL0ReadLUIDExtension.set(false);
|
DebugManager.flags.EnableL0ReadLUIDExtension.set(false);
|
||||||
neoDevice->executionEnvironment->rootDeviceEnvironments[0]->osInterface.reset(new NEO::OSInterface());
|
neoDevice->executionEnvironment->rootDeviceEnvironments[0]->osInterface.reset(new NEO::OSInterface());
|
||||||
neoDevice->executionEnvironment->rootDeviceEnvironments[0]->osInterface->setDriverModel(std::make_unique<NEO::MockDriverModelDRM>());
|
neoDevice->executionEnvironment->rootDeviceEnvironments[0]->osInterface->setDriverModel(std::make_unique<NEO::MockDriverModelDRM>());
|
||||||
|
|
|
@ -77,17 +77,14 @@ class MockOsContextWin : public OsContextWin {
|
||||||
using LuidDeviceTest = Test<DeviceFixture>;
|
using LuidDeviceTest = Test<DeviceFixture>;
|
||||||
|
|
||||||
TEST_F(LuidDeviceTest, givenOsContextWinAndGetDeviceNodeMaskThenNodeMaskIsAtLeast1) {
|
TEST_F(LuidDeviceTest, givenOsContextWinAndGetDeviceNodeMaskThenNodeMaskIsAtLeast1) {
|
||||||
DebugManager.flags.EnableL0ReadLUIDExtension.set(true);
|
|
||||||
auto luidMock = new MockDriverModelWDDMLUID(*neoDevice->executionEnvironment->rootDeviceEnvironments[0]);
|
auto luidMock = new MockDriverModelWDDMLUID(*neoDevice->executionEnvironment->rootDeviceEnvironments[0]);
|
||||||
auto defaultEngine = defaultHwInfo->capabilityTable.defaultEngineType;
|
auto defaultEngine = defaultHwInfo->capabilityTable.defaultEngineType;
|
||||||
OsContextWin osContext(*luidMock, 0, 0u, EngineDescriptorHelper::getDefaultDescriptor({defaultEngine, EngineUsage::Regular}));
|
OsContextWin osContext(*luidMock, 0, 0u, EngineDescriptorHelper::getDefaultDescriptor({defaultEngine, EngineUsage::Regular}));
|
||||||
EXPECT_GE(osContext.getDeviceNodeMask(), 1u);
|
EXPECT_GE(osContext.getDeviceNodeMask(), 1u);
|
||||||
delete luidMock;
|
delete luidMock;
|
||||||
DebugManager.flags.EnableL0ReadLUIDExtension.set(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(LuidDeviceTest, givenOsContextWinAndGetLUIDArrayThenLUIDisValid) {
|
TEST_F(LuidDeviceTest, givenOsContextWinAndGetLUIDArrayThenLUIDisValid) {
|
||||||
DebugManager.flags.EnableL0ReadLUIDExtension.set(true);
|
|
||||||
auto luidMock = new MockDriverModelWDDMLUID(*neoDevice->executionEnvironment->rootDeviceEnvironments[0]);
|
auto luidMock = new MockDriverModelWDDMLUID(*neoDevice->executionEnvironment->rootDeviceEnvironments[0]);
|
||||||
auto defaultEngine = defaultHwInfo->capabilityTable.defaultEngineType;
|
auto defaultEngine = defaultHwInfo->capabilityTable.defaultEngineType;
|
||||||
OsContextWin osContext(*luidMock, 0, 0u, EngineDescriptorHelper::getDefaultDescriptor({defaultEngine, EngineUsage::Regular}));
|
OsContextWin osContext(*luidMock, 0, 0u, EngineDescriptorHelper::getDefaultDescriptor({defaultEngine, EngineUsage::Regular}));
|
||||||
|
@ -98,11 +95,9 @@ TEST_F(LuidDeviceTest, givenOsContextWinAndGetLUIDArrayThenLUIDisValid) {
|
||||||
memcpy_s(&luid, sizeof(uint64_t), luidData.data(), sizeof(uint8_t) * luidData.size());
|
memcpy_s(&luid, sizeof(uint64_t), luidData.data(), sizeof(uint8_t) * luidData.size());
|
||||||
EXPECT_NE(luid, (uint64_t)0);
|
EXPECT_NE(luid, (uint64_t)0);
|
||||||
delete luidMock;
|
delete luidMock;
|
||||||
DebugManager.flags.EnableL0ReadLUIDExtension.set(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(LuidDeviceTest, givenLuidDevicePropertiesStructureAndWDDMDriverTypeThenSuccessReturned) {
|
TEST_F(LuidDeviceTest, givenLuidDevicePropertiesStructureAndWDDMDriverTypeThenSuccessReturned) {
|
||||||
DebugManager.flags.EnableL0ReadLUIDExtension.set(true);
|
|
||||||
auto defaultEngine = defaultHwInfo->capabilityTable.defaultEngineType;
|
auto defaultEngine = defaultHwInfo->capabilityTable.defaultEngineType;
|
||||||
auto luidMock = new MockDriverModelWDDMLUID(*neoDevice->executionEnvironment->rootDeviceEnvironments[0]);
|
auto luidMock = new MockDriverModelWDDMLUID(*neoDevice->executionEnvironment->rootDeviceEnvironments[0]);
|
||||||
neoDevice->executionEnvironment->rootDeviceEnvironments[0]->osInterface.reset(new NEO::OSInterface());
|
neoDevice->executionEnvironment->rootDeviceEnvironments[0]->osInterface.reset(new NEO::OSInterface());
|
||||||
|
@ -125,11 +120,9 @@ TEST_F(LuidDeviceTest, givenLuidDevicePropertiesStructureAndWDDMDriverTypeThenSu
|
||||||
EXPECT_EQ(lowLUID, (uint32_t)adapterLuid.LowPart);
|
EXPECT_EQ(lowLUID, (uint32_t)adapterLuid.LowPart);
|
||||||
EXPECT_EQ(highLUID, (uint32_t)adapterLuid.HighPart);
|
EXPECT_EQ(highLUID, (uint32_t)adapterLuid.HighPart);
|
||||||
EXPECT_NE(deviceLuidProperties.nodeMask, (uint32_t)0);
|
EXPECT_NE(deviceLuidProperties.nodeMask, (uint32_t)0);
|
||||||
DebugManager.flags.EnableL0ReadLUIDExtension.set(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(LuidDeviceTest, givenLuidDevicePropertiesStructureAndDRMDriverTypeThenUnsupportedReturned) {
|
TEST_F(LuidDeviceTest, givenLuidDevicePropertiesStructureAndDRMDriverTypeThenUnsupportedReturned) {
|
||||||
DebugManager.flags.EnableL0ReadLUIDExtension.set(true);
|
|
||||||
neoDevice->executionEnvironment->rootDeviceEnvironments[0]->osInterface.reset(new NEO::OSInterface());
|
neoDevice->executionEnvironment->rootDeviceEnvironments[0]->osInterface.reset(new NEO::OSInterface());
|
||||||
neoDevice->executionEnvironment->rootDeviceEnvironments[0]->osInterface->setDriverModel(std::make_unique<NEO::MockDriverModelDRM>());
|
neoDevice->executionEnvironment->rootDeviceEnvironments[0]->osInterface->setDriverModel(std::make_unique<NEO::MockDriverModelDRM>());
|
||||||
ze_device_properties_t deviceProperties = {ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES};
|
ze_device_properties_t deviceProperties = {ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES};
|
||||||
|
@ -137,18 +130,15 @@ TEST_F(LuidDeviceTest, givenLuidDevicePropertiesStructureAndDRMDriverTypeThenUns
|
||||||
deviceProperties.pNext = &deviceLuidProperties;
|
deviceProperties.pNext = &deviceLuidProperties;
|
||||||
ze_result_t result = device->getProperties(&deviceProperties);
|
ze_result_t result = device->getProperties(&deviceProperties);
|
||||||
EXPECT_EQ(result, ZE_RESULT_ERROR_UNSUPPORTED_FEATURE);
|
EXPECT_EQ(result, ZE_RESULT_ERROR_UNSUPPORTED_FEATURE);
|
||||||
DebugManager.flags.EnableL0ReadLUIDExtension.set(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(LuidDeviceTest, givenLuidDevicePropertiesStructureAndAndNoOsInterfaceThenUninitReturned) {
|
TEST_F(LuidDeviceTest, givenLuidDevicePropertiesStructureAndAndNoOsInterfaceThenUninitReturned) {
|
||||||
DebugManager.flags.EnableL0ReadLUIDExtension.set(true);
|
|
||||||
neoDevice->executionEnvironment->rootDeviceEnvironments[0]->osInterface.reset(nullptr);
|
neoDevice->executionEnvironment->rootDeviceEnvironments[0]->osInterface.reset(nullptr);
|
||||||
ze_device_properties_t deviceProperties = {ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES};
|
ze_device_properties_t deviceProperties = {ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES};
|
||||||
ze_device_luid_ext_properties_t deviceLuidProperties = {ZE_STRUCTURE_TYPE_DEVICE_LUID_EXT_PROPERTIES};
|
ze_device_luid_ext_properties_t deviceLuidProperties = {ZE_STRUCTURE_TYPE_DEVICE_LUID_EXT_PROPERTIES};
|
||||||
deviceProperties.pNext = &deviceLuidProperties;
|
deviceProperties.pNext = &deviceLuidProperties;
|
||||||
ze_result_t result = device->getProperties(&deviceProperties);
|
ze_result_t result = device->getProperties(&deviceProperties);
|
||||||
EXPECT_EQ(result, ZE_RESULT_ERROR_UNINITIALIZED);
|
EXPECT_EQ(result, ZE_RESULT_ERROR_UNINITIALIZED);
|
||||||
DebugManager.flags.EnableL0ReadLUIDExtension.set(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace ult
|
} // namespace ult
|
||||||
|
|
|
@ -66,7 +66,6 @@ struct LuidDeviceTest : public ::testing::Test {
|
||||||
};
|
};
|
||||||
|
|
||||||
TEST_F(LuidDeviceTest, givenLuidDevicePropertiesStructureThenLuidAndNodeMaskSetForWDDMDriverType) {
|
TEST_F(LuidDeviceTest, givenLuidDevicePropertiesStructureThenLuidAndNodeMaskSetForWDDMDriverType) {
|
||||||
DebugManager.flags.EnableL0ReadLUIDExtension.set(true);
|
|
||||||
NEO::MockDevice *neoDevice = nullptr;
|
NEO::MockDevice *neoDevice = nullptr;
|
||||||
std::unique_ptr<Mock<L0::DriverHandleImp>> driverHandle;
|
std::unique_ptr<Mock<L0::DriverHandleImp>> driverHandle;
|
||||||
L0::Device *device = nullptr;
|
L0::Device *device = nullptr;
|
||||||
|
@ -110,7 +109,6 @@ TEST_F(LuidDeviceTest, givenLuidDevicePropertiesStructureThenLuidAndNodeMaskSetF
|
||||||
EXPECT_EQ(lowLUID, (uint32_t)adapterLuid.LowPart);
|
EXPECT_EQ(lowLUID, (uint32_t)adapterLuid.LowPart);
|
||||||
EXPECT_EQ(highLUID, (uint32_t)adapterLuid.HighPart);
|
EXPECT_EQ(highLUID, (uint32_t)adapterLuid.HighPart);
|
||||||
EXPECT_NE(deviceLuidProperties.nodeMask, (uint32_t)0);
|
EXPECT_NE(deviceLuidProperties.nodeMask, (uint32_t)0);
|
||||||
DebugManager.flags.EnableL0ReadLUIDExtension.set(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace ult
|
} // namespace ult
|
||||||
|
|
|
@ -342,7 +342,7 @@ DECLARE_DEBUG_VARIABLE(int32_t, DirectSubmissionRelaxedOrderingQueueSizeLimit, -
|
||||||
DECLARE_DEBUG_VARIABLE(bool, DirectSubmissionPrintBuffers, false, "Print address of submitted command buffers")
|
DECLARE_DEBUG_VARIABLE(bool, DirectSubmissionPrintBuffers, false, "Print address of submitted command buffers")
|
||||||
|
|
||||||
/*FEATURE FLAGS*/
|
/*FEATURE FLAGS*/
|
||||||
DECLARE_DEBUG_VARIABLE(bool, EnableL0ReadLUIDExtension, false, "Enables Support for L0 Extension for reading the LUID from WDDM.")
|
DECLARE_DEBUG_VARIABLE(bool, EnableL0ReadLUIDExtension, true, "Enables Support for L0 Extension for reading the LUID from WDDM.")
|
||||||
DECLARE_DEBUG_VARIABLE(bool, EnableL0EuCount, false, "Enables Support for L0 Extension for querying total nubmer of EUs.")
|
DECLARE_DEBUG_VARIABLE(bool, EnableL0EuCount, false, "Enables Support for L0 Extension for querying total nubmer of EUs.")
|
||||||
DECLARE_DEBUG_VARIABLE(bool, USMEvictAfterMigration, false, "Evict USM allocation after implicit migration to GPU")
|
DECLARE_DEBUG_VARIABLE(bool, USMEvictAfterMigration, false, "Evict USM allocation after implicit migration to GPU")
|
||||||
DECLARE_DEBUG_VARIABLE(bool, EnableNV12, true, "Enables NV12 extension")
|
DECLARE_DEBUG_VARIABLE(bool, EnableNV12, true, "Enables NV12 extension")
|
||||||
|
|
|
@ -108,7 +108,7 @@ DirectSubmissionDisableCacheFlush = -1
|
||||||
DirectSubmissionDisableMonitorFence = -1
|
DirectSubmissionDisableMonitorFence = -1
|
||||||
DirectSubmissionPrintBuffers = 0
|
DirectSubmissionPrintBuffers = 0
|
||||||
DirectSubmissionMaxRingBuffers = -1
|
DirectSubmissionMaxRingBuffers = -1
|
||||||
EnableL0ReadLUIDExtension = 0
|
EnableL0ReadLUIDExtension = -1
|
||||||
EnableL0EuCount = 0
|
EnableL0EuCount = 0
|
||||||
USMEvictAfterMigration = 0
|
USMEvictAfterMigration = 0
|
||||||
EnableDirectSubmissionController = -1
|
EnableDirectSubmissionController = -1
|
||||||
|
|
Loading…
Reference in New Issue