Skip to content

Move GPU support into Dagger #623

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 1, 2025
Merged

Move GPU support into Dagger #623

merged 2 commits into from
Jul 1, 2025

Conversation

jpsamaroo
Copy link
Member

@jpsamaroo jpsamaroo commented Jun 29, 2025

I've long been displeased about having to say using DaggerGPU to get GPU support code loaded, which used to be necessary before package extensions existed. I also think that having such important code live outside of the core Dagger repo makes it hard to keep the GPU code up to date and working properly as Dagger itself evolves. This PR corrects these issues by moving all GPU support code into the Dagger repo, and wiring up CI to keep it regularly tested.

Mostly, things are the same as before, with the exception of not needing using DaggerGPU, and with functions being under the Dagger. namespace instead. I've also made a few slight name changes, but I'll keep the original names in DaggerGPU.jl (with deprecation warnings) to ensure existing code keeps working.

Also, Dagger.Kernel no longer automatically synchronizes, and instead users can call Dagger.gpu_synchronize(...) to synchronize Dagger's background queues/streams. Having a forced synchronization basically negated the usefulness of Dagger.Kernel, but was necessary before we did queue/stream tracking. Now you can rely on Dagger to handle synchronization across Dagger tasks automatically, and only need to call Dagger.gpu_synchronize(...) when running GPU code outside of Dagger, to force Dagger to synchronize its background streams/queues.

Todo:

@jpsamaroo jpsamaroo force-pushed the jps/daggergpu branch 2 times, most recently from 14d3316 to 3ca31dc Compare July 1, 2025 04:39
@jpsamaroo jpsamaroo force-pushed the jps/daggergpu branch 2 times, most recently from 25b9a70 to a76fb42 Compare July 1, 2025 05:09
@jpsamaroo jpsamaroo merged commit a59f56e into master Jul 1, 2025
9 of 18 checks passed
@jpsamaroo jpsamaroo deleted the jps/daggergpu branch July 1, 2025 05:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant