-
Notifications
You must be signed in to change notification settings - Fork 486
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: #5835 This PR implements arbitrary as_strided function by decomposing it into slicing+indexing. In summary, we slice the base tensor for complying with the given storage_offset, and then index a flattened version of the tensor, gathering the desired elements, based on the given size and strides. (more explanation in the code). cc @miladm @JackCaoG @lezcano
- Loading branch information
Showing
3 changed files
with
166 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters