mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-05-05 22:22:27 +00:00
* build CK only once, use deb package in all subsequent stages * update jenkins file * change prefix for build_CK stage * update writing deb metadata to control file * update ubuntu source for docker, script syntax for deb package metadata * try different way to create deb metadata * clean up DEBIAN before creating one * fix the CI folder names, fix splitK qa * use correct docker in all stages, separate tests for splitK verification and performance * clean old comments, change dir before packaging * use different package syntax * change packaging syntax * package with cmake * remove unnecessary build prefix * get rid of unnecessary paths * change paths during unpacking * change script syntax while unpacking * get rid of unneccesary steps * get rid of comments in the scripts * use double quotes for scripts * add ccache during build, try dpkg -x * pull and install each package separately * use full package names * try to use stashing for packages * change stash/unstash syntax * move unstash out of shell, run tests on any gpu node * unpack each package separately * try re-using existing workspace * merge the build and test stages, only stash ckProfiler * merge the build and test stages, only stash zipped ckProfiler * fix syntax * add GPU check before build and test, rename docker to usual name
94 lines
3.0 KiB
Docker
94 lines
3.0 KiB
Docker
FROM ubuntu:20.04
|
|
|
|
ARG ROCMVERSION=5.2.3
|
|
ARG compiler_version
|
|
|
|
RUN set -xe
|
|
|
|
ARG DEB_ROCM_REPO=http://repo.radeon.com/rocm/apt/.apt_$ROCMVERSION/
|
|
# Add rocm repository
|
|
RUN apt-get update
|
|
RUN apt-get install -y wget gnupg
|
|
RUN wget -qO - http://repo.radeon.com/rocm/rocm.gpg.key | apt-key add -
|
|
RUN sh -c "echo deb [arch=amd64] $DEB_ROCM_REPO ubuntu main > /etc/apt/sources.list.d/rocm.list"
|
|
RUN wget --no-check-certificate -qO - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | apt-key add -
|
|
#RUN sh -c "echo deb https://apt.kitware.com/ubuntu/ bionic main | tee -a /etc/apt/sources.list"
|
|
RUN sh -c "echo deb http://mirrors.kernel.org/ubuntu focal main universe | tee -a /etc/apt/sources.list"
|
|
|
|
# Install dependencies
|
|
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --allow-unauthenticated \
|
|
apt-utils \
|
|
build-essential \
|
|
cmake-data \
|
|
cmake \
|
|
curl \
|
|
git \
|
|
hip-rocclr \
|
|
jq \
|
|
libelf-dev \
|
|
libncurses5-dev \
|
|
libnuma-dev \
|
|
libpthread-stubs0-dev \
|
|
llvm-amdgpu \
|
|
pkg-config \
|
|
python \
|
|
python3 \
|
|
python-dev \
|
|
python3-dev \
|
|
python3-pip \
|
|
software-properties-common \
|
|
rocm-dev \
|
|
rocm-device-libs \
|
|
rocm-cmake \
|
|
vim \
|
|
zlib1g-dev \
|
|
openssh-server \
|
|
clang-format-10 \
|
|
kmod && \
|
|
apt-get clean && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
# Setup ubsan environment to printstacktrace
|
|
RUN ln -s /usr/bin/llvm-symbolizer-3.8 /usr/local/bin/llvm-symbolizer
|
|
ENV UBSAN_OPTIONS=print_stacktrace=1
|
|
|
|
# Install an init system
|
|
RUN wget https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb
|
|
RUN dpkg -i dumb-init_*.deb && rm dumb-init_*.deb
|
|
|
|
ARG PREFIX=/opt/rocm
|
|
# Install packages for processing the performance results
|
|
RUN pip3 install --upgrade pip
|
|
RUN pip3 install sqlalchemy
|
|
RUN pip3 install pymysql
|
|
RUN pip3 install pandas
|
|
RUN pip3 install setuptools-rust
|
|
RUN pip3 install sshtunnel
|
|
# Setup ubsan environment to printstacktrace
|
|
ENV UBSAN_OPTIONS=print_stacktrace=1
|
|
|
|
ENV LC_ALL=C.UTF-8
|
|
ENV LANG=C.UTF-8
|
|
RUN groupadd -f render
|
|
|
|
# Install the new rocm-cmake version
|
|
RUN git clone -b master https://github.com/RadeonOpenCompute/rocm-cmake.git && \
|
|
cd rocm-cmake && mkdir build && cd build && \
|
|
cmake .. && cmake --build . && cmake --build . --target install
|
|
|
|
WORKDIR /
|
|
|
|
ENV compiler_version=$compiler_version
|
|
RUN sh -c "echo compiler version = '$compiler_version'"
|
|
|
|
RUN --mount=type=ssh if [ "$compiler_version" != "release" ]; then \
|
|
git clone -b "$compiler_version" https://github.com/RadeonOpenCompute/llvm-project.git && \
|
|
cd llvm-project && mkdir build && cd build && \
|
|
cmake -DCMAKE_INSTALL_PREFIX=/opt/rocm/llvm -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=1 -DLLVM_TARGETS_TO_BUILD="AMDGPU;X86" -DLLVM_ENABLE_PROJECTS="clang;lld;compiler-rt" ../llvm && \
|
|
make -j 8 ; \
|
|
else echo "using the release compiler"; \
|
|
fi
|
|
|
|
#ENV HIP_CLANG_PATH='/llvm-project/build/bin'
|
|
#RUN sh -c "echo HIP_CLANG_PATH = '$HIP_CLANG_PATH'"
|