Repository navigation
Conversation
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. [ghstack-poisoned]
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. ghstack-source-id: bdfe389 Pull Request resolved: #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. [ghstack-poisoned]
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. ghstack-source-id: f8883f1 Pull Request resolved: #42248
ezyang
left a comment
There was a problem hiding this comment.
Looks good, these are simple enough.
Have you considered writing some tests that compare the behavior of your backend fallback with the explicit operator? I don't know how I would wire this up, but that might also be an interesting way to check for correctness.
I have considered that. It would be easier to do if there existed an operator database: given some operator, I'd like to query B0 valid inputs for some shape. Then, I can run the explicit operator on each of those B0 inputs and compare the result to vmap on the stacked B0 tensors. Without an op database I would be writing sample inputs for days. cc @mruberry if any of that helps with the operator database work |
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. Differential Revision: [D22846273](https://our.internmc.facebook.com/intern/diff/D22846273) [ghstack-poisoned]
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. Differential Revision: [D22846273](https://our.internmc.facebook.com/intern/diff/D22846273) [ghstack-poisoned]
💊 CI failures summary and remediationsAs of commit 641acc1 (more details on the Dr. CI page): 💚 💚 Looks good so far! There are no failures yet. 💚 💚 This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.Please report bugs/suggestions on the GitHub issue tracker or post in the (internal) Dr. CI Users group. This comment has been revised 3 times. |
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. Differential Revision: [D22846273](https://our.internmc.facebook.com/intern/diff/D22846273) [ghstack-poisoned]
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. ghstack-source-id: 125529e Pull Request resolved: pytorch/pytorch#42248
Stack from ghstack:
Including:
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:
test/test_vmap.py.my previous attempts at making something resulted in something very
complicated.
Differential Revision: D22846273