forked from pytorch/pytorch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement batching rules for some view ops (pytorch#42248)
Summary: Pull Request resolved: pytorch#42248 Including: - torch.diagonal - torch.t - torch.select - Tensor.expand_as - Tensor slicing. Please let me know in the future if it would be easier to review these separately (I put five operators into this PR because each implementation is relatively simple). Test Plan: - new tests in `test/test_vmap.py`. - I would like to have a more structured/automated way of testing but my previous attempts at making something resulted in something very complicated. Reviewed By: ezyang Differential Revision: D22846273 Pulled By: zou3519 fbshipit-source-id: 8e45ebe11174512110faf1ee0fdc317a25e8b7ac
- Loading branch information
1 parent
2f8d5b6
commit 4cdbe5c
Showing
2 changed files
with
126 additions
and
2 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