Skip to content

Commit 9e33860

Browse files
Jaime ArteagaCompute-Runtime-Automation
authored andcommitted
[L0] Avoid returning zero numSlices when no subDevices present
Change-Id: Ie9d8a2b0bf31acf2daaf97c9272cee16acd36d9c Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
1 parent 28c114e commit 9e33860

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

level_zero/core/source/device_imp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ ze_result_t DeviceImp::getProperties(ze_device_properties_t *pDeviceProperties)
313313

314314
pDeviceProperties->numSubslicesPerSlice = hardwareInfo.gtSystemInfo.SubSliceCount / hardwareInfo.gtSystemInfo.SliceCount;
315315

316-
pDeviceProperties->numSlices = hardwareInfo.gtSystemInfo.SliceCount * this->numSubDevices;
316+
pDeviceProperties->numSlices = hardwareInfo.gtSystemInfo.SliceCount * ((this->numSubDevices > 0) ? this->numSubDevices : 1);
317317

318318
pDeviceProperties->timerResolution = static_cast<uint64_t>(DeviceInfoTable::Map<CL_DEVICE_PROFILING_TIMER_RESOLUTION>::getValue(this->neoDevice->getDeviceInfo()));
319319

0 commit comments

Comments
 (0)