From d4a83e01bbde2db4fc4133fb7af70d9b5bbabbec Mon Sep 17 00:00:00 2001 From: Hosang <156028780+hyoon1@users.noreply.github.com> Date: Wed, 1 Oct 2025 17:39:49 -0400 Subject: [PATCH] [ROCm][Build] Add support for AMD Ryzen AI MAX / AI 300 Series (#25908) Signed-off-by: Hosang Yoon Signed-off-by: yewentao256 --- CMakeLists.txt | 2 +- csrc/rocm/attention.cu | 3 ++- docker/Dockerfile.rocm_base | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cbac8b8397fa3..4aa0f84fe2d74 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,7 +37,7 @@ install(CODE "set(CMAKE_INSTALL_LOCAL_ONLY TRUE)" ALL_COMPONENTS) set(PYTHON_SUPPORTED_VERSIONS "3.9" "3.10" "3.11" "3.12" "3.13") # Supported AMD GPU architectures. -set(HIP_SUPPORTED_ARCHS "gfx906;gfx908;gfx90a;gfx942;gfx950;gfx1030;gfx1100;gfx1101;gfx1200;gfx1201") +set(HIP_SUPPORTED_ARCHS "gfx906;gfx908;gfx90a;gfx942;gfx950;gfx1030;gfx1100;gfx1101;gfx1200;gfx1201;gfx1150;gfx1151") # # Supported/expected torch versions for CUDA/ROCm. diff --git a/csrc/rocm/attention.cu b/csrc/rocm/attention.cu index 8d207b24608de..a339c5641bb4a 100644 --- a/csrc/rocm/attention.cu +++ b/csrc/rocm/attention.cu @@ -40,7 +40,8 @@ using __hip_fp8_e5m2 = __hip_fp8_e5m2_fnuz; #define __HIP__FP8MFMA__ #endif -#if defined(__HIPCC__) && (defined(__gfx1100__) || defined(__gfx1101__)) +#if defined(__HIPCC__) && (defined(__gfx1100__) || defined(__gfx1101__) || \ + defined(__gfx1150__) || defined(__gfx1151__)) #define __HIP__GFX11__ #endif diff --git a/docker/Dockerfile.rocm_base b/docker/Dockerfile.rocm_base index 87fcb18b1c037..873c2fbcd4d30 100644 --- a/docker/Dockerfile.rocm_base +++ b/docker/Dockerfile.rocm_base @@ -15,7 +15,7 @@ FROM ${BASE_IMAGE} AS base ENV PATH=/opt/rocm/llvm/bin:/opt/rocm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin ENV ROCM_PATH=/opt/rocm ENV LD_LIBRARY_PATH=/opt/rocm/lib:/usr/local/lib: -ARG PYTORCH_ROCM_ARCH=gfx90a;gfx942;gfx950;gfx1100;gfx1101;gfx1200;gfx1201 +ARG PYTORCH_ROCM_ARCH=gfx90a;gfx942;gfx950;gfx1100;gfx1101;gfx1200;gfx1201;gfx1150;gfx1151 ENV PYTORCH_ROCM_ARCH=${PYTORCH_ROCM_ARCH} ENV AITER_ROCM_ARCH=gfx942;gfx950 @@ -141,4 +141,4 @@ RUN echo "BASE_IMAGE: ${BASE_IMAGE}" > /app/versions.txt \ && echo "FA_BRANCH: ${FA_BRANCH}" >> /app/versions.txt \ && echo "FA_REPO: ${FA_REPO}" >> /app/versions.txt \ && echo "AITER_BRANCH: ${AITER_BRANCH}" >> /app/versions.txt \ - && echo "AITER_REPO: ${AITER_REPO}" >> /app/versions.txt \ No newline at end of file + && echo "AITER_REPO: ${AITER_REPO}" >> /app/versions.txt