Skip to content

Commit faa1815

Browse files
authored
Using ROCm6.3.1 base docker and building hipblas-common (#366)
1 parent 3e1cadb commit faa1815

File tree

2 files changed

+26
-5
lines changed

2 files changed

+26
-5
lines changed

Dockerfile.base

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
ARG BASE_IMAGE=rocm/dev-ubuntu-22.04:6.3-complete
1+
ARG BASE_IMAGE=rocm/dev-ubuntu-22.04:6.3.1-complete
22
ARG HIPBLASLT_BRANCH="4d40e36"
3+
ARG HIPBLAS_COMMON_BRANCH="7c1566b"
34
ARG LEGACY_HIPBLASLT_OPTION=
45
ARG RCCL_BRANCH="648a58d"
56
ARG RCCL_REPO="https://github.com/ROCm/rccl"
@@ -43,15 +44,24 @@ RUN pip install -U packaging cmake ninja wheel setuptools pybind11 Cython
4344

4445
FROM base AS build_hipblaslt
4546
ARG HIPBLASLT_BRANCH
47+
ARG HIPBLAS_COMMON_BRANCH
4648
# Set to "--legacy_hipblas_direct" for ROCm<=6.2
4749
ARG LEGACY_HIPBLASLT_OPTION
50+
RUN git clone https://github.com/ROCm/hipBLAS-common.git
51+
RUN cd hipBLAS-common \
52+
&& git checkout ${HIPBLAS_COMMON_BRANCH} \
53+
&& mkdir build \
54+
&& cd build \
55+
&& cmake .. \
56+
&& make package \
57+
&& dpkg -i ./*.deb
4858
RUN git clone https://github.com/ROCm/hipBLASLt
4959
RUN cd hipBLASLt \
5060
&& git checkout ${HIPBLASLT_BRANCH} \
5161
&& ./install.sh -d --architecture ${PYTORCH_ROCM_ARCH} ${LEGACY_HIPBLASLT_OPTION} \
5262
&& cd build/release \
5363
&& make package
54-
RUN mkdir -p /app/install && cp /app/hipBLASLt/build/release/*.deb /app/install
64+
RUN mkdir -p /app/install && cp /app/hipBLASLt/build/release/*.deb /app/hipBLAS-common/build/*.deb /app/install
5565

5666
FROM base AS build_rccl
5767
ARG RCCL_BRANCH
@@ -133,6 +143,7 @@ ARG PYTORCH_VISION_REPO
133143
ARG FA_BRANCH
134144
ARG FA_REPO
135145
RUN echo "BASE_IMAGE: ${BASE_IMAGE}" > /app/versions.txt \
146+
&& echo "HIPBLAS_COMMON_BRANCH: ${HIPBLAS_COMMON_BRANCH}" >> /app/versions.txt \
136147
&& echo "HIPBLASLT_BRANCH: ${HIPBLASLT_BRANCH}" >> /app/versions.txt \
137148
&& echo "LEGACY_HIPBLASLT_OPTION: ${LEGACY_HIPBLASLT_OPTION}" >> /app/versions.txt \
138149
&& echo "RCCL_BRANCH: ${RCCL_BRANCH}" >> /app/versions.txt \
@@ -144,4 +155,4 @@ RUN echo "BASE_IMAGE: ${BASE_IMAGE}" > /app/versions.txt \
144155
&& echo "PYTORCH_REPO: ${PYTORCH_REPO}" >> /app/versions.txt \
145156
&& echo "PYTORCH_VISION_REPO: ${PYTORCH_VISION_REPO}" >> /app/versions.txt \
146157
&& echo "FA_BRANCH: ${FA_BRANCH}" >> /app/versions.txt \
147-
&& echo "FA_REPO: ${FA_REPO}" >> /app/versions.txt
158+
&& echo "FA_REPO: ${FA_REPO}" >> /app/versions.txt

Dockerfile.base_navi

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
ARG BASE_IMAGE=rocm/dev-ubuntu-22.04:6.3-complete
1+
ARG BASE_IMAGE=rocm/dev-ubuntu-22.04:6.3.1-complete
22
ARG HIPBLASLT_BRANCH="4d40e36"
3+
ARG HIPBLAS_COMMON_BRANCH="7c1566b"
34
ARG LEGACY_HIPBLASLT_OPTION=
45
ARG RCCL_BRANCH="648a58d"
56
ARG RCCL_REPO="https://github.com/ROCm/rccl"
@@ -43,13 +44,21 @@ FROM base AS build_hipblaslt
4344
ARG HIPBLASLT_BRANCH
4445
# Set to "--legacy_hipblas_direct" for ROCm<=6.2
4546
ARG LEGACY_HIPBLASLT_OPTION
47+
RUN git clone https://github.com/ROCm/hipBLAS-common.git
48+
RUN cd hipBLAS-common \
49+
&& git checkout ${HIPBLAS_COMMON_BRANCH} \
50+
&& mkdir build \
51+
&& cd build \
52+
&& cmake .. \
53+
&& make package \
54+
&& dpkg -i ./*.deb
4655
RUN git clone https://github.com/ROCm/hipBLASLt
4756
RUN cd hipBLASLt \
4857
&& git checkout ${HIPBLASLT_BRANCH} \
4958
&& ./install.sh -d --architecture ${PYTORCH_ROCM_ARCH} ${LEGACY_HIPBLASLT_OPTION} \
5059
&& cd build/release \
5160
&& make package
52-
RUN mkdir -p /app/install && cp /app/hipBLASLt/build/release/*.deb /app/install
61+
RUN mkdir -p /app/install && cp /app/hipBLASLt/build/release/*.deb /app/hipBLAS-common/build/*.deb /app/install
5362

5463
FROM base AS build_rccl
5564
ARG RCCL_BRANCH
@@ -121,6 +130,7 @@ ARG PYTORCH_VISION_BRANCH
121130
ARG PYTORCH_REPO
122131
ARG PYTORCH_VISION_REPO
123132
RUN echo "BASE_IMAGE: ${BASE_IMAGE}" > /app/versions.txt \
133+
&& echo "HIPBLAS_COMMON_BRANCH: ${HIPBLAS_COMMON_BRANCH}" >> /app/versions.txt \
124134
&& echo "HIPBLASLT_BRANCH: ${HIPBLASLT_BRANCH}" >> /app/versions.txt \
125135
&& echo "LEGACY_HIPBLASLT_OPTION: ${LEGACY_HIPBLASLT_OPTION}" >> /app/versions.txt \
126136
&& echo "RCCL_BRANCH: ${RCCL_BRANCH}" >> /app/versions.txt \

0 commit comments

Comments
 (0)