pytorch
50e42b90 - Explicitly cast an implicit conversion from some macro defined type to a double (#48290)

Commit
4 years ago
Explicitly cast an implicit conversion from some macro defined type to a double (#48290) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/48290 `scalar_t` here is expanded from nested macros to be an input value and `upper_bound` is templated upon it. Whatever it gives back is unconditionally cast to a `double` via the fact that it is always passed to `binary_kernel_reduce_vec` which has a `double` as the fourth argument. Change it here to be an explicit `static_cast<double>` to do what the compiler was implicitly doing. Test Plan: this is an error with -Werror in llvm11. This allows it to build Reviewed By: ezyang Differential Revision: D25111258 fbshipit-source-id: 6837afec52821f1f57b8c8f2df2d0eb3fc9b58bd
Author
Parents
Loading