From 45132183d6bacb9cf88c2616e626c04275f19a02 Mon Sep 17 00:00:00 2001 From: Jeff Daily Date: Tue, 24 Oct 2023 21:23:52 +0000 Subject: [PATCH 1/2] rename `__HIP_PLATFORM_HCC__` to `__HIP_PLATFORM_AMD__` `__HIP_PLATFORM_HCC__` is deprecated and will be removed in ROCm 6.0. --- cmake/Dependencies.cmake | 2 +- gloo/cuda.cu | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake index 14cbcb1b0..2e0a9da77 100644 --- a/cmake/Dependencies.cmake +++ b/cmake/Dependencies.cmake @@ -141,7 +141,7 @@ if(USE_ROCM) if(HAVE_HIP) include(cmake/Hipify.cmake) list(APPEND HIP_CXX_FLAGS -fPIC) - list(APPEND HIP_CXX_FLAGS -D__HIP_PLATFORM_HCC__=1) + list(APPEND HIP_CXX_FLAGS -D__HIP_PLATFORM_AMD__=1) list(APPEND HIP_CXX_FLAGS -DCUDA_HAS_FP16=1) list(APPEND HIP_CXX_FLAGS -D__HIP_NO_HALF_OPERATORS__=1) list(APPEND HIP_CXX_FLAGS -D__HIP_NO_HALF_CONVERSIONS__=1) diff --git a/gloo/cuda.cu b/gloo/cuda.cu index 616907747..eb492e5e4 100644 --- a/gloo/cuda.cu +++ b/gloo/cuda.cu @@ -45,7 +45,7 @@ CudaStream::CudaStream(int deviceId, cudaStream_t stream) // Create new stream if it wasn't specified if (stream_ == kStreamNotSet) { -#ifndef __HIP_PLATFORM_HCC__ +#ifndef __HIP_PLATFORM_AMD__ int loPri, hiPri; CUDA_CHECK(cudaDeviceGetStreamPriorityRange(&loPri, &hiPri)); CUDA_CHECK(cudaStreamCreateWithPriority( From cb34ba7b1445830a6891e05866fd7bd233c8fb38 Mon Sep 17 00:00:00 2001 From: Jeff Daily Date: Tue, 24 Oct 2023 22:48:03 +0000 Subject: [PATCH 2/2] rename GLOO_HIP_HCC_LIBRARIES GLOO_HIP_LIBRARIES --- cmake/Dependencies.cmake | 2 +- cmake/Hip.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake index 2e0a9da77..ccdaa64da 100644 --- a/cmake/Dependencies.cmake +++ b/cmake/Dependencies.cmake @@ -165,7 +165,7 @@ if(USE_ROCM) # This is needed for library added by hip_add_library (same for hip_add_executable) hip_include_directories(${GLOO_HIP_INCLUDE}) - set(gloo_hip_DEPENDENCY_LIBS ${GLOO_HIP_HCC_LIBRARIES}) + set(gloo_hip_DEPENDENCY_LIBS ${GLOO_HIP_LIBRARIES}) else() message(WARNING "Not compiling with HIP support. Suppress this warning with -DUSE_ROCM=OFF.") diff --git a/cmake/Hip.cmake b/cmake/Hip.cmake index 18a3c075b..70f1c7b3e 100644 --- a/cmake/Hip.cmake +++ b/cmake/Hip.cmake @@ -29,7 +29,7 @@ IF(HIP_FOUND) set(CMAKE_HCC_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG}) set(CMAKE_HCC_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE}) - FIND_LIBRARY(GLOO_HIP_HCC_LIBRARIES ${hip_library_name} HINTS ${ROCM_PATH}/lib) + FIND_LIBRARY(GLOO_HIP_LIBRARIES ${hip_library_name} HINTS ${ROCM_PATH}/lib) ENDIF()