mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
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:
committed by
Compute-Runtime-Automation
parent
232654ca9b
commit
7b27c3668e
@@ -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;
|
||||
|
||||
@@ -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++) {
|
||||
|
||||
@@ -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++) {
|
||||
|
||||
@@ -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));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user