mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Move Tensor.grad back into C++
`Tensor.grad` was moved to python in #30531 to add a warning. However, that warning has since been lowered into C++ so this wrapper is no longer necessary. Pull Request resolved: https://github.com/pytorch/pytorch/pull/76675 Approved by: https://github.com/albanD
This commit is contained in:
committed by
PyTorch MergeBot
parent
dd620c4575
commit
7843a5e882
@ -23,7 +23,7 @@ class _LazyImport:
|
||||
except ImportError:
|
||||
# If packaging isn't installed, try and use the vendored copy
|
||||
# in pkg_resources
|
||||
from pkg_resources import packaging # type: ignore[attr-defined]
|
||||
from pkg_resources import packaging # type: ignore[attr-defined, no-redef]
|
||||
return getattr(packaging.version, self._cls_name)
|
||||
|
||||
def __call__(self, *args, **kwargs):
|
||||
|
Reference in New Issue
Block a user