Skip to content

Commit

Permalink
In the CUDA implementation of erfinv, erfinv() should be used for dou…
Browse files Browse the repository at this point in the history
…ble (#25337)

Summary:
This best preserves accuracy, while erfinvf() should be used for half and float.

This is also consistent with the implementation before the migration: pytorch/pytorch#24943
Pull Request resolved: pytorch/pytorch#25337

Differential Revision: D17102333

Pulled By: zou3519

fbshipit-source-id: 5178cff534cf5f10d86ab04d4b6c1779ffedf49e
  • Loading branch information
xuhdev authored and facebook-github-bot committed Sep 10, 2019
1 parent b2615d9 commit e81a648
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aten/src/ATen/native/cuda/UnaryOpsKernel.cu
Expand Up @@ -66,7 +66,7 @@ void sign_kernel_cuda(TensorIterator& iter){
void erfinv_kernel_cuda(TensorIterator& iter) {
AT_DISPATCH_FLOATING_TYPES_AND_HALF(iter.dtype(), "erfinv_cuda", [&]() {
gpu_kernel(iter, []GPU_LAMBDA(scalar_t a) -> scalar_t {
return erfinvf(a);
return ::erfinv(a);
});
});
}
Expand Down

0 comments on commit e81a648

Please sign in to comment.