-
Notifications
You must be signed in to change notification settings - Fork 5
Reshaping to support BSR and GCXS #63
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
base: main
Are you sure you want to change the base?
Conversation
Automated Review URLs |
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.
some comments from the call
The `slice` key, when present, is a list of tuples of integers describing the starting and ending index of each dimension. If the `i`th tuple is `(a, b)`, then the `i`th dimension of the output should contain indices starting at `a` and ending just before `b`. | ||
|
||
The operations when present are to be applied in the order `split_dims`, `combine_dims`, `slice`, followed by the `transpose` key if present. | ||
|
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.
If combine_dims, slice, split_dims, or transpose are present, a
storage_shape` must be specified, to describe the shape before transformation
|
||
The `slice` key, when present, is a list of tuples of integers describing the starting and ending index of each dimension. If the `i`th tuple is `(a, b)`, then the `i`th dimension of the output should contain indices starting at `a` and ending just before `b`. | ||
|
||
The operations when present are to be applied in the order `split_dims`, `combine_dims`, `slice`, followed by the `transpose` key if present. |
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.
Leave a note that points out that combine dims can transpose too actually.
|
||
As an example, an `11` by `37` BCSR can be represented as: | ||
|
||
```json |
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.
need outer brace here, also need commas, also there's no tuples in json
After several discussions in the meetings, here's my attempt at adding some reshaping operators to support things like BSR. I've opted not to use a generic list of operations, instead choosing a specific application order. I wish we could have used strides, but there's no easy way to determine if they are well-formed. Instead, I chose to do a split-dimensions then combine-dimensions approach, which ensures that the reshapes always corresponds to bundling or un-bundling underlying dimensions that might have been raveled into the format. I also added a slice keyword at the end to handle padding, and because people asked for slicing.