1
- ARG BASE_IMAGE=rocm/dev-ubuntu-22.04:6.3 .1-complete
2
- ARG HIPBLASLT_BRANCH="db8e93b4 "
3
- ARG HIPBLAS_COMMON_BRANCH="7c1566b "
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
4
ARG LEGACY_HIPBLASLT_OPTION=
5
- ARG RCCL_BRANCH="648a58d"
6
- ARG RCCL_REPO="https://github.com/ROCm/rccl"
7
5
ARG TRITON_BRANCH="e5be006"
8
6
ARG TRITON_REPO="https://github.com/triton-lang/triton.git"
9
- ARG PYTORCH_BRANCH="295f2ed4 "
7
+ ARG PYTORCH_BRANCH="f717b2af "
10
8
ARG PYTORCH_VISION_BRANCH="v0.21.0"
11
- ARG PYTORCH_REPO="https://github.com/pytorch /pytorch.git"
9
+ ARG PYTORCH_REPO="https://github.com/ROCm /pytorch.git"
12
10
ARG PYTORCH_VISION_REPO="https://github.com/pytorch/vision.git"
13
11
ARG FA_BRANCH="1a7f4dfa"
14
12
ARG FA_REPO="https://github.com/Dao-AILab/flash-attention.git"
15
- ARG AITER_BRANCH="916bf3c "
13
+ ARG AITER_BRANCH="4822e675 "
16
14
ARG AITER_REPO="https://github.com/ROCm/aiter.git"
17
15
18
16
FROM ${BASE_IMAGE} AS base
@@ -45,14 +43,15 @@ RUN apt-get update -y \
45
43
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python${PYTHON_VERSION} \
46
44
&& python3 --version && python3 -m pip --version
47
45
48
- RUN pip install -U packaging 'cmake<4' ninja wheel setuptools pybind11 Cython
46
+ RUN pip install -U packaging 'cmake<4' ninja wheel ' setuptools<80' pybind11 Cython
49
47
50
48
FROM base AS build_hipblaslt
51
49
ARG HIPBLASLT_BRANCH
52
50
ARG HIPBLAS_COMMON_BRANCH
53
51
# Set to "--legacy_hipblas_direct" for ROCm<=6.2
54
52
ARG LEGACY_HIPBLASLT_OPTION
55
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
56
55
RUN cd hipBLAS-common \
57
56
&& git checkout ${HIPBLAS_COMMON_BRANCH} \
58
57
&& mkdir build \
@@ -69,24 +68,17 @@ RUN cd hipBLASLt \
69
68
&& make package
70
69
RUN mkdir -p /app/install && cp /app/hipBLASLt/build/release/*.deb /app/hipBLAS-common/build/*.deb /app/install
71
70
72
- FROM base AS build_rccl
73
- ARG RCCL_BRANCH
74
- ARG RCCL_REPO
75
- RUN git clone ${RCCL_REPO}
76
- RUN cd rccl \
77
- && git checkout ${RCCL_BRANCH} \
78
- && ./install.sh -p --amdgpu_targets ${PYTORCH_ROCM_ARCH}
79
- RUN mkdir -p /app/install && cp /app/rccl/build/release/*.deb /app/install
80
-
81
71
FROM base AS build_triton
82
72
ARG TRITON_BRANCH
83
73
ARG TRITON_REPO
84
74
RUN git clone ${TRITON_REPO}
85
75
RUN cd triton \
86
76
&& git checkout ${TRITON_BRANCH} \
87
- && cd python \
88
- && python3 setup.py bdist_wheel --dist-dir=dist
89
- RUN mkdir -p /app/install && cp /app/triton/python/dist/*.whl /app/install
77
+ && if [ ! -f setup.py ]; then cd python; fi \
78
+ && python3 setup.py bdist_wheel --dist-dir=dist \
79
+ && mkdir -p /app/install && cp dist/*.whl /app/install
80
+ RUN if [ -d triton/python/triton_kernels ]; then pip install build && cd triton/python/triton_kernels \
81
+ && python3 -m build --wheel && cp dist/*.whl /app/install; fi
90
82
91
83
FROM base AS build_amdsmi
92
84
RUN cd /opt/rocm/share/amd_smi \
@@ -132,15 +124,25 @@ RUN cd aiter \
132
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
133
125
RUN mkdir -p /app/install && cp /app/aiter/dist/*.whl /app/install
134
126
127
+ FROM base AS debs
128
+ RUN mkdir /app/debs
129
+ RUN --mount=type=bind,from=build_hipblaslt,src=/app/install/,target=/install \
130
+ cp /install/*.deb /app/debs
131
+ RUN --mount=type=bind,from=build_triton,src=/app/install/,target=/install \
132
+ cp /install/*.whl /app/debs
133
+ RUN --mount=type=bind,from=build_amdsmi,src=/app/install/,target=/install \
134
+ cp /install/*.whl /app/debs
135
+ RUN --mount=type=bind,from=build_pytorch,src=/app/install/,target=/install \
136
+ cp /install/*.whl /app/debs
137
+ RUN --mount=type=bind,from=build_aiter,src=/app/install/,target=/install \
138
+ cp /install/*.whl /app/debs
139
+
135
140
FROM base AS final
136
141
RUN --mount=type=bind,from=build_hipblaslt,src=/app/install/,target=/install \
137
142
dpkg -i /install/*deb \
138
- && sed -i 's/, hipblaslt-dev \(.*\), hipcub-dev/, hipcub-dev/g' /var/lib/dpkg/status \
139
- && sed -i 's/, hipblaslt \(.*\), hipfft/, hipfft/g' /var/lib/dpkg/status
140
- RUN --mount=type=bind,from=build_rccl,src=/app/install/,target=/install \
141
- dpkg -i /install/*deb \
142
- && sed -i 's/, rccl-dev \(.*\), rocalution/, rocalution/g' /var/lib/dpkg/status \
143
- && sed -i 's/, rccl \(.*\), rocalution/, rocalution/g' /var/lib/dpkg/status
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
144
146
RUN --mount=type=bind,from=build_triton,src=/app/install/,target=/install \
145
147
pip install /install/*.whl
146
148
RUN --mount=type=bind,from=build_amdsmi,src=/app/install/,target=/install \
@@ -154,8 +156,6 @@ ARG BASE_IMAGE
154
156
ARG HIPBLAS_COMMON_BRANCH
155
157
ARG HIPBLASLT_BRANCH
156
158
ARG LEGACY_HIPBLASLT_OPTION
157
- ARG RCCL_BRANCH
158
- ARG RCCL_REPO
159
159
ARG TRITON_BRANCH
160
160
ARG TRITON_REPO
161
161
ARG PYTORCH_BRANCH
@@ -170,8 +170,6 @@ RUN echo "BASE_IMAGE: ${BASE_IMAGE}" > /app/versions.txt \
170
170
&& echo "HIPBLAS_COMMON_BRANCH: ${HIPBLAS_COMMON_BRANCH}" >> /app/versions.txt \
171
171
&& echo "HIPBLASLT_BRANCH: ${HIPBLASLT_BRANCH}" >> /app/versions.txt \
172
172
&& echo "LEGACY_HIPBLASLT_OPTION: ${LEGACY_HIPBLASLT_OPTION}" >> /app/versions.txt \
173
- && echo "RCCL_BRANCH: ${RCCL_BRANCH}" >> /app/versions.txt \
174
- && echo "RCCL_REPO: ${RCCL_REPO}" >> /app/versions.txt \
175
173
&& echo "TRITON_BRANCH: ${TRITON_BRANCH}" >> /app/versions.txt \
176
174
&& echo "TRITON_REPO: ${TRITON_REPO}" >> /app/versions.txt \
177
175
&& echo "PYTORCH_BRANCH: ${PYTORCH_BRANCH}" >> /app/versions.txt \
@@ -180,4 +178,4 @@ RUN echo "BASE_IMAGE: ${BASE_IMAGE}" > /app/versions.txt \
180
178
&& echo "PYTORCH_VISION_REPO: ${PYTORCH_VISION_REPO}" >> /app/versions.txt \
181
179
&& echo "FA_BRANCH: ${FA_BRANCH}" >> /app/versions.txt \
182
180
&& echo "AITER_BRANCH: ${AITER_BRANCH}" >> /app/versions.txt \
183
- && echo "AITER_REPO: ${AITER_REPO}" >> /app/versions.txt
181
+ && echo "AITER_REPO: ${AITER_REPO}" >> /app/versions.txt
0 commit comments