Rename torch._C._TensorBase to TensorBase (#109940)

I have gone ahead and implemented the renaming of the type `torch._C._TensorBase` to a non-private class name `TensorBase`.
The changes also include leaving `torch._C._TensorBase` as an alias to the new type: 70458768fb/torch/csrc/autograd/python_variable.cpp (L2196-L2197) both in the c++ code and in the corresponding `__init__.pyi.in` file:
70458768fb/torch/_C/__init__.pyi.in (L1522)

Fixes #109438

Pull Request resolved: https://github.com/pytorch/pytorch/pull/109940
Approved by: https://github.com/ezyang
This commit is contained in:
Moritz Hennen
2023-09-25 19:10:19 +00:00
committed by PyTorch MergeBot
parent a565f1bee6
commit 09c598745c
12 changed files with 54 additions and 42 deletions

View File

@ -6,7 +6,7 @@ from ._torch_docs import parse_kwargs, reproducibility_notes
def add_docstr_all(method, docstr):
add_docstr(getattr(torch._C._TensorBase, method), docstr)
add_docstr(getattr(torch._C.TensorBase, method), docstr)
common_args = parse_kwargs(