Add cl_device_uuid_khr to getDeviceInfo.

Related-To: NEO-5681

Signed-off-by: Baj, Tomasz <tomasz.baj@intel.com>
This commit is contained in:
Baj, Tomasz
2022-03-28 14:09:31 +00:00
committed by Compute-Runtime-Automation
parent d63a044e60
commit 4e4560fe91
4 changed files with 32 additions and 17 deletions

View File

@ -1042,6 +1042,18 @@ TEST(GetDeviceInfoTest, givenPciBusInfoIsNotAvailableWhenGettingPciBusInfoForDev
ASSERT_EQ(retVal, CL_INVALID_VALUE);
}
TEST(GetDeviceInfo, givenDeviceUuidWhenGettingDeviceInfoThenGenerateDeviceUuid) {
std::array<uint8_t, HwInfoConfig::uuidSize> generateDeviceUuid, deviceUuidKHR;
size_t retSize = 0;
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
auto retVal = device->getDeviceInfo(CL_DEVICE_UUID_KHR, sizeof(deviceUuidKHR), &deviceUuidKHR, &retSize);
ASSERT_EQ(retVal, CL_SUCCESS);
device.get()->getDevice().generateUuid(generateDeviceUuid);
EXPECT_EQ(generateDeviceUuid, deviceUuidKHR);
}
struct DeviceAttributeQueryTest : public ::testing::TestWithParam<uint32_t /*cl_device_info*/> {
void SetUp() override {
param = GetParam();