Enable uint8 upsampling 2 (#35029)
Summary:
Hi everyone,
This is a supper small PR to enable `unit8` support for `nearest` up-sampling in `cpu` and `cuda`.
This works enables us to move forward with the support of 'uint8' images in 'torchvision`.
See impacted issues :
https://github.com/pytorch/vision/issues/1375
https://github.com/pytorch/vision/issues/1179#issuecomment-558197607
Note: I wanted to add a unit test to ensure we have the expected behavior. I could not locate the `upsampling` unit tests for `nearest`. I can add the test if you point me to the right location.
Thanks
Pull Request resolved: https://github.com/pytorch/pytorch/pull/35029
Reviewed By: cpuhrsch
Differential Revision: D21227144
Pulled By: fmassa
fbshipit-source-id: 33c4b5188dedd8f7f872e9d797e2a9b58ee7315c