-
Notifications
You must be signed in to change notification settings - Fork 52
feat: add max rank
to inspection API capabilities
#763
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM, thanks @kgryte.
I considered whether this needed to be device-specific, but unless someone has a concrete example of that being the case in an existing library, I don't think it's needed now. It's always possible to do this in the future by adding a device
keyword to capabilities
in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Q: Is this for v2024 only, or would we backport it?
New APIs shouldn't be backported. Only things like typo fixes and clarifications that don't affect implementations should be backported to previous versions. |
As this PR has received 2 approvals and no objections, I'll go ahead and merge. Any further changes can be addressed in follow-up PRs. Thanks all! |
Since this isn't yet in a released version of the standard, I would like to propose that we rename "max rank" to something like "max dimensions". The term "rank" is ambiguous when referring to an array, since it can also refer to the linear algebra definition of rank (or even the tensor definition, which is yet another thing). I know we also use the term "rank" throughout the standard, but I would also propose that we replace this with something like "dimensionality". |
I think that's a fair comment. "max ndim" would be another option if name length matters. |
Briefly discussed today: seemed fine to everyone to change name - @asmeurer will open a new PR. |
This PR
None
(i.e., there is not maximum array rank), and, for those unable to support infinite dimensions, those libraries must specify a finite integer value.