torch.vmap is a prototype feature and should not be in the stable
binary. This PR:
- Removes the torch.vmap API
- Removes the documentation entry for torch.vmap
- Changes the vmap tests to use an internal API instead of torch.vmap.
Test Plan:
- Tested locally (test_torch, test_autograd, test_type_hints, test_vmap),
but also wait for CI.
are_deterministic_algorithms_enabled
set_warn_always
is_warn_always_enabled
- vmap
_assert
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
# torch.jit.script as a decorator, for instance):
from ._lobpcg import lobpcg as lobpcg
-from ._vmap_internals import vmap as vmap
-
# These were previously defined in native_functions.yaml and appeared on the
# `torch` namespace, but we moved them to c10 dispatch to facilitate custom
# class usage. We add these lines here to preserve backward compatibility.