Replies: 1 comment
-
|
Hey, yeah unfortunately the GitHub-hosted runners don't have GPU support for open-source projects right now — you're not missing anything, that's just how it is at the moment. The workaround most people use is setting up a self-hosted runner on a machine (or a cloud VM) that has a GPU and CUDA installed, then targeting it with a label in your workflow: jobs:
gpu-tests:
runs-on: [self-hosted, linux, gpu]
steps:
- uses: actions/checkout@v4
- name: Run GPU tests
run: pytest tests/For cloud, a single T4 on something like Lambda Labs or Paperspace is pretty affordable if you only need a few seconds of GPU time per run. You could also just split your test suite — keep the CPU tests on the default hosted runners and only route the CUDA-specific ones to the self-hosted runner. That way you're not paying for GPU time on tests that don't need it. As for whether GitHub will ever add even a small GPU to the free hosted runners, I haven't seen anything on the roadmap for it, but it would genuinely be a useful feature given how common CUDA projects are these days. Hopefully it gets picked up eventually. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Why are you starting this discussion?
Question
What GitHub Actions topic or product is this about?
Actions Runner
Discussion Details
Hi,
I'm developing an open-source Python module with CUDA support. I'm using GitHub Actions as my CI, which I'm liking very much!
There is an obvious issue that I can't test any of my GPU code as part of my Actions run as none of the runners available to open-source projects have GPU support (as far as I can tell).
Is there any possibility that GPU support could be added to the small runners in the future? For me, there is no requirement that a particularly big GPU is available. I just want to unit test some small computations (likely less than ten seconds of GPU time per test suite run).
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions