@@ -319,6 +319,31 @@ get_cache_properties(ze_device_handle_t device) {
319319 return properties;
320320}
321321
322+ std::vector<ze_cache_reservation_ext_desc_t >
323+ get_cache_reservation_properties_ext (ze_device_handle_t device) {
324+ std::vector<ze_device_cache_properties_t > properties;
325+ std::vector<ze_cache_reservation_ext_desc_t > cacheReservationProperties;
326+ uint32_t count = 0 ;
327+ auto device_initial = device;
328+ EXPECT_ZE_RESULT_SUCCESS (zeDeviceGetCacheProperties (device, &count, nullptr ));
329+ properties.resize (count);
330+ cacheReservationProperties.reserve (count);
331+ memset (properties.data (), 0 , sizeof (ze_device_cache_properties_t ) * count);
332+ memset (cacheReservationProperties.data (), 0 ,
333+ sizeof (ze_cache_reservation_ext_desc_t ) * count);
334+ for (auto i = 0 ; i < count; i++) {
335+ properties[i].stype = ZE_STRUCTURE_TYPE_DEVICE_CACHE_PROPERTIES;
336+ cacheReservationProperties[i].stype =
337+ ZE_STRUCTURE_TYPE_CACHE_RESERVATION_EXT_DESC;
338+ properties[i].pNext = &cacheReservationProperties[i];
339+ }
340+
341+ EXPECT_ZE_RESULT_SUCCESS (
342+ zeDeviceGetCacheProperties (device, &count, properties.data ()));
343+ EXPECT_EQ (device, device_initial);
344+ return cacheReservationProperties;
345+ }
346+
322347ze_device_image_properties_t get_image_properties (ze_device_handle_t device) {
323348 ze_device_image_properties_t properties;
324349 memset (&properties, 0 , sizeof (properties));
0 commit comments