mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-04-20 06:49:15 +00:00
Enable sccache in the default docker and CI. (#1009)
* replace ccache with sccache, pin package versions * put ccache back temporarily to avoid breaking other CI jobs * add sccashe_wrapper.sh script * fix the package version syntax * fix the pymysql package issue * run sccache_wrapper before build if ccache server found * set the paths before calling the sccache_wrapper * use /tmp instead of /usr/local for cache * try using sccache --start-server instead of wrapper * try using redis server with sccache * define SCCACHE_REDIS * add redis and ping packages, and redis port * use the new sccache redis server * do not use sccache with staging compiler * fix the condition syntax * add stunnel to redis * add tunnel verification * separate caches for different architectures * fix syntax for the cache tag * quse double brackets for conditions * add bash line to the script * add a switch for sccache and only use it in build stage * run check_host function when enabling sccache * fix the invocation tags for sccache * fix groovy syntax * set the invocation tag in groovy * disable sccache in clang-format stage * try another syntax for invocation tags * use local sccache server if can't connect to redis * fix script syntax * update README * refresh readme * readme updates * remove the timing and verification caveat from readme --------- Co-authored-by: Lisa Delaney <lisa.delaney@amd.com>
This commit is contained in:
22
Dockerfile
22
Dockerfile
@@ -26,25 +26,37 @@ RUN wget -qO - http://repo.radeon.com/rocm/rocm.gpg.key | apt-key add - && \
|
||||
RUN sh -c "echo deb http://mirrors.kernel.org/ubuntu focal main universe | tee -a /etc/apt/sources.list"
|
||||
RUN amdgpu-install -y --usecase=rocm --no-dkms
|
||||
|
||||
## Sccache binary built from source for ROCm
|
||||
ARG SCCACHE_REPO_URL=http://compute-artifactory.amd.com/artifactory/rocm-generic-experimental/rocm-sccache
|
||||
ENV SCCACHE_INSTALL_LOCATION=/usr/local/.cargo/bin
|
||||
RUN mkdir -p ${SCCACHE_INSTALL_LOCATION} && \
|
||||
curl ${SCCACHE_REPO_URL}/portable/0.2.16/sccache-0.2.16-alpha.1-rocm --output ${SCCACHE_INSTALL_LOCATION}/sccache && \
|
||||
chmod +x ${SCCACHE_INSTALL_LOCATION}/sccache
|
||||
ENV PATH=$PATH:${SCCACHE_INSTALL_LOCATION}
|
||||
|
||||
# Install dependencies
|
||||
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --allow-unauthenticated \
|
||||
build-essential \
|
||||
ccache \
|
||||
cmake \
|
||||
ccache \
|
||||
git \
|
||||
hip-rocclr \
|
||||
iputils-ping \
|
||||
jq \
|
||||
libelf-dev \
|
||||
libncurses5-dev \
|
||||
libnuma-dev \
|
||||
libpthread-stubs0-dev \
|
||||
llvm-amdgpu \
|
||||
net-tools \
|
||||
pkg-config \
|
||||
python \
|
||||
python3 \
|
||||
python3-dev \
|
||||
python3-pip \
|
||||
redis \
|
||||
sshpass \
|
||||
stunnel \
|
||||
software-properties-common \
|
||||
vim \
|
||||
nano \
|
||||
@@ -62,7 +74,7 @@ RUN gunzip /usr/local/bin/ninja.gz
|
||||
RUN chmod a+x /usr/local/bin/ninja
|
||||
RUN git clone https://github.com/nico/ninjatracing.git
|
||||
# Update the cmake to the latest version
|
||||
RUN pip install --upgrade cmake
|
||||
RUN pip install --upgrade cmake==3.27.5
|
||||
|
||||
# Setup ubsan environment to printstacktrace
|
||||
RUN ln -s /usr/bin/llvm-symbolizer-3.8 /usr/local/bin/llvm-symbolizer
|
||||
@@ -77,9 +89,9 @@ ARG PREFIX=/opt/rocm
|
||||
RUN pip3 install --upgrade pip
|
||||
RUN pip3 install sqlalchemy==1.4.46
|
||||
RUN pip3 install pymysql
|
||||
RUN pip3 install pandas
|
||||
RUN pip3 install pandas==2.0.3
|
||||
RUN pip3 install setuptools-rust
|
||||
RUN pip3 install sshtunnel
|
||||
RUN pip3 install sshtunnel==0.4.0
|
||||
# Setup ubsan environment to printstacktrace
|
||||
ENV UBSAN_OPTIONS=print_stacktrace=1
|
||||
|
||||
@@ -115,6 +127,8 @@ RUN if [ "$compiler_version" = "amd-stg-open" ] && [ "$compiler_commit" != "" ];
|
||||
else echo "using the release compiler"; \
|
||||
fi
|
||||
|
||||
#clean-up the deb package
|
||||
RUN sh -c "rm -rf amdgpu-install*"
|
||||
|
||||
#ENV HIP_CLANG_PATH='/llvm-project/build/bin'
|
||||
#RUN sh -c "echo HIP_CLANG_PATH = '$HIP_CLANG_PATH'"
|
||||
|
||||
Reference in New Issue
Block a user