10000 [Inductor] short-term fix for needs_fixed_stride_order silent incorrectness by zou3519 · Pull Request #133452 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content

[Inductor] short-term fix for needs_fixed_stride_order silent incorrectness #133452

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
wants to merge 9 commits into from
Closed
Changes from 1 commit
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
Prev Previous commit
Update on "[Inductor] short-term fix for needs_fixed_stride_order sil…
…ent incorrectness"

This is a low-risk short-term fix for
#128084, for the purposes of
2.4.1. The actual fix for that issue is more risky and we'll target 2.5.

needs_fixed_stride_order is silently incorrect with args that are
mutable because it creates clones of those args, writes into them, and
doesn't update the original args.

This PR makes it so that needs_fixed_stride_order doesn't apply to
inputs that are being mutated.

This PR doesn't completely fix the problem, but it makes it less
incorrect: most of the time the input already has the correct strides
but inductor fails to recognize it, and in those cases writing directly
to the input is fine.

Test Plan:
- new test

[ghstack-poisoned]
  • Loading branch information
zou3519 committed Aug 16, 2024
commit 04a673829096e64e93eb2e25ceb6f16c70f09e89

No changes to show.

This commit has no content.

0