Skip to content

Commit

Permalink
Update on "Fix auto exponent issue for torch.pow"
Browse files Browse the repository at this point in the history
Fixes pytorch/xla#2688 #46936

[ghstack-poisoned]
  • Loading branch information
anjali411 committed Dec 28, 2020
1 parent a664fa9 commit 1a8bdbd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aten/src/ATen/native/cpu/PowKernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ void pow_tensor_scalar_kernel(TensorIterator& iter, Scalar exp_scalar) {
);
} else if (exp == -0.5) {
cpu_kernel_vec(iter,
[](scalar_t base) -> scalar_t {
[](scalar_t base) __ubsan_ignore_float_divide_by_zero__ -> scalar_t {
return 1.0 / std::sqrt(base);
},
[](Vec base) -> Vec { return base.rsqrt(); }
Expand Down

0 comments on commit 1a8bdbd

Please sign in to comment.