pytorch
670efb97 - [CUDA] Use accumulate type to improve accuracy of grid_sample on half precision inputs (#90427)

Commit
2 years ago
[CUDA] Use accumulate type to improve accuracy of grid_sample on half precision inputs (#90427) Fixes https://github.com/pytorch/pytorch/issues/89836 This PR changes the CUDA kernels of grid_sample 2d and 3d, forward, to use accumulate type to improve accuracy on half precision inputs. Also, the backward error on grad with half input is in the order of 1e-4, unlike 1e2 in forward process. The backward kernels are thus unchanged. Pull Request resolved: https://github.com/pytorch/pytorch/pull/90427 Approved by: https://github.com/ngimel
Author
Committer
Parents
Loading