-
-
Notifications
You must be signed in to change notification settings - Fork 80
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
Avoid the fancy-shmancy heap allocation for stream callbacks #473
Labels
Comments
eyalroz
added a commit
that referenced
this issue
Feb 23, 2023
* No longer allocating heap memory on enqueue and releaing it during launch - only passing pointers the user has provided. Part of the motivation for this is enabling stream capture and re-execution of the launch. * Separated a method for enqueuing no-argument callables and enqueuing functions which take a single (pointer) argument. * Enqueued callables no longer receive a stream (as CUDA has moved away from this convention and we can't make it happen without the heap allocation scheme we had before * `#ifdef`'ed out parts of `launch_config_builder.hpp` which require CUDA 10.0 to run (essentially obtaining minimum dimensions for maximum occupancy). * Dropped some redundant comments in `stream.hpp` about the choice of API functions
eyalroz
added a commit
that referenced
this issue
Feb 23, 2023
* No longer allocating heap memory on enqueue and releaing it during launch - only passing pointers the user has provided. Part of the motivation for this is enabling stream capture and re-execution of the launch. * Separated a method for enqueuing no-argument callables and enqueuing functions which take a single (pointer) argument. * Enqueued callables no longer receive a stream (as CUDA has moved away from this convention and we can't make it happen without the heap allocation scheme we had before * `#ifdef`'ed out parts of `launch_config_builder.hpp` which require CUDA 10.0 to run (essentially obtaining minimum dimensions for maximum occupancy). * Dropped some redundant comments in `stream.hpp` about the choice of API functions
Farwell fancy-shmancy closure call with arguments, we hardly knew ya! |
eyalroz
added a commit
that referenced
this issue
Mar 9, 2023
* No longer allocating heap memory on enqueue and releaing it during launch - only passing pointers the user has provided. Part of the motivation for this is enabling stream capture and re-execution of the launch. * Separated a method for enqueuing no-argument callables and enqueuing functions which take a single (pointer) argument. * Enqueued callables no longer receive a stream (as CUDA has moved away from this convention and we can't make it happen without the heap allocation scheme we had before * `#ifdef`'ed out parts of `launch_config_builder.hpp` which require CUDA 10.0 to run (essentially obtaining minimum dimensions for maximum occupancy). * Dropped some redundant comments in `stream.hpp` about the choice of API functions
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
At the moment, when a host (callback) function or callable is enqueued on a stream, we allocate some heap memory to pass it several arguments. While this does work, it is a problem, for two reasons:
We therefore need to avoid this allocation, and make do with only what CUDA's API itself guarantees the provision of.
And - note also the deprecation of the callback enqueuing API function which passes the stream to the callback; we'll probably need to make do without it.
The text was updated successfully, but these errors were encountered: