Skip to content

Commit 9528f1e

Browse files
committed
Add steps to cache CUDA and ROCm
1 parent d92f087 commit 9528f1e

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/linux.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,34 +16,56 @@ jobs:
1616
- uses: actions/checkout@v2
1717
with:
1818
submodules: 'recursive'
19+
20+
- name: Cache ROCm
21+
id: cache-rocm
22+
uses: actions/cache@v3
23+
with:
24+
path: /opt/rocm-${{matrix.rocm_version}}
25+
key: ${{runner.os}}-rocm
26+
27+
- name: Cache CUDA
28+
id: cache-cuda
29+
uses: actions/cache@v3
30+
with:
31+
path: /usr/local/cuda-${{matrix.cuda_version}}
32+
key: ${{runner.os}}-rocm
33+
1934
- name: install ROCm
35+
if: steps.cache-rocm.outputs.cache-hit != 'true'
2036
run: |
2137
sudo apt install libnuma-dev cmake unzip
2238
wget -q -O - https://repo.radeon.com/rocm/rocm.gpg.key | sudo apt-key add -
2339
echo 'deb [arch=amd64] https://repo.radeon.com/rocm/apt/${{matrix.rocm_version}}/ ubuntu main' | sudo tee /etc/apt/sources.list.d/rocm.list
2440
sudo apt update
2541
sudo apt install rocm-dev rocblas
42+
2643
- name: install LLVM
2744
run: |
2845
wget https://apt.llvm.org/llvm.sh
2946
chmod +x llvm.sh
3047
sudo ./llvm.sh ${{matrix.clang_version}}
3148
sudo apt install libclang-${{matrix.clang_version}}-dev clang-tools-${{matrix.clang_version}} libomp-${{matrix.clang_version}}-dev
49+
3250
- name: install boost from apt
3351
run: |
3452
sudo apt update
3553
sudo apt install libboost-all-dev
54+
3655
- name: install CUDA
56+
if: steps.cache-cuda.outputs.cache-hit != 'true'
3757
run: |
3858
cd
3959
wget https://developer.download.nvidia.com/compute/cuda/11.6.0/local_installers/cuda_11.6.0_510.39.01_linux.run
4060
sudo sh cuda_11.6.0_510.39.01_linux.run --override --silent --toolkit
4161
cd
62+
4263
- name: test CUDA and cuBLAS
4364
run: |
4465
/usr/local/cuda/bin/nvcc --version
4566
cat /usr/local/cuda/version.json
4667
cat /usr/local/cuda/include/cublas.h | grep CUBLAS
68+
4769
- name: build OpenSYCL
4870
run: |
4971
cd
@@ -60,12 +82,14 @@ jobs:
6082
-DROCM_PATH=/opt/rocm-${{matrix.rocm_version}} \
6183
-DCUDA_PATH=/usr/local/cuda-${{matrix.cuda_version}} ..
6284
make -j2 install
85+
6386
- name: install LAPACK (for CBLAS)
6487
run: |
6588
cd
6689
git clone https://github.com/Reference-LAPACK/lapack.git
6790
cmake -S . -B build -DCMAKE_INSTALL_LIBDIR=$(pwd)/install -DBUILD_SHARED_LIBS=ON -DCBLAS=ON
6891
cmake --build build -j2 --target install
92+
6993
- name: clone oneMKL
7094
run: |
7195
cd

0 commit comments

Comments
 (0)