[MIGraphX] update the MIGraphX version used in ORT to rocm-5.4.0 (#14184)

### Description
Update the MIGraphX version used in ORT to rocm-5.4.0

### Motivation and Context
The previous branch migraphx_for_ort has stopped updating, it is too far
away from the MIgraphX latest release branch. More discussion here:
https://github.com/microsoft/onnxruntime/issues/14126#issuecomment-1373201049

Co-authored-by: peixuanzuo <peixuanzuo@linmif39a000004.zvflicr54joexhdgnhvmxrxygg.phxx.internal.cloudapp.net>
This commit is contained in:
PeixuanZuo 2023-01-10 13:40:25 +08:00 committed by GitHub
parent 6463f4383b
commit 33367fa2dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 5 deletions

View file

@ -10,6 +10,8 @@ FROM ubuntu:20.04
ARG ONNXRUNTIME_REPO=https://github.com/Microsoft/onnxruntime
ARG ONNXRUNTIME_BRANCH=main
ARG ROCM_VERSION=5.4
# MIGraphX version should be the same as ROCm version
ARG MIGRAPHX_VERSION=rocm-5.4.0
ENV DEBIAN_FRONTEND noninteractive
ENV MIGRAPHX_DISABLE_FAST_GELU=1
@ -26,7 +28,7 @@ RUN apt-get update && apt-get install -y gnupg2 --no-install-recommends curl &&
RUN apt-get update &&\
apt-get install -y sudo git bash build-essential rocm-dev python3-dev python3-pip miopen-hip \
rocblas half aria2 libnuma-dev
rocblas half aria2 libnuma-dev pkg-config
RUN aria2c -q -d /tmp -o cmake-3.24.3-linux-x86_64.tar.gz \
https://github.com/Kitware/CMake/releases/download/v3.24.3/cmake-3.24.3-linux-x86_64.tar.gz &&\
@ -39,7 +41,7 @@ ENV PATH /opt/miniconda/bin:/code/cmake-3.24.3-linux-x86_64/bin:${PATH}
# Install MIGraphX from source
RUN mkdir -p /migraphx
RUN cd /migraphx && git clone --depth=1 --branch migraphx_for_ort https://github.com/ROCmSoftwarePlatform/AMDMIGraphX src
RUN cd /migraphx && git clone --depth=1 --branch ${MIGRAPHX_VERSION} https://github.com/ROCmSoftwarePlatform/AMDMIGraphX src
RUN cd /migraphx && rbuild package --cxx /opt/rocm/llvm/bin/clang++ -d /migraphx/deps -B /migraphx/build -S /migraphx/src/ -DPYTHON_EXECUTABLE=/usr/bin/python3
RUN dpkg -i /migraphx/build/*.deb
RUN rm -rf /migraphx

View file

@ -1,5 +1,8 @@
FROM rocm/pytorch:rocm5.4_ubuntu20.04_py3.7_pytorch_1.12.1
# MIGraphX version should be the same as ROCm version
ARG MIGRAPHX_VERSION=rocm-5.4.0
ENV DEBIAN_FRONTEND noninteractive
ENV MIGRAPHX_DISABLE_FAST_GELU=1
@ -21,8 +24,6 @@ RUN cd /opt/mpi_install/ucx/build &&\
make -j $(nproc) &&\
make install
RUN apt-get update &&\
apt-get install -y half libnuma-dev
@ -31,7 +32,7 @@ RUN pip3 install https://github.com/RadeonOpenCompute/rbuild/archive/master.tar.
# Install MIGraphX from source
RUN mkdir -p /migraphx
RUN cd /migraphx && git clone --depth=1 --branch migraphx_for_ort https://github.com/ROCmSoftwarePlatform/AMDMIGraphX src
RUN cd /migraphx && git clone --depth=1 --branch ${MIGRAPHX_VERSION} https://github.com/ROCmSoftwarePlatform/AMDMIGraphX src
RUN cd /migraphx && rbuild package --cxx /opt/rocm/llvm/bin/clang++ -d /migraphx/deps -B /migraphx/build -S /migraphx/src/ -DPYTHON_EXECUTABLE=/usr/bin/python3
RUN dpkg -i /migraphx/build/*.deb
RUN rm -rf /migraphx