pytorch icon indicating copy to clipboard operation
pytorch copied to clipboard

DecompCrossRefMode not dispatching correctly

Open fdrocha opened this issue 1 year ago • 0 comments

🐛 Describe the bug

I came across this while working on https://github.com/pytorch/pytorch/pull/85403.

I had to implement decompositions both for both upsample_bicubic2d.default and upsample_bicubic2d.vec. The second one is CompositeExplicit and just calls the first, so it seems I should haven't had to implement it? However, if I don't, then then default decomp is never called in the relevant tests in test/test_decomp.py.

You can check this by commenting out the upsample_bicubic2d_vec in torch/_decomp/decompositions.py in the branch above and adding an assert False to first line of upsample_bicubic2d_default. If you then run pytest tests/test_decomp.py -vk interpolate_bicubic you can see that the assert never triggers.

Any thoughts @ezyang, @ngimel, @jansel, @Chillee?

Versions

https://github.com/pytorch/pytorch/pull/85403

fdrocha avatar Sep 21 '22 11:09 fdrocha