Report max subslices count in L0 device properties
Related-To: LOCI-2080 Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
parent
c4502ccf66
commit
a79f67958e
|
@ -402,7 +402,7 @@ ze_result_t DeviceImp::getProperties(ze_device_properties_t *pDeviceProperties)
|
|||
|
||||
pDeviceProperties->numEUsPerSubslice = hardwareInfo.gtSystemInfo.MaxEuPerSubSlice;
|
||||
|
||||
pDeviceProperties->numSubslicesPerSlice = hardwareInfo.gtSystemInfo.SubSliceCount / hardwareInfo.gtSystemInfo.SliceCount;
|
||||
pDeviceProperties->numSubslicesPerSlice = hardwareInfo.gtSystemInfo.MaxSubSlicesSupported / hardwareInfo.gtSystemInfo.MaxSlicesSupported;
|
||||
|
||||
pDeviceProperties->numSlices = hardwareInfo.gtSystemInfo.SliceCount * ((this->numSubDevices > 0) ? this->numSubDevices : 1);
|
||||
|
||||
|
|
|
@ -404,6 +404,19 @@ TEST_F(DeviceTest, givenDevicePropertiesStructureWhenDevicePropertiesCalledThenA
|
|||
EXPECT_NE(deviceProperties.maxMemAllocSize, devicePropertiesBefore.maxMemAllocSize);
|
||||
}
|
||||
|
||||
TEST_F(DeviceTest, WhenGettingDevicePropertieThenSubslicesPerSubsliceIsBasedOnMaxSubslicesSupported) {
|
||||
ze_device_properties_t deviceProperties;
|
||||
deviceProperties.type = ZE_DEVICE_TYPE_GPU;
|
||||
|
||||
device->getNEODevice()->getRootDeviceEnvironment().getMutableHardwareInfo()->gtSystemInfo.MaxSubSlicesSupported = 48;
|
||||
device->getNEODevice()->getRootDeviceEnvironment().getMutableHardwareInfo()->gtSystemInfo.MaxSlicesSupported = 3;
|
||||
device->getNEODevice()->getRootDeviceEnvironment().getMutableHardwareInfo()->gtSystemInfo.SubSliceCount = 8;
|
||||
device->getNEODevice()->getRootDeviceEnvironment().getMutableHardwareInfo()->gtSystemInfo.SliceCount = 1;
|
||||
device->getProperties(&deviceProperties);
|
||||
|
||||
EXPECT_EQ(16u, deviceProperties.numSubslicesPerSlice);
|
||||
}
|
||||
|
||||
TEST_F(DeviceTest, givenCallToDevicePropertiesThenMaximumMemoryToBeAllocatedIsCorrectlyReturned) {
|
||||
ze_device_properties_t deviceProperties;
|
||||
deviceProperties.maxMemAllocSize = 0;
|
||||
|
|
Loading…
Reference in New Issue