-
Notifications
You must be signed in to change notification settings - Fork 94
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
Choose dimensions
or sizes
+ strides
for user-facing operations
#1922
Comments
Why only max 3 sizes but 4 strides? Copying my examples from the review of #1919 on why ExamplesThese examples assume a highest-dimension stride of 2.If the highest-dimension size/wrap is 3, the higest-dimension stride (=iteration step) is 2, and the repeat count is 6, the highest dimension offset added will be Task repetition: 0 1 2 3 4 5 (repeat count = 6) Highest-dim offset added: 0 2 4 0 2 4 ^ wrap (=3) If the highest-dimension wrap matches the repeat count of the task, the iteration step will be added each repetition: Task repetition: 0 1 2 3 4 5 (repeat count = 6) Highest-dim offset added: 0 2 4 6 8 10 ^ wrap (=6) In the other extreme, if the wrap is 1, the iteration step never gets added (BD repeated with no offset). Task repetition: 0 1 2 3 4 5 (repeat count = 6) Highest-dim offset added: 0 0 0 0 0 0 ^ ^ ^ ^ ^ ^ w. w. w. w. w. wrap(=1) |
Ah I see what you are saying now. I was having trouble parsing your examples because it's hard to understand "highest dimension" when the highest dimension from the perspective of the hardware and the perspective of the user are not always the same thing. But I think I understand now. I've edited the issue to remove that point. Thanks for explaining again! |
Right now, some operations take
dimensions
and some operations takesizes
andstrides
.For clarity, but also some implementation considerations, I think it would make sense to change to
sizes
/strides
.Some pros for moving to
sizes
/strides
are:dimensions
requires (at least at the python level) bothsizes
/strides
to be default or both not default. It would be nice for a user to take advantage of default values more easily. If a python wrapper function takes these values separately, then python needs to have hard-coded defaults in order to produced validdimensions
, which is not ideal.This came to my attention through comments of @fifield and @andrej in #1919
As this would be a change that touches many things, I'm recording outside of the PR for discussion and so it does not become a blocker to that PR.
The text was updated successfully, but these errors were encountered: