Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tools/pyi/gen_pyi.py
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ def gen_pyi(
"def size(self, dim: _int) -> _int: ...",
],
"stride": [
"def stride(self) -> Tuple[_int]: ...",
"def stride(self) -> Tuple[_int, ...]: ...",
"def stride(self, _int) -> _int: ...",
],
"new_ones": [
Expand Down
2 changes: 1 addition & 1 deletion torch/_prims/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1273,7 +1273,7 @@ def _collapse_view_helper(
strides = (1,)
else:
shape = a.shape # type: ignore[assignment]
strides = a.stride()
strides = a.stride() # type: ignore[assignment]

utils.validate_idx(len(shape), start)
utils.validate_exclusive_idx(len(shape), end)
Expand Down
2 changes: 1 addition & 1 deletion torch/fx/passes/shape_prop.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class TensorMetadata(NamedTuple):
shape : torch.Size
dtype : torch.dtype
requires_grad : bool
stride : Tuple[int]
stride : Tuple[int, ...]
memory_format : Optional[torch.memory_format]

# Quantization metadata
Expand Down