Skip to content

Tracking issue: Incorrect Meta Strides / Turn On PyDispatcher in FakeTensor Mode #145094

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

Open
6 tasks
eellison opened this issue Jan 17, 2025 · 1 comment
Open
6 tasks
Labels
module: decompositions Topics related to decomposition (excluding PrimTorch) module: fakeTensor module: pt2-dispatcher PT2 dispatcher-related issues (e.g., aotdispatch, functionalization, faketensor, custom-op, oncall: pt2 triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Comments

@eellison
Copy link
Contributor

eellison commented Jan 17, 2025

🐛 Describe the bug

Incorrect Strides can manifest in errors within torch.compile. Potentially what makes them trickier is that they only sometimes cause errors. An incorrect stride can lay dormant for a while and then cause a problem.

See, this discussion with @ezyang, @bdhirsh and myself about incorrect strides.

There are a number of known issues that yet unfixed. Some of them have outstanding prs, please check with the pr author before taking it on.

Additionally, there are a number of stride & other issues that have been exposed by enabling PyDispatcher in FakeTensorMode. This causes us to potentially route through different decompositions and metas. It is what we use in torch.compile, which means we lack coverage of this mode in our other tests.

Tests exposed by this turning this on:

  • dropout
  • MultiLabelMarginLoss

Fft tests as well, but that might be related to _fft_r2c in the existing issue.

Versions

master

cc @chauhang @penguinwu @SherlockNoMad @zou3519 @bdhirsh @yf225

@soulitzer soulitzer added oncall: pt2 module: decompositions Topics related to decomposition (excluding PrimTorch) labels Jan 21, 2025
@zou3519 zou3519 added triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module module: fakeTensor labels Jan 21, 2025
@pytorch-bot pytorch-bot bot added the module: pt2-dispatcher PT2 dispatcher-related issues (e.g., aotdispatch, functionalization, faketensor, custom-op, label Jan 21, 2025
@vadimkantorov
Copy link
Contributor

Regarding torch.compile + _fft_r2c there is also an issue in:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: decompositions Topics related to decomposition (excluding PrimTorch) module: fakeTensor module: pt2-dispatcher PT2 dispatcher-related issues (e.g., aotdispatch, functionalization, faketensor, custom-op, oncall: pt2 triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

No branches or pull requests

4 participants