feat: tensile rocm 5.5 patch

This commit is contained in:
2024-09-20 14:35:41 -07:00
parent 9bff3fafb1
commit ae6d8bf9ac
2 changed files with 39 additions and 3 deletions
+14 -3
View File
@@ -5,6 +5,8 @@ FROM ubuntu:22.04 AS base
ARG ROCM_VERSION="5.7.3"
ARG ROCM_APT_CODE_NAME="jammy"
ARG ROCBLAS_BRANCH="release/rocm-rel-5.7"
ARG TENSILE_BRANCH=${ROCBLAS_BRANCH}
ARG TENSILE_PATCH=""
# "gfx803" or "gfx803;gfx900"
ARG ROCBLAS_ARCH="gfx803"
ARG DEBIAN_FRONTEND="noninteractive"
@@ -78,13 +80,22 @@ FROM base AS patched
# Compile and install patched rocBLAS
USER root
WORKDIR /root
RUN git clone -b ${ROCBLAS_BRANCH} https://github.com/ROCmSoftwarePlatform/rocBLAS.git
RUN <<EOF
git clone -b ${ROCBLAS_BRANCH} https://github.com/ROCmSoftwarePlatform/rocBLAS.git
git clone -b ${TENSILE_BRANCH} https://github.com/ROCm/Tensile.git
EOF
COPY patches/ /root/patches/
WORKDIR /root/Tensile
# > https://github.com/ROCm/Tensile/commit/cef9de1070c8a8cfb0c9bdc81564495f9153de05
RUN bash -c "if [[ -n \"${TENSILE_PATCH}\" ]]; then git apply /root/patches/${TENSILE_PATCH}; fi"
WORKDIR /root/rocBLAS
# > https://github.com/xuhuisheng/rocm-build/tree/master/gfx803
RUN rm -rf library/src/blas3/Tensile/Logic/asm_full/r9nano/
RUN sed -i -e 's/rmake.py --install/rmake.py -a="${ROCBLAS_ARCH}" --install/g' install.sh
# > https://github.com/ROCm/Tensile/pull/1897
RUN ./install.sh -a "${ROCBLAS_ARCH}" -d --cmake_install --merge-architectures --no-lazy-library-loading
RUN ./install.sh -a "${ROCBLAS_ARCH}" -d --cmake_install --merge-architectures --no-lazy-library-loading -t /root/Tensile
WORKDIR /root/rocBLAS/build/release
COPY fix-rocblas.sh .