Skip to content
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

Want ability to set function attributes on function pointers and handles #566

Closed
eyalroz opened this issue Jan 2, 2024 · 0 comments
Closed

Comments

@eyalroz
Copy link
Owner

eyalroz commented Jan 2, 2024

Currently, the cuFuncSetAttribute() can be called only in a member function of cuda::kernel. But - there's no good reason it shouldn't be usable outside of that object. Specifially, I'd like to be able to at least do something like:

cuda::kernel::detail_::set_attribute(device_id, context_handle, kernel_handle, attr_id, attr_value);

... which, for now, I can't. But beyond this, think of the following line:

cudaFuncSetAttribute(kernel_func_ptr, attr_id, attr_value);

which people may be using today with the runtime API. Should we not allow for:

cuda::kernel::set_attribute(kernel_func_ptr, attr_id, attr_value);

to cater to this? And also the context-specific version

cuda::kernel::set_attribute(context_ref, kernel_func_ptr, attr_id, attr_value);

?

@eyalroz eyalroz added the task label Jan 2, 2024
@eyalroz eyalroz self-assigned this Jan 2, 2024
eyalroz added a commit that referenced this issue Jan 8, 2024
…t function

* both for `kernel_t` and `void *` pointers,
* underlying functionality also for `kernel::handle_t`
* Typo fix
eyalroz added a commit that referenced this issue Jan 14, 2024
…t function

* both for `kernel_t` and `void *` pointers,
* underlying functionality also for `kernel::handle_t`
* Typo fix
eyalroz added a commit that referenced this issue Jan 27, 2024
…t function

* both for `kernel_t` and `void *` pointers,
* underlying functionality also for `kernel::handle_t`
* Typo fix
@eyalroz eyalroz closed this as completed in 5d5463a Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant