Fully native DTensor.__new__ (#162508)

Move the entirety of `__new__` into C++, saving a layer of disable_dynamo and making progress toward all-C++.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/162508
Approved by: https://github.com/ezyang
ghstack dependencies: #161695
This commit is contained in:
Scott Wolchok
2025-09-18 13:19:20 -07:00
committed by PyTorch MergeBot
parent 51152efa67
commit 5599f487ef
4 changed files with 129 additions and 103 deletions

View File

@ -362,7 +362,7 @@ def get_ignored_functions() -> set[Callable]:
Tensor._view_func,
Tensor._view_func_unsafe,
Tensor._rev_view_func_unsafe,
Tensor._make_dtensor,
Tensor._dtensor__new__,
Tensor._make_wrapper_subclass,
Tensor._python_dispatch.__get__,
Tensor._has_symbolic_sizes_strides.__get__,