From 69d5732949b8f135bae10f5bf34219b2a66484a8 Mon Sep 17 00:00:00 2001 From: Ruihang Lai Date: Mon, 5 Aug 2024 22:54:06 -0400 Subject: [PATCH] [HotFix] Support ROCm 6.1 package build --- cmake/modules/ROCM.cmake | 1 + src/runtime/rocm/rocm_device_api.cc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cmake/modules/ROCM.cmake b/cmake/modules/ROCM.cmake index 37fcd71646..02c4c73993 100644 --- a/cmake/modules/ROCM.cmake +++ b/cmake/modules/ROCM.cmake @@ -23,6 +23,7 @@ if(ROCM_FOUND) # avoid global retrigger of cmake include_directories(SYSTEM ${ROCM_INCLUDE_DIRS}) add_definitions(-D__HIP_PLATFORM_HCC__=1) + add_definitions(-D__HIP_PLATFORM_AMD__=1) endif(ROCM_FOUND) diff --git a/src/runtime/rocm/rocm_device_api.cc b/src/runtime/rocm/rocm_device_api.cc index e2a5048ca0..c37e9fada5 100644 --- a/src/runtime/rocm/rocm_device_api.cc +++ b/src/runtime/rocm/rocm_device_api.cc @@ -113,7 +113,7 @@ class ROCMDeviceAPI final : public DeviceAPI { case kGcnArch: { hipDeviceProp_t prop; ROCM_CALL(hipGetDeviceProperties(&prop, device.device_id)); - *rv = prop.gcnArch; + *rv = prop.gcnArchName; return; } case kApiVersion: {