Skip to content

Commit

Permalink
GitHub actions: Added runners for building with CUDA 12.5.1 and 12.6.…
Browse files Browse the repository at this point in the history
…0 (on Linux, building those both with ubuntu 20.04 and 24.04)
  • Loading branch information
eyalroz committed Sep 23, 2024
1 parent ec0f57c commit 3252b52
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 18 deletions.
39 changes: 21 additions & 18 deletions .github/action-scripts/install-cuda-ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,10 @@
#


## -------------------
## Constants
## -------------------

# @todo - apt repos/known supported versions?

# @todo - GCC support matrix?

# List of sub-packages to install.
# @todo - pass this in from outside the script?
# @todo - check the specified subpackages exist via apt pre-install? apt-rdepends cuda-9-0 | grep "^cuda-"?

# Ideally choose from the list of meta-packages to minimise variance between cuda versions (although it does change too)
CUDA_PACKAGES_IN=(
"command-line-tools"
"nvrtc-dev"
"cudart-dev"
"nvcc"
"profiler-api"
"libnvfatbin"
)

## -------------------
## Bash functions
## -------------------
Expand All @@ -57,6 +39,26 @@ function version_lt() {
[ "$1" = "$2" ] && return 1 || version_le $1 $2
}

## -------------------
## List of sub-packages to install
## -------------------

# Ideally choose from the list of meta-packages to minimise variance between cuda versions (although it does change too)
CUDA_PACKAGES_IN=(
"command-line-tools"
"nvrtc-dev"
"cudart-dev"
"nvcc"
"profiler-api"
)

if [[ version_ge "12.4" ]]; then
CUDA_PACKAGES_IN += (
"libnvfatbin"
"libnvfatbin-dev"
)
fi

## -------------------
## Select CUDA version
## -------------------
Expand Down Expand Up @@ -106,6 +108,7 @@ fi
## -------------------------------

CUDA_PACKAGES=""

for package in "${CUDA_PACKAGES_IN[@]}"
do :
if [[ "${package}" == "profiler-api" ]] && version_lt "$CUDA_VERSION_MAJOR_MINOR" "11.8" ; then
Expand Down
2 changes: 2 additions & 0 deletions .github/action-scripts/install-cuda-windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ $CUDA_KNOWN_URLS = @{
"12.3.0" = "https://developer.download.nvidia.com/compute/cuda/12.3.0/network_installers/cuda_12.3.0_windows_network.exe";
"12.3.1" = "https://developer.download.nvidia.com/compute/cuda/12.3.1/network_installers/cuda_12.3.1_windows_network.exe";
"12.4.1" = "https://developer.download.nvidia.com/compute/cuda/12.4.1/network_installers/cuda_12.4.1_windows_network.exe";
"12.5.1" = "https://developer.download.nvidia.com/compute/cuda/12.5.1/network_installers/cuda_12.5.1_windows_network.exe";
"12.6.0" = "https://developer.download.nvidia.com/compute/cuda/12.6.0/network_installers/cuda_12.6.0_windows_network.exe";
}

# @todo - change this to be based on _MSC_VER intead, or invert it to be CUDA keyed instead?
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/cmake-build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,26 @@ jobs:
# explicit include-based build matrix, of known valid options
matrix:
include:
- os: ubuntu-24.04
cuda: "12.6.0"
gcc: 13
shell: "bash"
cmake-generator: "Unix Makefiles"
- os: ubuntu-24.04
cuda: "12.5.1"
gcc: 13
shell: "bash"
cmake-generator: "Unix Makefiles"
- os: ubuntu-20.04
cuda: "12.6.0"
gcc: 10
shell: "bash"
cmake-generator: "Unix Makefiles"
- os: ubuntu-20.04
cuda: "12.5.1"
gcc: 10
shell: "bash"
cmake-generator: "Unix Makefiles"
- os: ubuntu-20.04
cuda: "12.4.1"
gcc: 10
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/cmake-build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@ jobs:
matrix:
include:
# Windows2019 & VS 2019 supports 10.1+
- os: windows-2019
cuda: "12.6.0"
visual-studio: "Visual Studio 16 2019"
shell: "powershell"
os-type: "windows"
cmake-platform-flag: "-A x64"
- os: windows-2019
cuda: "12.5.1"
visual-studio: "Visual Studio 16 2019"
shell: "powershell"
os-type: "windows"
cmake-platform-flag: "-A x64"
- os: windows-2019
cuda: "12.4.1"
visual-studio: "Visual Studio 16 2019"
Expand Down

0 comments on commit 3252b52

Please sign in to comment.