mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 23:56:39 +08:00
Report numSubslicesPerSlice in device properties based on debug key
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
d851c132d4
commit
1d9bb9b214
@@ -403,7 +403,11 @@ ze_result_t DeviceImp::getProperties(ze_device_properties_t *pDeviceProperties)
|
||||
|
||||
pDeviceProperties->numEUsPerSubslice = hardwareInfo.gtSystemInfo.MaxEuPerSubSlice;
|
||||
|
||||
pDeviceProperties->numSubslicesPerSlice = hardwareInfo.gtSystemInfo.MaxSubSlicesSupported / hardwareInfo.gtSystemInfo.MaxSlicesSupported;
|
||||
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->numSlices = hardwareInfo.gtSystemInfo.SliceCount * ((this->numSubDevices > 0) ? this->numSubDevices : 1);
|
||||
|
||||
|
||||
@@ -404,7 +404,22 @@ TEST_F(DeviceTest, givenDevicePropertiesStructureWhenDevicePropertiesCalledThenA
|
||||
EXPECT_NE(deviceProperties.maxMemAllocSize, devicePropertiesBefore.maxMemAllocSize);
|
||||
}
|
||||
|
||||
TEST_F(DeviceTest, WhenGettingDevicePropertieThenSubslicesPerSubsliceIsBasedOnMaxSubslicesSupported) {
|
||||
TEST_F(DeviceTest, WhenGettingDevicePropertiesThenSubslicesPerSliceIsBasedOnSubslicesSupported) {
|
||||
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(8u, deviceProperties.numSubslicesPerSlice);
|
||||
}
|
||||
|
||||
TEST_F(DeviceTest, GivenDebugApiUsedSetWhenGettingDevicePropertiesThenSubslicesPerSliceIsBasedOnMaxSubslicesSupported) {
|
||||
DebugManagerStateRestore restorer;
|
||||
DebugManager.flags.DebugApiUsed.set(1);
|
||||
ze_device_properties_t deviceProperties;
|
||||
deviceProperties.type = ZE_DEVICE_TYPE_GPU;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user