Set ZE_ENABLE_PCI_ID_DEVICE_ORDER as false by default
This to avoid disruptions on performance data in multi-gpu systems where each gpu may perform differently, when comparing data before and after last refactor on ZE_ENABLE_PCI_ID_DEVICE_ORDER. Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
This commit is contained in:
parent
abade55c2d
commit
b28fd75ea1
|
@ -169,5 +169,107 @@ TEST_F(DriverPciOrderWitSimilarBusLinuxFixture, GivenEnvironmentVariableForDevic
|
|||
delete driverHandle;
|
||||
}
|
||||
|
||||
class DriverPciOrderWitDifferentDeviceLinuxFixture : public ::testing::Test {
|
||||
public:
|
||||
void SetUp() override {
|
||||
DebugManagerStateRestore restorer;
|
||||
DebugManager.flags.ZE_ENABLE_PCI_ID_DEVICE_ORDER.set(1);
|
||||
|
||||
NEO::MockCompilerEnableGuard mock(true);
|
||||
auto executionEnvironment = new NEO::ExecutionEnvironment();
|
||||
executionEnvironment->prepareRootDeviceEnvironments(numRootDevices);
|
||||
NEO::HardwareInfo hwInfo = *NEO::defaultHwInfo.get();
|
||||
for (auto i = 0u; i < executionEnvironment->rootDeviceEnvironments.size(); i++) {
|
||||
executionEnvironment->rootDeviceEnvironments[i]->setHwInfo(&hwInfo);
|
||||
}
|
||||
deviceFactory = std::make_unique<UltDeviceFactory>(numRootDevices, numSubDevices, *executionEnvironment);
|
||||
for (auto i = 0u; i < executionEnvironment->rootDeviceEnvironments.size(); i++) {
|
||||
devices.push_back(std::unique_ptr<NEO::Device>(deviceFactory->rootDevices[i]));
|
||||
}
|
||||
for (auto i = 0u; i < devices.size(); i++) {
|
||||
devices[i]->getExecutionEnvironment()->rootDeviceEnvironments[i]->osInterface = std::make_unique<NEO::OSInterface>();
|
||||
auto osInterface = devices[i]->getExecutionEnvironment()->rootDeviceEnvironments[i]->osInterface.get();
|
||||
osInterface->setDriverModel(std::make_unique<TestDriverMockDrm>(bdf[i], const_cast<NEO::RootDeviceEnvironment &>(devices[i]->getRootDeviceEnvironment())));
|
||||
}
|
||||
executionEnvironment->sortNeoDevices();
|
||||
}
|
||||
void TearDown() override {}
|
||||
|
||||
static constexpr uint32_t numRootDevices = 2u;
|
||||
static constexpr uint32_t numSubDevices = 2u;
|
||||
std::vector<std::unique_ptr<NEO::Device>> devices;
|
||||
std::string bdf[numRootDevices] = {"03:05.0", "03:04.0"};
|
||||
std::string sortedBdf[numRootDevices] = {"03:04.0", "03:05.0"};
|
||||
std::unique_ptr<UltDeviceFactory> deviceFactory;
|
||||
};
|
||||
|
||||
TEST_F(DriverPciOrderWitDifferentDeviceLinuxFixture, GivenEnvironmentVariableForDeviceOrderAccordingToPciSetWhenRetrievingNeoDevicesThenNeoDevicesAccordingToBusOrderRetrieved) {
|
||||
NEO::MockCompilerEnableGuard mock(true);
|
||||
DriverHandleImp *driverHandle = new DriverHandleImp;
|
||||
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, driverHandle->initialize(std::move(devices)));
|
||||
|
||||
for (uint32_t i = 0; i < numRootDevices; i++) {
|
||||
auto L0Device = driverHandle->devices[i];
|
||||
if (L0Device != nullptr) {
|
||||
auto pDrm = L0Device->getNEODevice()->getExecutionEnvironment()->rootDeviceEnvironments[L0Device->getRootDeviceIndex()]->osInterface->getDriverModel()->as<Drm>();
|
||||
EXPECT_NE(pDrm, nullptr);
|
||||
EXPECT_TRUE(!pDrm->getPciPath().compare(sortedBdf[i]));
|
||||
}
|
||||
}
|
||||
delete driverHandle;
|
||||
}
|
||||
|
||||
class DriverPciOrderWitSimilarBusAndDeviceLinuxFixture : public ::testing::Test {
|
||||
public:
|
||||
void SetUp() override {
|
||||
DebugManagerStateRestore restorer;
|
||||
DebugManager.flags.ZE_ENABLE_PCI_ID_DEVICE_ORDER.set(1);
|
||||
|
||||
NEO::MockCompilerEnableGuard mock(true);
|
||||
auto executionEnvironment = new NEO::ExecutionEnvironment();
|
||||
executionEnvironment->prepareRootDeviceEnvironments(numRootDevices);
|
||||
NEO::HardwareInfo hwInfo = *NEO::defaultHwInfo.get();
|
||||
for (auto i = 0u; i < executionEnvironment->rootDeviceEnvironments.size(); i++) {
|
||||
executionEnvironment->rootDeviceEnvironments[i]->setHwInfo(&hwInfo);
|
||||
}
|
||||
deviceFactory = std::make_unique<UltDeviceFactory>(numRootDevices, numSubDevices, *executionEnvironment);
|
||||
for (auto i = 0u; i < executionEnvironment->rootDeviceEnvironments.size(); i++) {
|
||||
devices.push_back(std::unique_ptr<NEO::Device>(deviceFactory->rootDevices[i]));
|
||||
}
|
||||
for (auto i = 0u; i < devices.size(); i++) {
|
||||
devices[i]->getExecutionEnvironment()->rootDeviceEnvironments[i]->osInterface = std::make_unique<NEO::OSInterface>();
|
||||
auto osInterface = devices[i]->getExecutionEnvironment()->rootDeviceEnvironments[i]->osInterface.get();
|
||||
osInterface->setDriverModel(std::make_unique<TestDriverMockDrm>(bdf[i], const_cast<NEO::RootDeviceEnvironment &>(devices[i]->getRootDeviceEnvironment())));
|
||||
}
|
||||
executionEnvironment->sortNeoDevices();
|
||||
}
|
||||
void TearDown() override {}
|
||||
|
||||
static constexpr uint32_t numRootDevices = 2u;
|
||||
static constexpr uint32_t numSubDevices = 2u;
|
||||
std::vector<std::unique_ptr<NEO::Device>> devices;
|
||||
std::string bdf[numRootDevices] = {"03:04.1", "03:04.0"};
|
||||
std::string sortedBdf[numRootDevices] = {"03:04.0", "03:04.1"};
|
||||
std::unique_ptr<UltDeviceFactory> deviceFactory;
|
||||
};
|
||||
|
||||
TEST_F(DriverPciOrderWitSimilarBusAndDeviceLinuxFixture, GivenEnvironmentVariableForDeviceOrderAccordingToPciSetWhenRetrievingNeoDevicesThenNeoDevicesAccordingToBusOrderRetrieved) {
|
||||
NEO::MockCompilerEnableGuard mock(true);
|
||||
DriverHandleImp *driverHandle = new DriverHandleImp;
|
||||
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, driverHandle->initialize(std::move(devices)));
|
||||
|
||||
for (uint32_t i = 0; i < numRootDevices; i++) {
|
||||
auto L0Device = driverHandle->devices[i];
|
||||
if (L0Device != nullptr) {
|
||||
auto pDrm = L0Device->getNEODevice()->getExecutionEnvironment()->rootDeviceEnvironments[L0Device->getRootDeviceIndex()]->osInterface->getDriverModel()->as<Drm>();
|
||||
EXPECT_NE(pDrm, nullptr);
|
||||
EXPECT_TRUE(!pDrm->getPciPath().compare(sortedBdf[i]));
|
||||
}
|
||||
}
|
||||
delete driverHandle;
|
||||
}
|
||||
|
||||
} // namespace ult
|
||||
} // namespace L0
|
||||
|
|
|
@ -10,7 +10,7 @@ AUBDumpToggleFileName = unk
|
|||
OverrideGdiPath = unk
|
||||
AubDumpAddMmioRegistersList = unk
|
||||
ZE_AFFINITY_MASK = default
|
||||
ZE_ENABLE_PCI_ID_DEVICE_ORDER = 1
|
||||
ZE_ENABLE_PCI_ID_DEVICE_ORDER = 0
|
||||
AUBDumpFilterNamedKernelStartIdx = 0
|
||||
AUBDumpFilterNamedKernelEndIdx = -1
|
||||
AUBDumpSubCaptureMode = 0
|
||||
|
|
|
@ -13,4 +13,4 @@ DECLARE_DEBUG_VARIABLE(bool, MakeAllBuffersResident, false, "Make all buffers re
|
|||
DECLARE_DEBUG_VARIABLE(int32_t, OverrideDefaultFP64Settings, -1, "-1: dont override, 0: disable, 1: enable.")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, EnableCrossDeviceAccess, -1, "-1: default behavior, 0: disabled, 1: enabled, Allows one device to access another device's memory")
|
||||
DECLARE_DEBUG_VARIABLE(std::string, ZE_AFFINITY_MASK, std::string("default"), "Refer to the Level Zero Specification for a description")
|
||||
DECLARE_DEBUG_VARIABLE(bool, ZE_ENABLE_PCI_ID_DEVICE_ORDER, true, "Refer to the Level Zero Specification for a description")
|
||||
DECLARE_DEBUG_VARIABLE(bool, ZE_ENABLE_PCI_ID_DEVICE_ORDER, false, "Refer to the Level Zero Specification for a description")
|
||||
|
|
Loading…
Reference in New Issue