From e3a1c7ba939819eaa6f802eca265e57c9cd05127 Mon Sep 17 00:00:00 2001 From: tqchen Date: Fri, 28 Aug 2020 11:16:09 -0700 Subject: [PATCH] [CMAKE] Compatible for ROCm before 3.7 --- cmake/util/FindROCM.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmake/util/FindROCM.cmake b/cmake/util/FindROCM.cmake index cf9524ba57b8..78b242c8bec3 100644 --- a/cmake/util/FindROCM.cmake +++ b/cmake/util/FindROCM.cmake @@ -49,8 +49,13 @@ macro(find_rocm use_rocm) if(__rocm_sdk) set(ROCM_INCLUDE_DIRS ${__rocm_sdk}/include) find_library(ROCM_HIPHCC_LIBRARY amdhip64 ${__rocm_sdk}/lib) + # Backward compatible with before ROCm3.7 + if(NOT ROCM_HIPHCC_LIBRARY) + find_library(ROCM_HIPHCC_LIBRARY hip_hcc ${__rocm_sdk}/lib) + endif() find_library(ROCM_MIOPEN_LIBRARY MIOpen ${__rocm_sdk}/lib) find_library(ROCM_ROCBLAS_LIBRARY rocblas ${__rocm_sdk}/lib) + if(ROCM_HIPHCC_LIBRARY) set(ROCM_FOUND TRUE) endif()