feat: tensile rocm 5.5 patch
This commit is contained in:
+14
-3
@@ -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 .
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
diff --git a/Tensile/TensileCreateLibrary.py b/Tensile/TensileCreateLibrary.py
|
||||
index 308d61fd..4037ec7c 100644
|
||||
--- a/Tensile/TensileCreateLibrary.py
|
||||
+++ b/Tensile/TensileCreateLibrary.py
|
||||
@@ -1078,13 +1078,18 @@ def generateLogicDataAndSolutions(logicFiles, args):
|
||||
# logicData[problemType] = []
|
||||
# logicData[problemType].append((scheduleName, deviceNames, \
|
||||
# solutionsForSchedule, indexOrder, exactLogic, rangeLogic ))
|
||||
-
|
||||
+ (archs, _) = splitArchs()
|
||||
if globalParameters["SeparateArchitectures"] or globalParameters["LazyLibraryLoading"]:
|
||||
if "fallback" in masterLibraries.keys():
|
||||
for key, value in masterLibraries.items():
|
||||
if key != "fallback":
|
||||
value.merge(deepcopy(masterLibraries["fallback"]))
|
||||
-
|
||||
+ for archName in archs:
|
||||
+ archName = archName.split('-', 1)[0]
|
||||
+ if archName not in masterLibraries:
|
||||
+ print1("Using fallback for arch: " + archName)
|
||||
+ masterLibraries[archName] = deepcopy(masterLibraries["fallback"])
|
||||
+ masterLibraries[archName].version = args.version
|
||||
masterLibraries.pop("fallback")
|
||||
|
||||
for _, masterLibrary in masterLibraries.items():
|
||||
Reference in New Issue
Block a user