@@ -274,7 +274,12 @@ UR_APIEXPORT ur_result_t UR_APICALL urMemGetInfo(ur_mem_handle_t hMemory,
274
274
return AllocSize;
275
275
} else if constexpr (std::is_same_v<T, SurfaceMem>) {
276
276
HIP_ARRAY3D_DESCRIPTOR ArrayDescriptor;
277
- UR_CHECK_ERROR (hipArray3DGetDescriptor (&ArrayDescriptor, Mem.Array ));
277
+ #if HIP_VERSION_MAJOR >= 5 && HIP_VERSION_MINOR >= 6
278
+ UR_CHECK_ERROR (
279
+ hipArray3DGetDescriptor (&ArrayDescriptor, Mem.getArray ()));
280
+ #else
281
+ return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
282
+ #endif
278
283
const auto PixelSizeBytes =
279
284
GetHipFormatPixelSize (ArrayDescriptor.Format ) *
280
285
ArrayDescriptor.NumChannels ;
@@ -535,10 +540,13 @@ UR_APIEXPORT ur_result_t UR_APICALL urMemImageGetInfo(ur_mem_handle_t hMemory,
535
540
UrReturnHelper ReturnValue (propSize, pPropValue, pPropSizeRet);
536
541
537
542
try {
538
-
539
543
HIP_ARRAY3D_DESCRIPTOR ArrayInfo;
544
+ #if HIP_VERSION_MAJOR >= 5 && HIP_VERSION_MINOR >= 6
540
545
UR_CHECK_ERROR (hipArray3DGetDescriptor (
541
- &ArrayInfo, std::get<SurfaceMem>(hMemory->Mem ).Array ));
546
+ &ArrayInfo, std::get<SurfaceMem>(hMemory->Mem ).getArray ()));
547
+ #else
548
+ return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
549
+ #endif
542
550
543
551
const auto hip2urFormat =
544
552
[](hipArray_Format HipFormat) -> ur_image_channel_type_t {
0 commit comments