mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
fix: correct reporting num subslices per slice in device properties
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
ad3110ff67
commit
468b61b844
@ -981,7 +981,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 = hardwareInfo.gtSystemInfo.SubSliceCount / hardwareInfo.gtSystemInfo.SliceCount;
|
||||
pDeviceProperties->numSubslicesPerSlice = NEO::getNumSubSlicesPerSlice(hardwareInfo);
|
||||
}
|
||||
|
||||
pDeviceProperties->numSlices = hardwareInfo.gtSystemInfo.SliceCount;
|
||||
|
@ -1274,6 +1274,13 @@ TEST_F(MultiSubDeviceCachePropertiesTest, givenDeviceWithSubDevicesWhenQueriedFo
|
||||
}
|
||||
|
||||
TEST_F(DeviceTest, givenDevicePropertiesStructureWhenDevicePropertiesCalledThenAllPropertiesAreAssigned) {
|
||||
|
||||
auto &hwInfo = *neoDevice->getRootDeviceEnvironment().getMutableHardwareInfo();
|
||||
|
||||
hwInfo.gtSystemInfo.SliceCount = 3;
|
||||
hwInfo.gtSystemInfo.SubSliceCount = 5;
|
||||
hwInfo.gtSystemInfo.MaxEuPerSubSlice = 8;
|
||||
|
||||
ze_device_properties_t deviceProperties, devicePropertiesBefore;
|
||||
deviceProperties = {ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES};
|
||||
|
||||
@ -1317,6 +1324,10 @@ TEST_F(DeviceTest, givenDevicePropertiesStructureWhenDevicePropertiesCalledThenA
|
||||
EXPECT_NE(deviceProperties.kernelTimestampValidBits, devicePropertiesBefore.kernelTimestampValidBits);
|
||||
EXPECT_NE(0, memcmp(&deviceProperties.name, &devicePropertiesBefore.name, sizeof(devicePropertiesBefore.name)));
|
||||
EXPECT_NE(deviceProperties.maxMemAllocSize, devicePropertiesBefore.maxMemAllocSize);
|
||||
|
||||
EXPECT_EQ(8u, deviceProperties.numEUsPerSubslice);
|
||||
EXPECT_EQ(2u, deviceProperties.numSubslicesPerSlice);
|
||||
EXPECT_EQ(3u, deviceProperties.numSlices);
|
||||
}
|
||||
|
||||
TEST_F(DeviceTest, givenDevicePropertiesStructureWhenDriverInfoIsEmptyThenDeviceNameTheSameAsInDeviceInfo) {
|
||||
|
Reference in New Issue
Block a user