8000 [Inductor] Fix the lowering of squeeze when input is not contiguous by leslie-fang-intel · Pull Request #146746 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content

[Inductor] Fix the lowering of squeeze when input is not contiguous #146746

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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
3 changes: 0 additions & 3 deletions test/inductor/test_unbacked_symints.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,9 +385,6 @@ def fn(t, start, length):
@skipGPUIf(not HAS_GPU, "requires gpu and triton")
@dynamo_config.patch(capture_dynamic_output_shape_ops=True)
def test_issue_143498(self, device):
if device == "cpu":
raise unittest.SkipTest("CPU Failure")

class Model(torch.nn.Module):
def __init__(self) -> None:
super().__init__()
Expand Down
4 changes: 3 additions & 1 deletion torch/_inductor/ir.py
Original file line number Diff line number Diff line change
Expand Up @@ -2769,7 +2769,9 @@ def fake_reindex(index): # type: ignore[no-untyped-def]
# TODO: unbacked should not diverge from backed in determining striding
# Need to require contiguous here instead of realize, see:
# https://github.com/pytorch/pytorch/issues/145561
x = ExternKernel.require_contiguous(x)
x = ExternKernel.require_exact_strides(
x, FlexibleLayout.contiguous_strides(x.get_size())
)

storage, old_layout = as_storage_and_layout(x, want_contiguous=True)
new_layout = FixedLayout(
Expand Down
Loading
0