[torch.func] alias torch.func.vmap as torch.vmap (#91026)

This PR also redirects torch.vmap to torch.func.vmap instead of the old
vmap prototype.

Test Plan:
- tests
- view docs preview
Pull Request resolved: https://github.com/pytorch/pytorch/pull/91026
Approved by: https://github.com/albanD, https://github.com/samdow
This commit is contained in:
Richard Zou
2022-12-21 12:37:37 -05:00
committed by PyTorch MergeBot
parent e803d336eb
commit fb2e1878cb
8 changed files with 27 additions and 123 deletions

View File

@ -3,7 +3,8 @@
from torch.testing._internal.common_utils import TestCase, run_tests
import torch
import torch.nn.functional as F
from torch import Tensor, vmap
from torch import Tensor
from torch._vmap_internals import vmap
import functools
import itertools
import warnings