Turn on type-checking in torch.fx.experimental.symbolic_shapes (#136972)

Signed-off-by: Edward Z. Yang <ezyang@meta.com>

Pull Request resolved: https://github.com/pytorch/pytorch/pull/136972
Approved by: https://github.com/Skylion007
ghstack dependencies: #136917, #136934, #136935
This commit is contained in:
Edward Z. Yang
2024-09-30 10:42:28 -07:00
committed by PyTorch MergeBot
parent 475a8a4e0c
commit 3ff2d93d9f
11 changed files with 319 additions and 190 deletions

View File

@ -314,6 +314,17 @@ class TensorWithFlatten(Protocol):
def stride(self, dim: int) -> int:
...
@overload
def size(self, dim: None = None) -> Tuple[int, ...]:
...
@overload
def size(self, dim: int) -> int:
...
def storage_offset(self) -> int:
...
def dim(self) -> int:
...