How to use CUDA in Github CI?

Hello,

I contributed some code to a package, and I made unit tests to check whether the code works on the GPU. I wrapped the code in a if CUDA.functional() ... end block and I see this:


It seems like CUDA is not functional in the CI. I went to see how the ci.yml is setup in CUDA.jl, and there’s none. So my question is : can you run CI jobs on GPUs? If yes, how? If not, is there an alternative ?

The GitHub-hosted runners don’t have GPUs so you can’t: About GitHub-hosted runners - GitHub Docs

You’ll need to use a self-hosted runner: About self-hosted runners - GitHub Docs

1 Like

Okay thanks !