- Notifications
You must be signed in to change notification settings - Fork297
[WIP] Add support for CUDA Graphs.#343
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Reduces the amount of compiler warnings significantly.
inducer commentedJan 16, 2022
This looks great, thanks for working on this! To be merged, it'd of course need docs and tests. For lack of GPUs, I don't have usable CI for PyCUDA on Github, but I do have that on a Gitlab instance I run. Mind if I create a user account for you there? |
gfokkema commentedJan 17, 2022
Hi, thanks for the feedback! Yes, this PR was meant primarily to pitch the idea and get some early feedback :) And access to already usable CI would be great! |
inducer commentedJan 17, 2022
Made an account for you, you should have that info in your email. The site is athttps://gitlab.tiker.net/inducer/pycuda. |
mgaedtke commentedJun 15, 2022
I did some experiments and tests with this and it seems to work without any errors so far. What would be the next steps to bring this to a future release? |
inducer commentedJun 15, 2022
It's clear that this should happen, ideally soon. As it happens, there are now two (draft) versions of this, one here: https://gitlab.tiker.net/kaushikcfd/pycuda/-/merge_requests/2/diffs and the other one in this PR. (They got started independently.)@mitkotak, could you comment on your plans with respect to upstreaming your work? |
mitkotak commentedJun 15, 2022
Thanks for your interest in this PR. Right now my estimate is to merge this feature into |
YanBC commentedOct 20, 2022
Hi there, any updates on the cuda graph feature? |
mitkotak commentedOct 21, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Thank you very much for the interest ! We are still testing the PR to make sure that we don't break any existing functionality but if you are curious to learn more then you can try it out using |
mgaedtke commentedJun 14, 2023
Hi@mitkotak, very much looking forward for this feature! Any idea, when the PR could be ready? |
Uh oh!
There was an error while loading.Please reload this page.
Hi there!
I wanted to experiment with CUDA Graphs a bit to get a feel for the performance differences between blocking, async and graph execution.
See:
However, while most required functionality is available (async, specifying stream, etc), pycuda does not have Graph support yet.
This PR adds some initial support to launch a kernel pipeline using a CUgraph.
I'd love your comments and feedback, most likely I am not freeing memory correctly etc, let me know!
All in all everything seems to be working enough to be useful already :)
Nice bonus is CUDA Graph API offers a function to output dot files, see picture below and the demo in
examples/demo_graph.py.Note that the demo launches the kernel only once.
Due to overhead, benefits of the Graph API should only really start showing when launching kernels repeatedly.