Skip to content

Commit 2e491f6

Browse files
committed
CI Linux: add build with all CUDA arch
In addition to default build targetting 35-virtual (Kepler), create also build with all (both major and minor architectures) for possibly better performance and/or startup times (no need to compile the kernels in runtime). uses CUDA 12.6 (not U20.04 distro 10.1)
1 parent 5c9e4a0 commit 2e491f6

File tree

2 files changed

+31
-7
lines changed

2 files changed

+31
-7
lines changed

.github/scripts/upload-asset.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
TAG_NAME=${1?}
66
FILE=${2?}
77
CONTENT_TYPE=${3?}
8-
LABEL=${4?}
8+
LABEL=$(echo "${4?}" | sed 's/ /%20/g')
99

1010
JSON=$(fetch_json https://api.github.com/repos/$GITHUB_REPOSITORY/releases/tags/$TAG_NAME $GITHUB_TOKEN)
1111
UPLOAD_URL=$(echo "$JSON" | jq -r .upload_url | sed "s/{.*}//")

.github/workflows/ccpp.yml

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,35 +38,59 @@ jobs:
3838
name: run Ubuntu
3939
needs: retag-continuous
4040
runs-on: ubuntu-20.04
41+
strategy:
42+
matrix:
43+
cuda_arch: [35, all]
44+
include:
45+
- cuda_arch: 35
46+
tar_name: GPUJPEG-Linux.tar.xz
47+
name: Linux build
48+
- cuda_arch: all
49+
tar_name: GPUJPEG-Linux-all.tar.xz
50+
name: Linux build (all CUDA architetures)
4151

4252
steps:
4353
- uses: actions/checkout@main
4454
- name: Install
4555
run: |
4656
sudo apt update
47-
sudo apt install cmake jq nvidia-cuda-toolkit
57+
sudo apt install cmake jq
58+
- name: Install disro CUDA
59+
if: matrix.cuda_arch == 35
60+
run: |
61+
sudo apt install nvidia-cuda-toolkit
62+
id: install-distro-cuda
63+
- name: Install NVIDIA-distributed CUDA
64+
if: steps.install-distro-cuda.conclusion == 'skipped'
65+
run: |
66+
wget https://developer.download.nvidia.com/compute/cuda/repos/\
67+
ubuntu2004/x86_64/cuda-keyring_1.1-1_all.deb
68+
sudo dpkg -i cuda-keyring_1.1-1_all.deb
69+
sudo apt-get update
70+
sudo apt-get -y install cuda-toolkit
71+
echo CUDACXX=/usr/local/cuda/bin/nvcc >> "$GITHUB_ENV"
4872
- name: Build
4973
run: |
5074
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_RPATH='$ORIGIN/../lib' \
51-
-DCMAKE_CUDA_ARCHITECTURES=35 -Bbuild .
75+
-DCMAKE_CUDA_ARCHITECTURES=${{ matrix.cuda_arch }} -Bbuild .
5276
cmake --build build --parallel
5377
ctest -R unittests
5478
cmake --install build --prefix GPUJPEG
55-
tar caf GPUJPEG-Linux.tar.xz GPUJPEG
79+
tar caf ${{ matrix.tar_name }} GPUJPEG
5680
5781
- name: Upload Archive
5882
if: github.repository != 'CESNET/GPUJPEG' || github.ref != 'refs/heads/master'
5983
uses: actions/upload-artifact@main
6084
with:
61-
name: GPUJPEG CI Linux build
85+
name: GPUJPEG CI ${{ matrix.name }}
6286
path: GPUJPEG
6387

6488
- name: Upload Release Build Asset
6589
if: github.repository == 'CESNET/GPUJPEG' && github.ref == 'refs/heads/master'
6690
env:
6791
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68-
run: |
69-
.github/scripts/replace-asset.sh continuous GPUJPEG-Linux.tar.xz application/x-gtar Linux%20build
92+
run: .github/scripts/replace-asset.sh continuous ${{ matrix.tar_name }}
93+
application/x-gtar "${{ matrix.name }}"
7094

7195
Windows:
7296
name: run Windows

0 commit comments

Comments
 (0)