Correctly return numAsyncCopyEngines in Level Zero

Change-Id: I2dcd9b4ac8082239bfdc48ad7480a50347400ee6
Signed-off: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
This commit is contained in:
Jaime Arteaga
2020-04-09 15:36:44 -07:00
committed by sys_ocldev
parent 0ffa1f4314
commit 1126f6c677
2 changed files with 11 additions and 1 deletions

View File

@@ -85,6 +85,16 @@ TEST_F(DeviceTest, givenKernelPropertiesStructureWhenKernelPropertiesCalledThenA
EXPECT_NE(kernelPropertiesBefore.printfBufferSize, kernelProperties.printfBufferSize);
}
TEST_F(DeviceTest, givenDeviceWithCopyEngineThenNumAsyncCopyEnginesDevicePropertyIsCorrectlyReturned) {
ze_device_properties_t deviceProperties;
deviceProperties.version = ZE_DEVICE_PROPERTIES_VERSION_CURRENT;
deviceProperties.numAsyncCopyEngines = std::numeric_limits<int>::max();
device->getProperties(&deviceProperties);
uint32_t expecteNumOfCopyEngines = device->getNEODevice()->getHardwareInfo().capabilityTable.blitterOperationsSupported ? 1 : 0;
EXPECT_EQ(expecteNumOfCopyEngines, deviceProperties.numAsyncCopyEngines);
}
struct MockMemoryManagerMultiDevice : public MemoryManagerMock {
MockMemoryManagerMultiDevice(NEO::ExecutionEnvironment &executionEnvironment) : MemoryManagerMock(const_cast<NEO::ExecutionEnvironment &>(executionEnvironment)) {}
};