mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
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:

committed by
Compute-Runtime-Automation

parent
d63a044e60
commit
4e4560fe91
@ -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();
|
||||
|
Reference in New Issue
Block a user