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: {