1- ARG BASE_IMAGE=rocm/dev-ubuntu-22.04:6.4.1-complete
2- ARG HIPBLASLT_BRANCH="aa0bda7b"
3- ARG HIPBLAS_COMMON_BRANCH="9b80ba8e"
4- ARG LEGACY_HIPBLASLT_OPTION=
5- ARG TRITON_BRANCH="e5be006"
6- ARG TRITON_REPO="https://github.com/triton-lang/triton.git"
7- ARG PYTORCH_BRANCH="f717b2af"
8- ARG PYTORCH_VISION_BRANCH="v0.21.0"
1+ ARG BASE_IMAGE=rocm/dev-ubuntu-22.04:7.0-complete
2+ ARG TRITON_BRANCH="f9e5bf54"
3+ ARG TRITON_REPO="https://github.com/ROCm/triton.git"
4+ ARG PYTORCH_BRANCH="b2fb6885"
5+ ARG PYTORCH_VISION_BRANCH="v0.23.0"
96ARG PYTORCH_REPO="https://github.com/ROCm/pytorch.git"
107ARG PYTORCH_VISION_REPO="https://github.com/pytorch/vision.git"
11- ARG FA_BRANCH="1a7f4dfa "
8+ ARG FA_BRANCH="0e60e394 "
129ARG FA_REPO="https://github.com/Dao-AILab/flash-attention.git"
13- ARG AITER_BRANCH="4822e675 "
10+ ARG AITER_BRANCH="2ab9f4cd "
1411ARG AITER_REPO="https://github.com/ROCm/aiter.git"
1512
1613FROM ${BASE_IMAGE} AS base
1714
18- ENV PATH=/opt/rocm/llvm/bin:$PATH
15+ ENV PATH=/opt/rocm/llvm/bin:/opt/rocm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
1916ENV ROCM_PATH=/opt/rocm
2017ENV LD_LIBRARY_PATH=/opt/rocm/lib:/usr/local/lib:
21- ARG PYTORCH_ROCM_ARCH=gfx90a;gfx942;gfx1100;gfx1101;gfx1200;gfx1201
18+ ARG PYTORCH_ROCM_ARCH=gfx90a;gfx942;gfx950; gfx1100;gfx1101;gfx1200;gfx1201
2219ENV PYTORCH_ROCM_ARCH=${PYTORCH_ROCM_ARCH}
20+ ENV AITER_ROCM_ARCH=gfx942;gfx950
2321
2422ARG PYTHON_VERSION=3.12
2523
@@ -45,29 +43,6 @@ RUN apt-get update -y \
4543
4644RUN pip install -U packaging 'cmake<4' ninja wheel 'setuptools<80' pybind11 Cython
4745
48- FROM base AS build_hipblaslt
49- ARG HIPBLASLT_BRANCH
50- ARG HIPBLAS_COMMON_BRANCH
51- # Set to "--legacy_hipblas_direct" for ROCm<=6.2
52- ARG LEGACY_HIPBLASLT_OPTION
53- RUN git clone https://github.com/ROCm/hipBLAS-common.git
54- RUN apt-get remove -y hipblaslt && apt-get autoremove -y && apt-get autoclean -y
55- RUN cd hipBLAS-common \
56- && git checkout ${HIPBLAS_COMMON_BRANCH} \
57- && mkdir build \
58- && cd build \
59- && cmake .. \
60- && make package \
61- && dpkg -i ./*.deb
62- RUN git clone https://github.com/ROCm/hipBLASLt
63- RUN cd hipBLASLt \
64- && git checkout ${HIPBLASLT_BRANCH} \
65- && apt-get install -y llvm-dev \
66- && ./install.sh -dc --architecture ${PYTORCH_ROCM_ARCH} ${LEGACY_HIPBLASLT_OPTION} \
67- && cd build/release \
68- && make package
69- RUN mkdir -p /app/install && cp /app/hipBLASLt/build/release/*.deb /app/hipBLAS-common/build/*.deb /app/install
70-
7146FROM base AS build_triton
7247ARG TRITON_BRANCH
7348ARG TRITON_REPO
@@ -121,13 +96,11 @@ RUN cd aiter \
12196 && git checkout ${AITER_BRANCH} \
12297 && git submodule update --init --recursive \
12398 && pip install -r requirements.txt
124- RUN pip install pyyaml && cd aiter && PREBUILD_KERNELS=1 GPU_ARCHS=gfx942 python3 setup.py bdist_wheel --dist-dir=dist && ls /app/aiter/dist/*.whl
99+ RUN pip install pyyaml && cd aiter && PREBUILD_KERNELS=1 GPU_ARCHS=${AITER_ROCM_ARCH} python3 setup.py bdist_wheel --dist-dir=dist && ls /app/aiter/dist/*.whl
125100RUN mkdir -p /app/install && cp /app/aiter/dist/*.whl /app/install
126101
127102FROM base AS debs
128103RUN mkdir /app/debs
129- RUN --mount=type=bind,from=build_hipblaslt,src=/app/install/,target=/install \
130- cp /install/*.deb /app/debs
131104RUN --mount=type=bind,from=build_triton,src=/app/install/,target=/install \
132105 cp /install/*.whl /app/debs
133106RUN --mount=type=bind,from=build_amdsmi,src=/app/install/,target=/install \
@@ -138,11 +111,6 @@ RUN --mount=type=bind,from=build_aiter,src=/app/install/,target=/install \
138111 cp /install/*.whl /app/debs
139112
140113FROM base AS final
141- RUN --mount=type=bind,from=build_hipblaslt,src=/app/install/,target=/install \
142- dpkg -i /install/*deb \
143- && perl -p -i -e 's/, hipblas-common-dev \([^)]*?\), /, /g' /var/lib/dpkg/status \
144- && perl -p -i -e 's/, hipblaslt-dev \([^)]*?\), /, /g' /var/lib/dpkg/status \
145- && perl -p -i -e 's/, hipblaslt \([^)]*?\), /, /g' /var/lib/dpkg/status
146114RUN --mount=type=bind,from=build_triton,src=/app/install/,target=/install \
147115 pip install /install/*.whl
148116RUN --mount=type=bind,from=build_amdsmi,src=/app/install/,target=/install \
@@ -153,9 +121,6 @@ RUN --mount=type=bind,from=build_aiter,src=/app/install/,target=/install \
153121 pip install /install/*.whl
154122
155123ARG BASE_IMAGE
156- ARG HIPBLAS_COMMON_BRANCH
157- ARG HIPBLASLT_BRANCH
158- ARG LEGACY_HIPBLASLT_OPTION
159124ARG TRITON_BRANCH
160125ARG TRITON_REPO
161126ARG PYTORCH_BRANCH
@@ -167,15 +132,13 @@ ARG FA_REPO
167132ARG AITER_BRANCH
168133ARG AITER_REPO
169134RUN echo "BASE_IMAGE: ${BASE_IMAGE}" > /app/versions.txt \
170- && echo "HIPBLAS_COMMON_BRANCH: ${HIPBLAS_COMMON_BRANCH}" >> /app/versions.txt \
171- && echo "HIPBLASLT_BRANCH: ${HIPBLASLT_BRANCH}" >> /app/versions.txt \
172- && echo "LEGACY_HIPBLASLT_OPTION: ${LEGACY_HIPBLASLT_OPTION}" >> /app/versions.txt \
173135 && echo "TRITON_BRANCH: ${TRITON_BRANCH}" >> /app/versions.txt \
174136 && echo "TRITON_REPO: ${TRITON_REPO}" >> /app/versions.txt \
175137 && echo "PYTORCH_BRANCH: ${PYTORCH_BRANCH}" >> /app/versions.txt \
176138 && echo "PYTORCH_VISION_BRANCH: ${PYTORCH_VISION_BRANCH}" >> /app/versions.txt \
177139 && echo "PYTORCH_REPO: ${PYTORCH_REPO}" >> /app/versions.txt \
178140 && echo "PYTORCH_VISION_REPO: ${PYTORCH_VISION_REPO}" >> /app/versions.txt \
179141 && echo "FA_BRANCH: ${FA_BRANCH}" >> /app/versions.txt \
142+ && echo "FA_REPO: ${FA_REPO}" >> /app/versions.txt \
180143 && echo "AITER_BRANCH: ${AITER_BRANCH}" >> /app/versions.txt \
181144 && echo "AITER_REPO: ${AITER_REPO}" >> /app/versions.txt
0 commit comments