fix(l0debug): windows topology map should always be created

Topology map was only being created when ZET_ENABLE_PROGAM_DEBUGGING was
set.  This was not correct.  Now it is unconditionally created at init,
and debug attach will fail if it is not valid.

Related-to: LOCI-3937

Signed-off-by: Yates, Brandon <brandon.yates@intel.com>
This commit is contained in:
Yates, Brandon
2023-03-22 21:43:29 +00:00
committed by Compute-Runtime-Automation
parent f1c64adb3c
commit 0f6140deb0
4 changed files with 35 additions and 13 deletions

View File

@@ -181,13 +181,12 @@ TEST_F(WddmTests, GivengtSystemInfoSliceInfoHasEnabledSlicesAtHigherIndicesThenE
&hwInfo->gtSystemInfo,
hwInfo->capabilityTable.gpuAddressSpace));
wddm->rootDeviceEnvironment.executionEnvironment.setDebuggingMode(NEO::DebuggingMode::Online);
EXPECT_TRUE(wddm->init());
const auto &topologyMap = wddm->getTopologyMap();
EXPECT_EQ(topologyMap.size(), 1u);
}
TEST_F(WddmTests, GivenProperTopologyDataAndDebugFlagsEnabledWhenInitializingWddmThenExpectTopologyMapCreateAndReturnTrue) {
TEST_F(WddmTests, GivenProperTopologyDataWhenInitializingWddmThenExpectTopologyMapCreateAndReturnTrue) {
VariableBackup<HardwareInfo> backupHwInfo(defaultHwInfo.get());
defaultHwInfo.get()->gtSystemInfo.MaxSlicesSupported = GT_MAX_SLICE;
defaultHwInfo.get()->gtSystemInfo.IsDynamicallyPopulated = true;
@@ -206,13 +205,12 @@ TEST_F(WddmTests, GivenProperTopologyDataAndDebugFlagsEnabledWhenInitializingWdd
&hwInfo->gtSystemInfo,
hwInfo->capabilityTable.gpuAddressSpace));
wddm->rootDeviceEnvironment.executionEnvironment.setDebuggingMode(NEO::DebuggingMode::Online);
EXPECT_TRUE(wddm->init());
const auto &topologyMap = wddm->getTopologyMap();
EXPECT_EQ(topologyMap.size(), 1u);
}
TEST_F(WddmTests, GivenNoSubsliceEnabledAndDebugFlagsEnabledWhenInitializingWddmThenExpectTopologyMapNotCreateAndReturnFalse) {
TEST_F(WddmTests, GivenNoSubsliceEnabledAndDebugFlagsEnabledWhenInitializingWddmThenExpectTopologyMapNotCreated) {
VariableBackup<HardwareInfo> backupHwInfo(defaultHwInfo.get());
defaultHwInfo.get()->gtSystemInfo.MaxSlicesSupported = GT_MAX_SLICE;
defaultHwInfo.get()->gtSystemInfo.SliceCount = 1; // Only one slice enabled
@@ -227,8 +225,7 @@ TEST_F(WddmTests, GivenNoSubsliceEnabledAndDebugFlagsEnabledWhenInitializingWddm
&hwInfo->gtSystemInfo,
hwInfo->capabilityTable.gpuAddressSpace));
wddm->rootDeviceEnvironment.executionEnvironment.setDebuggingMode(NEO::DebuggingMode::Online);
EXPECT_FALSE(wddm->init());
EXPECT_TRUE(wddm->init());
const auto &topologyMap = wddm->getTopologyMap();
EXPECT_TRUE(topologyMap.empty());
}