Backward-compatible workaround for ATenOp index with dtype=uint8 (#36667)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/36667
Hacky workaround that would allow us to reland https://github.com/pytorch/pytorch/pull/34418
Basically moves the type conversion into ATenOp wrapper that is still used in some models.
Test Plan: Added unittest. Before it was producing warnings about wrong dtype, with this fix it doesn't
Reviewed By: ngimel
Differential Revision: D21037368
fbshipit-source-id: 06b435525d8d182c7607e33fd745060d3d6869e9