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

Rename inputSize variables as inputRank in algorithms #588

Closed
inexorabletash opened this issue Feb 27, 2024 · 1 comment · Fixed by #627
Closed

Rename inputSize variables as inputRank in algorithms #588

inexorabletash opened this issue Feb 27, 2024 · 1 comment · Fixed by #627
Assignees

Comments

@inexorabletash
Copy link
Member

inexorabletash commented Feb 27, 2024

Per discussion in #582 (comment) @fdwr writes:

inputSize is quite ambiguous alone because many ML libraries have a Size() operator which (for better or worse, and probably should have been called ElementCount() instead) returns the total number of elements, not the count of dimensions. So, inputRank or inputShapeSize or inputDimensionCount would all be clearer names (with inputRank being the most concise)

So any place where "size" is being used to refer to the number of dimensions, replace with "rank".

  • inputSize → inputRank
  • outputSize → outputRank
  • filterSize → filterRank
  • sizeA → rankA
  • sizeB → rankB
  • ... any others?

Note though that while an MLOperand has a rank, if what an algorithm is processing is a list that list has a size not a rank. If the list is a list of dimensions, it's fine to store that in a local variable called rank, though!

@inexorabletash
Copy link
Member Author

FYI I'll put up a PR for this once the queue is smaller.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant