mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:30:26 +08:00
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:
committed by
PyTorch MergeBot
parent
475a8a4e0c
commit
3ff2d93d9f
@ -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:
|
||||
...
|
||||
|
||||
|
Reference in New Issue
Block a user