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

Add Kernel attribute getter/setter #205

Open
leofang opened this issue Oct 31, 2024 · 5 comments · May be fixed by #360
Open

Add Kernel attribute getter/setter #205

leofang opened this issue Oct 31, 2024 · 5 comments · May be fixed by #360
Assignees
Labels
cuda.core Everything related to the cuda.core module feature New feature or request P0 High priority - Must do!

Comments

@leofang
Copy link
Member

leofang commented Oct 31, 2024

Need a nice way to get/set CUfunction_attribute. Make them maybe nice Python properties, instead of using the C enumerator names literally.

To check:

@leofang leofang added cuda.core Everything related to the cuda.core module feature New feature or request P1 Medium priority - Should do labels Oct 31, 2024
@leofang leofang added this to the cuda.core beta 2 milestone Oct 31, 2024
@leofang
Copy link
Member Author

leofang commented Dec 24, 2024

User request (to CuPy) for setting cudaFuncAttributeNonPortableClusterSizeAllowed: cupy/cupy#8851

@leofang leofang added P0 High priority - Must do! and removed P1 Medium priority - Should do labels Dec 27, 2024
@ksimpson-work
Copy link
Contributor

ksimpson-work commented Dec 27, 2024

I think we should provide both avenues for specifying clusters or other configs which can be done via the kernel attributes of launch configs. There are 3 reasons for this:

  1. Runtime vs compile time means they're not exactly the same

  2. A user coming from c++ will expect both options, and a new user doesn't need to understand both options at first in order to get started. The possibility of being confused by two options is outweighed by the potential confusion of learning about both options via existing cuda c++ documentation or looking at the source code, but not being able to use them.

  3. For us to provide both requires almost no effort, as we are leveraging the existing backend. Isolating things like clusters to one of either lunch configs, or kernel attributes, would require us to hack away a subset of perfectly valid attributes/configs on either launches or kernels.

@ksimpson-work ksimpson-work linked a pull request Jan 6, 2025 that will close this issue
@leofang
Copy link
Member Author

leofang commented Jan 7, 2025

I think both are run-time configs and if a kernel has any attribute that can be configured at (JIT-)compile time, IIRC there would not be any setter (I could be wrong). Another note is the driver team seems to have a preference over one of them. We should check with them internally for guidance.

@ksimpson-work
Copy link
Contributor

I will get in touch, is there anyone in particular that comes to mind for asking about driver team preference?

I've got a review in flight. I never found (I didn't look very hard) documentation for which attributes were read vs write, but it was easy to deduce via testing. #360

@leofang
Copy link
Member Author

leofang commented Jan 8, 2025

is there anyone in particular that comes to mind for asking about driver team preference?

@vzhurba01 might know who on the driver team to discuss about this. Let's follow up offline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cuda.core Everything related to the cuda.core module feature New feature or request P0 High priority - Must do!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants