fix: ensure system info is queried before querying topology

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2024-07-26 15:00:47 +00:00
committed by Compute-Runtime-Automation
parent 06457b942e
commit 85df385582
10 changed files with 27 additions and 12 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2023 Intel Corporation
* Copyright (C) 2023-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -31,6 +31,7 @@ void DebugApiLinuxFixture::setUp(NEO::HardwareInfo *hwInfo) {
mockDrm->storedEUVal = hwInfo->gtSystemInfo.EUCount;
}
NEO::DrmQueryTopologyData topologyData = {};
mockDrm->systemInfoQueried = true;
mockDrm->queryTopology(neoDevice->getHardwareInfo(), topologyData);
auto &rootDeviceEnvironment = *neoDevice->executionEnvironment->rootDeviceEnvironments[0];
auto gtSystemInfo = &rootDeviceEnvironment.getMutableHardwareInfo()->gtSystemInfo;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2022-2023 Intel Corporation
* Copyright (C) 2022-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -32,6 +32,7 @@ void DebugApiLinuxPrelimFixture::setUp(NEO::HardwareInfo *hwInfo) {
mockDrm->storedEUVal = hwInfo->gtSystemInfo.EUCount;
}
NEO::DrmQueryTopologyData topologyData = {};
mockDrm->systemInfoQueried = true;
mockDrm->queryTopology(neoDevice->getHardwareInfo(), topologyData);
auto &rootDeviceEnvironment = *neoDevice->executionEnvironment->rootDeviceEnvironments[0];
auto gtSystemInfo = &rootDeviceEnvironment.getMutableHardwareInfo()->gtSystemInfo;
@@ -63,6 +64,7 @@ void DebugApiLinuxMultiDeviceFixture::setUp() {
ASSERT_NE(nullptr, engineInfo->getEngineInstance(1, hwInfo.capabilityTable.defaultEngineType));
NEO::DrmQueryTopologyData topologyData = {};
mockDrm->systemInfoQueried = true;
mockDrm->queryTopology(neoDevice->getHardwareInfo(), topologyData);
auto &rootDeviceEnvironment = *neoDevice->getExecutionEnvironment()->rootDeviceEnvironments[0];
auto gtSystemInfo = &rootDeviceEnvironment.getMutableHardwareInfo()->gtSystemInfo;

View File

@@ -146,6 +146,7 @@ TEST(DebugSessionLinuxi915Test, WhenConvertingThreadIDsForDeviceWithSingleSliceT
NEO::DrmQueryTopologyData topologyData = {};
mockDrm->engineInfoQueried = true;
mockDrm->systemInfoQueried = true;
mockDrm->queryTopology(neoDevice->getHardwareInfo(), topologyData);
neoDevice->executionEnvironment->rootDeviceEnvironments[0]->osInterface.reset(new NEO::OSInterface);
@@ -192,6 +193,7 @@ TEST(DebugSessionLinuxi915Test, WhenConvertingThreadIDsForDeviceWithMultipleSlic
NEO::DrmQueryTopologyData topologyData = {};
mockDrm->engineInfoQueried = true;
mockDrm->systemInfoQueried = true;
mockDrm->queryTopology(neoDevice->getHardwareInfo(), topologyData);
neoDevice->executionEnvironment->rootDeviceEnvironments[0]->osInterface.reset(new NEO::OSInterface);
@@ -236,6 +238,7 @@ TEST(DebugSessionLinuxi915Test, GivenDeviceWithSingleSliceWhenCallingAreRequeste
NEO::DrmQueryTopologyData topologyData = {};
mockDrm->engineInfoQueried = true;
mockDrm->systemInfoQueried = true;
mockDrm->queryTopology(neoDevice->getHardwareInfo(), topologyData);
neoDevice->executionEnvironment->rootDeviceEnvironments[0]->osInterface.reset(new NEO::OSInterface);
neoDevice->executionEnvironment->rootDeviceEnvironments[0]->osInterface->setDriverModel(std::unique_ptr<DriverModel>(mockDrm));