Return correct engines count in device properties

Change-Id: Ic1272973fd0f5340ac3c2ade43f59021f54f424b
Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
This commit is contained in:
Maciej Plewka
2020-05-05 10:10:30 +02:00
committed by sys_ocldev
parent 8fd40b090d
commit 35d9b4365b
6 changed files with 46 additions and 3 deletions

View File

@@ -91,10 +91,20 @@ TEST_F(DeviceTest, givenDeviceWithCopyEngineThenNumAsyncCopyEnginesDevicePropert
deviceProperties.numAsyncCopyEngines = std::numeric_limits<int>::max();
device->getProperties(&deviceProperties);
uint32_t expecteNumOfCopyEngines = device->getNEODevice()->getHardwareInfo().capabilityTable.blitterOperationsSupported ? 1 : 0;
auto expecteNumOfCopyEngines = NEO::HwHelper::getCopyEnginesCount(device->getNEODevice()->getHardwareInfo());
EXPECT_EQ(expecteNumOfCopyEngines, deviceProperties.numAsyncCopyEngines);
}
TEST_F(DeviceTest, givenDeviceWithComputeEngineThenNumAsyncComputeEnginesDevicePropertyIsCorrectlyReturned) {
ze_device_properties_t deviceProperties;
deviceProperties.version = ZE_DEVICE_PROPERTIES_VERSION_CURRENT;
deviceProperties.numAsyncComputeEngines = std::numeric_limits<int>::max();
device->getProperties(&deviceProperties);
auto expecteNumOfComputeEngines = NEO::HwHelper::getEnginesCount(device->getNEODevice()->getHardwareInfo());
EXPECT_EQ(expecteNumOfComputeEngines, deviceProperties.numAsyncComputeEngines);
}
TEST_F(DeviceTest, givenDevicePropertiesStructureWhenDevicePropertiesCalledThenAllPropertiesAreAssigned) {
ze_device_properties_t deviceProperties, devicePropertiesBefore;