pytorch
pytorch copied to clipboard
DecompCrossRefMode not dispatching correctly
🐛 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