mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-05-14 02:02:46 +00:00
Allow using ROCm release candidate compilers. (#679)
* enable use of rocm5.5 release candidate 4
* upgrade to ROCM5.5 RC5
* try fix the PUB_KEY error, remove the cmake-data package
* upgrade to latest cmake version
* use private dockerhub repo for rocm5.5 rc5
* add missing bracket
[ROCm/composable_kernel commit: bb0b772da9]
This commit is contained in:
37
Dockerfile
37
Dockerfile
@@ -1,6 +1,6 @@
|
||||
FROM ubuntu:20.04
|
||||
|
||||
ARG ROCMVERSION=5.3
|
||||
ARG ROCMVERSION=5.4.3
|
||||
ARG compiler_version="release"
|
||||
ARG compiler_commit=""
|
||||
|
||||
@@ -8,23 +8,27 @@ RUN set -xe
|
||||
|
||||
ARG DEB_ROCM_REPO=http://repo.radeon.com/rocm/apt/.apt_$ROCMVERSION/
|
||||
RUN useradd -rm -d /home/jenkins -s /bin/bash -u 1004 jenkins
|
||||
RUN useradd -rm -d /home/manitera -s /bin/bash -u 1002 manitera
|
||||
# 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 apt-get install -y wget gnupg curl
|
||||
RUN --mount=type=ssh if [ "$ROCMVERSION" != "5.5"]; then \
|
||||
wget -qO - http://repo.radeon.com/rocm/rocm.gpg.key | apt-key add - ; \
|
||||
else sh -c "wget http://artifactory-cdn.amd.com/artifactory/list/amdgpu-deb/amd-nonfree-radeon_20.04-1_all.deb" && \
|
||||
apt update && apt-get install -y ./amd-nonfree-radeon_20.04-1_all.deb && \
|
||||
sh -c 'echo deb [arch=amd64 trusted=yes] http://compute-artifactory.amd.com/artifactory/list/rocm-release-archive-20.04-deb/ 5.5 rel-50 > /etc/apt/sources.list.d/rocm-build.list' && \
|
||||
amdgpu-repo --amdgpu-build=1558725 && DEBIAN_FRONTEND=noninteractive amdgpu-install -y --usecase=rocm ; \
|
||||
fi
|
||||
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 http://mirrors.kernel.org/ubuntu focal main universe | tee -a /etc/apt/sources.list"
|
||||
RUN curl -fsSL https://repo.radeon.com/rocm/rocm.gpg.key | gpg --dearmor -o /etc/apt/trusted.gpg.d/rocm-keyring.gpg
|
||||
|
||||
# Install dependencies
|
||||
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --allow-unauthenticated \
|
||||
apt-utils \
|
||||
build-essential \
|
||||
ccache \
|
||||
cmake-data \
|
||||
cmake \
|
||||
curl \
|
||||
git \
|
||||
hip-rocclr \
|
||||
jq \
|
||||
@@ -45,6 +49,7 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --allow-
|
||||
rocm-device-libs \
|
||||
rocm-cmake \
|
||||
vim \
|
||||
nano \
|
||||
zlib1g-dev \
|
||||
openssh-server \
|
||||
clang-format-10 \
|
||||
@@ -52,6 +57,17 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --allow-
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
#Install latest version of cmake
|
||||
RUN apt purge --auto-remove -y cmake
|
||||
RUN apt update
|
||||
RUN apt install -y software-properties-common lsb-release
|
||||
RUN apt clean all
|
||||
RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null
|
||||
RUN apt-add-repository "deb https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main"
|
||||
RUN apt install -y kitware-archive-keyring
|
||||
RUN rm /etc/apt/trusted.gpg.d/kitware.gpg
|
||||
RUN apt install -y cmake
|
||||
|
||||
# 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
|
||||
@@ -87,12 +103,7 @@ ENV compiler_commit=$compiler_commit
|
||||
RUN sh -c "echo compiler version = '$compiler_version'"
|
||||
RUN sh -c "echo compiler commit = '$compiler_commit'"
|
||||
|
||||
RUN --mount=type=ssh if [ "$compiler_version" = "amd-stg-open" ]; then \
|
||||
sed -i '/$HIP_CLANG_TARGET = chomp($HIP_CLANG_TARGET);/c\ chomp($HIP_CLANG_TARGET);' /opt/rocm/hip/bin/hipcc.pl && \
|
||||
sed -i '/$HIP_CLANG_TARGET = chomp($HIP_CLANG_TARGET);/c\ chomp($HIP_CLANG_TARGET);' /opt/rocm/bin/hipcc.pl; \
|
||||
fi
|
||||
|
||||
RUN --mount=type=ssh if [ "$compiler_version" != "release" ] && [ "$compiler_commit" = "" ]; then \
|
||||
RUN --mount=type=ssh if [ "$compiler_version" != "release" ] && [ "$compiler_version" !=~ ^"rc" ] && [ "$compiler_commit" = "" ]; 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 && \
|
||||
@@ -100,7 +111,7 @@ RUN --mount=type=ssh if [ "$compiler_version" != "release" ] && [ "$compiler_com
|
||||
else echo "using the release compiler"; \
|
||||
fi
|
||||
|
||||
RUN --mount=type=ssh if [ "$compiler_version" != "release" ] && [ "$compiler_commit" != "" ]; then \
|
||||
RUN --mount=type=ssh if [ "$compiler_version" != "release" ] && [ "$compiler_version" !=~ ^"rc" ] && [ "$compiler_commit" != "" ]; then \
|
||||
git clone -b "$compiler_version" https://github.com/RadeonOpenCompute/llvm-project.git && \
|
||||
cd llvm-project && git checkout "$compiler_commit" && echo "checking out commit $compiler_commit" && 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 && \
|
||||
|
||||
31
Jenkinsfile
vendored
31
Jenkinsfile
vendored
@@ -19,12 +19,23 @@ def runShell(String command){
|
||||
|
||||
def getDockerImageName(){
|
||||
def img
|
||||
if (params.COMPILER_COMMIT == ""){
|
||||
img = "${env.CK_DOCKERHUB}:ck_ub20.04_rocm${params.ROCMVERSION}_${params.COMPILER_VERSION}"
|
||||
if (params.ROCMVERSION != "5.5"){
|
||||
if (params.COMPILER_COMMIT == ""){
|
||||
img = "${env.CK_DOCKERHUB}:ck_ub20.04_rocm${params.ROCMVERSION}_${params.COMPILER_VERSION}"
|
||||
}
|
||||
else{
|
||||
def commit = "${params.COMPILER_COMMIT}"[0..6]
|
||||
img = "${env.CK_DOCKERHUB}:ck_ub20.04_rocm${params.ROCMVERSION}_${params.COMPILER_VERSION}_${commit}"
|
||||
}
|
||||
}
|
||||
else{
|
||||
def commit = "${params.COMPILER_COMMIT}"[0..6]
|
||||
img = "${env.CK_DOCKERHUB}:ck_ub20.04_rocm${params.ROCMVERSION}_${params.COMPILER_VERSION}_${commit}"
|
||||
if (params.COMPILER_COMMIT == ""){
|
||||
img = "${env.CK_DOCKERHUB_PRIVATE}:ck_ub20.04_rocm${params.ROCMVERSION}_${params.COMPILER_VERSION}"
|
||||
}
|
||||
else{
|
||||
def commit = "${params.COMPILER_COMMIT}"[0..6]
|
||||
img = "${env.CK_DOCKERHUB_PRIVATE}:ck_ub20.04_rocm${params.ROCMVERSION}_${params.COMPILER_VERSION}_${commit}"
|
||||
}
|
||||
}
|
||||
return img
|
||||
}
|
||||
@@ -49,11 +60,11 @@ def build_compiler(){
|
||||
compiler = '/opt/rocm/bin/hipcc'
|
||||
}
|
||||
else{
|
||||
if (params.COMPILER_VERSION == "release"){
|
||||
compiler = "/opt/rocm/llvm/bin/clang++"
|
||||
if (params.COMPILER_VERSION == "amd-stg-open" || params.COMPILER_COMMIT != ""){
|
||||
compiler = "/llvm-project/build/bin/clang++"
|
||||
}
|
||||
else{
|
||||
compiler = "/llvm-project/build/bin/clang++"
|
||||
compiler = "/opt/rocm/llvm/bin/clang++"
|
||||
}
|
||||
}
|
||||
return compiler
|
||||
@@ -232,7 +243,7 @@ def buildHipClangJob(Map conf=[:]){
|
||||
dockerOpts = dockerOpts + " --env HSA_XNACK=1 "
|
||||
}
|
||||
def dockerArgs = "--build-arg PREFIX=${prefixpath} --build-arg compiler_version='${params.COMPILER_VERSION}' --build-arg compiler_commit='${params.COMPILER_COMMIT}' --build-arg ROCMVERSION='${params.ROCMVERSION}' "
|
||||
if (params.COMPILER_VERSION != "release"){
|
||||
if (params.COMPILER_VERSION == "amd-stg-open" || params.COMPILER_COMMIT != ""){
|
||||
dockerOpts = dockerOpts + " --env HIP_CLANG_PATH='/llvm-project/build/bin' "
|
||||
}
|
||||
|
||||
@@ -287,7 +298,7 @@ def runCKProfiler(Map conf=[:]){
|
||||
dockerOpts = dockerOpts + " --env HSA_XNACK=1 "
|
||||
}
|
||||
def dockerArgs = "--build-arg PREFIX=${prefixpath} --build-arg compiler_version='${params.COMPILER_VERSION}' --build-arg compiler_commit='${params.COMPILER_COMMIT}' --build-arg ROCMVERSION='${params.ROCMVERSION}' "
|
||||
if (params.COMPILER_VERSION != "release"){
|
||||
if (params.COMPILER_VERSION == "amd-stg-open" || params.COMPILER_COMMIT != ""){
|
||||
dockerOpts = dockerOpts + " --env HIP_CLANG_PATH='/llvm-project/build/bin' "
|
||||
}
|
||||
|
||||
@@ -420,7 +431,7 @@ def Build_CK(Map conf=[:]){
|
||||
dockerOpts = dockerOpts + " --env HSA_XNACK=1 "
|
||||
}
|
||||
def dockerArgs = "--build-arg PREFIX=${prefixpath} --build-arg compiler_version='${params.COMPILER_VERSION}' --build-arg compiler_commit='${params.COMPILER_COMMIT}' --build-arg ROCMVERSION='${params.ROCMVERSION}' "
|
||||
if (params.COMPILER_VERSION != "release"){
|
||||
if (params.COMPILER_VERSION == "amd-stg-open" || params.COMPILER_COMMIT != ""){
|
||||
dockerOpts = dockerOpts + " --env HIP_CLANG_PATH='/llvm-project/build/bin' "
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user