Skip to content

Commit

Permalink
CI Linux: add build with all CUDA arch
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
MartinPulec committed Jan 20, 2025
1 parent 5c9e4a0 commit 7f7d89d
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/scripts/upload-asset.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
TAG_NAME=${1?}
FILE=${2?}
CONTENT_TYPE=${3?}
LABEL=${4?}
LABEL=$(echo "${4?}" | sed 's/ /%20/g')

JSON=$(fetch_json https://api.github.com/repos/$GITHUB_REPOSITORY/releases/tags/$TAG_NAME $GITHUB_TOKEN)
UPLOAD_URL=$(echo "$JSON" | jq -r .upload_url | sed "s/{.*}//")
Expand Down
36 changes: 30 additions & 6 deletions .github/workflows/ccpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,35 +38,59 @@ jobs:
name: run Ubuntu
needs: retag-continuous
runs-on: ubuntu-20.04
strategy:
matrix:
cuda_arch: [35, all]
include:
- cuda_arch: 35
tar_name: GPUJPEG-Linux.tar.xz
name: Linux build
- cuda_arch: all
tar_name: GPUJPEG-Linux-all.tar.xz
name: Linux build (all CUDA architetures)

steps:
- uses: actions/checkout@main
- name: Install
run: |
sudo apt update
sudo apt install cmake jq nvidia-cuda-toolkit
sudo apt install cmake jq
- name: Install disro CUDA
if: matrix.cuda_arch == 35
run: |
sudo apt install nvidia-cuda-toolkit
id: install-distro-cuda
- name: Install NVIDIA-distributed CUDA
if: steps.install-distro-cuda.conclusion == 'skipped'
run: |
wget https://developer.download.nvidia.com/compute/cuda/repos/\
ubuntu2004/x86_64/cuda-keyring_1.1-1_all.deb
sudo dpkg -i cuda-keyring_1.1-1_all.deb
sudo apt-get update
sudo apt-get -y install cuda-toolkit
echo CUDACXX=/usr/local/cuda/bin/nvcc >> "$GITHUB_ENV"
- name: Build
run: |
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_RPATH='$ORIGIN/../lib' \
-DCMAKE_CUDA_ARCHITECTURES=35 -Bbuild .
-DCMAKE_CUDA_ARCHITECTURES=${{ matrix.cuda_arch }} -Bbuild .
cmake --build build --parallel
ctest -R unittests
cmake --install build --prefix GPUJPEG
tar caf GPUJPEG-Linux.tar.xz GPUJPEG
tar caf ${{ matrix.tar_name }} GPUJPEG
- name: Upload Archive
if: github.repository != 'CESNET/GPUJPEG' || github.ref != 'refs/heads/master'
uses: actions/upload-artifact@main
with:
name: GPUJPEG CI Linux build
name: GPUJPEG CI ${{ matrix.name }}
path: GPUJPEG

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

Windows:
name: run Windows
Expand Down

0 comments on commit 7f7d89d

Please sign in to comment.