CUDA + Cmake example using Github Actions
This repo is a very simple CUDA application, used to GitHub Actions as a CI service for CUDA compilation.
This will potentially be expanded to investigate self-hosted runner(s) for running tests locally.
Sample application
To be representative of a real world example this should include:
cmake
for cross platform build toolingnvcc
to compile .cu code.- some form of test script?
Compilation
mkdir -p build
cd build
cmake ..
make
Execution
cd build
./main
Version Compatibility
CUDA is only supported with appropriate host compilers.
This support matrix can be found in the CUDA documentation, however, there are some obvious caveats related to the current state of github actions (at the time of writing)
- Windows-2019
- Visual Studio
16.5.5
which maps to_MSC_VER 1925
CUDA >= 10.1
CUDA 10.0
requires_MSC_VER
between1700
and1920
- Visual Studio
- Ubuntu 18.04
- GNU C++
7.5.0
,8.4.0
&9.3.0
are available - CUDA
10.0+
are available in the apt repository.- You can use the older
1604
apt repo to enableCUDA 8.0+
- You can use the older
- GNU C++
- Ubuntu 20.04
- GNU C++
9.4.0
,10.3.0
are available#- GNU C++
10.3.0
leads to errors when using<chrono>
with NVCC in--std=C++17
mode. This has been addressed in GCC, but the patch hasn't made it to Ubuntu packaged GCC.
- GNU C++
- CUDA
11.0+
are available in the apt repository.- You can use the older
1804
apt repo to enableCUDA 10.0+
, but this is an unsupported configuration which may lead to errors.
- You can use the older
- GNU C++