Tracking issue: Incorrect Meta Strides / Turn On PyDispatcher in FakeTensor Mode #145094
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
🐛 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.
full_like
: inductorfull_like
decompositions give incorrect strides #144699_unsafe_index
: incorrect _unsafe_index meta #139312_fft_r2c
: [export] _fft_r2c does not support dynamic shapes #135087_constant_pad_nd
: Wrong meta function for constant_pad_nd #144187Additionally, 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:
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
The text was updated successfully, but these errors were encountered: