diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 14ba80eed5..db7ebea7b7 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -283,15 +283,19 @@ jobs: {name: None, var: ''}, {name: L0, var: '-DUR_BUILD_ADAPTER_L0=ON'} ] - # TODO: building level zero loader on windows-2019 is currently broken - exclude: - - os: 'windows-2019' - adapter: {name: L0, var: '-DUR_BUILD_ADAPTER_L0=ON'} build_type: [Debug, Release] compiler: [{c: cl, cxx: cl}, {c: clang-cl, cxx: clang-cl}] include: - compiler: {c: clang-cl, cxx: clang-cl} toolset: "-T ClangCL" + + # TODO: building level zero loader on windows-2019 and clang-cl.exe is currently broken + exclude: + - os: 'windows-2019' + adapter: {name: L0, var: '-DUR_BUILD_ADAPTER_L0=ON'} + - adapter: {name: L0, var: '-DUR_BUILD_ADAPTER_L0=ON'} + compiler: {c: clang-cl.exe, cxx: clang-cl.exe} + runs-on: ${{matrix.os}} steps: diff --git a/source/adapters/hip/memory.cpp b/source/adapters/hip/memory.cpp index 3083d47744..899dad5674 100644 --- a/source/adapters/hip/memory.cpp +++ b/source/adapters/hip/memory.cpp @@ -273,8 +273,12 @@ UR_APIEXPORT ur_result_t UR_APICALL urMemGetInfo(ur_mem_handle_t hMemory, UR_CHECK_ERROR(hipMemGetAddressRange(&BasePtr, &AllocSize, Mem.Ptr)); return AllocSize; } else if constexpr (std::is_same_v) { +#if HIP_VERSION < 50600000 + throw UR_RESULT_ERROR_UNSUPPORTED_FEATURE; +#else HIP_ARRAY3D_DESCRIPTOR ArrayDescriptor; - UR_CHECK_ERROR(hipArray3DGetDescriptor(&ArrayDescriptor, Mem.Array)); + UR_CHECK_ERROR( + hipArray3DGetDescriptor(&ArrayDescriptor, Mem.getArray())); const auto PixelSizeBytes = GetHipFormatPixelSize(ArrayDescriptor.Format) * ArrayDescriptor.NumChannels; @@ -284,6 +288,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urMemGetInfo(ur_mem_handle_t hMemory, (ArrayDescriptor.Height ? ArrayDescriptor.Height : 1) * (ArrayDescriptor.Depth ? ArrayDescriptor.Depth : 1); return ImageSizeBytes; +#endif } else { static_assert(ur_always_false_t, "Not exhaustive visitor!"); } @@ -535,10 +540,13 @@ UR_APIEXPORT ur_result_t UR_APICALL urMemImageGetInfo(ur_mem_handle_t hMemory, UrReturnHelper ReturnValue(propSize, pPropValue, pPropSizeRet); try { - HIP_ARRAY3D_DESCRIPTOR ArrayInfo; +#if HIP_VERSION >= 50600000 UR_CHECK_ERROR(hipArray3DGetDescriptor( - &ArrayInfo, std::get(hMemory->Mem).Array)); + &ArrayInfo, std::get(hMemory->Mem).getArray())); +#else + return UR_RESULT_ERROR_UNSUPPORTED_FEATURE; +#endif const auto hip2urFormat = [](hipArray_Format HipFormat) -> ur_image_channel_type_t {