fix: calculate subSlicesPerSlice correctly on XeKmd

Populate SliceInfo during topology creation.
Set L0 device props subslicesPerSlice to max
enabled subslice on any slice.

Related-to: NEO-16283

Signed-off-by: Brandon Yates <brandon.yates@intel.com>
This commit is contained in:
Brandon Yates
2025-10-09 14:35:31 +00:00
committed by Compute-Runtime-Automation
parent 232654ca9b
commit 7b27c3668e
25 changed files with 172 additions and 60 deletions

View File

@@ -1057,7 +1057,7 @@ ze_result_t DeviceImp::getProperties(ze_device_properties_t *pDeviceProperties)
if (NEO::debugManager.flags.DebugApiUsed.get() == 1) {
pDeviceProperties->numSubslicesPerSlice = hardwareInfo.gtSystemInfo.MaxSubSlicesSupported / hardwareInfo.gtSystemInfo.MaxSlicesSupported;
} else {
pDeviceProperties->numSubslicesPerSlice = NEO::getNumSubSlicesPerSlice(hardwareInfo);
pDeviceProperties->numSubslicesPerSlice = std::max(NEO::getNumSubSlicesPerSlice(hardwareInfo), NEO::GfxCoreHelper::getHighestEnabledSubSliceOnAnySlice(hardwareInfo) + 1);
}
pDeviceProperties->numSlices = hardwareInfo.gtSystemInfo.SliceCount;

View File

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

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2022-2024 Intel Corporation
* Copyright (C) 2022-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -33,7 +33,7 @@ void DebugApiLinuxPrelimFixture::setUp(NEO::HardwareInfo *hwInfo) {
}
NEO::DrmQueryTopologyData topologyData = {};
mockDrm->systemInfoQueried = true;
mockDrm->queryTopology(neoDevice->getHardwareInfo(), topologyData);
mockDrm->queryTopology(*neoDevice->getRootDeviceEnvironment().getMutableHardwareInfo(), topologyData);
auto &rootDeviceEnvironment = *neoDevice->executionEnvironment->rootDeviceEnvironments[0];
auto gtSystemInfo = &rootDeviceEnvironment.getMutableHardwareInfo()->gtSystemInfo;
for (uint32_t slice = 0; slice < GT_MAX_SLICE; slice++) {
@@ -65,7 +65,7 @@ void DebugApiLinuxMultiDeviceFixture::setUp() {
NEO::DrmQueryTopologyData topologyData = {};
mockDrm->systemInfoQueried = true;
mockDrm->queryTopology(neoDevice->getHardwareInfo(), topologyData);
mockDrm->queryTopology(*neoDevice->getRootDeviceEnvironment().getMutableHardwareInfo(), topologyData);
auto &rootDeviceEnvironment = *neoDevice->getExecutionEnvironment()->rootDeviceEnvironments[0];
auto gtSystemInfo = &rootDeviceEnvironment.getMutableHardwareInfo()->gtSystemInfo;
for (uint32_t slice = 0; slice < GT_MAX_SLICE; slice++) {

View File

@@ -155,7 +155,7 @@ TEST(DebugSessionLinuxi915Test, WhenConvertingThreadIDsForDeviceWithSingleSliceT
NEO::DrmQueryTopologyData topologyData = {};
mockDrm->engineInfoQueried = true;
mockDrm->systemInfoQueried = true;
mockDrm->queryTopology(neoDevice->getHardwareInfo(), topologyData);
mockDrm->queryTopology(*neoDevice->getRootDeviceEnvironment().getMutableHardwareInfo(), topologyData);
neoDevice->executionEnvironment->rootDeviceEnvironments[0]->osInterface.reset(new NEO::OSInterface);
neoDevice->executionEnvironment->rootDeviceEnvironments[0]->osInterface->setDriverModel(std::unique_ptr<DriverModel>(mockDrm));
@@ -209,7 +209,7 @@ TEST(DebugSessionLinuxi915Test, WhenConvertingThreadIDsForDeviceWithMultipleSlic
NEO::DrmQueryTopologyData topologyData = {};
mockDrm->engineInfoQueried = true;
mockDrm->systemInfoQueried = true;
mockDrm->queryTopology(neoDevice->getHardwareInfo(), topologyData);
mockDrm->queryTopology(*neoDevice->getRootDeviceEnvironment().getMutableHardwareInfo(), topologyData);
neoDevice->executionEnvironment->rootDeviceEnvironments[0]->osInterface.reset(new NEO::OSInterface);
neoDevice->executionEnvironment->rootDeviceEnvironments[0]->osInterface->setDriverModel(std::unique_ptr<DriverModel>(mockDrm));
@@ -261,7 +261,7 @@ TEST(DebugSessionLinuxi915Test, GivenDeviceWithSingleSliceWhenCallingAreRequeste
NEO::DrmQueryTopologyData topologyData = {};
mockDrm->engineInfoQueried = true;
mockDrm->systemInfoQueried = true;
mockDrm->queryTopology(neoDevice->getHardwareInfo(), topologyData);
mockDrm->queryTopology(*neoDevice->getRootDeviceEnvironment().getMutableHardwareInfo(), topologyData);
neoDevice->executionEnvironment->rootDeviceEnvironments[0]->osInterface.reset(new NEO::OSInterface);
neoDevice->executionEnvironment->rootDeviceEnvironments[0]->osInterface->setDriverModel(std::unique_ptr<DriverModel>(mockDrm));