mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-14 20:57:59 +00:00
Fix compiler warning for MathConstants.h (#52123)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/52123 Compiler currently complains: ``` caffe2/c10/util/MatchConstants.h(18): warning: calling a constexpr __host__ function("from_bits") from a __host__ __device__ function("pi") is not allowed. ``` This diff extirpates the warning Test Plan: Sandcastle tests Reviewed By: xush6528 Differential Revision: D26379485 fbshipit-source-id: ab4821119cba8c43fd1d5788c4632d0613529ec8
This commit is contained in:
parent
eaad002cf6
commit
f1e004b954
1 changed files with 1 additions and 1 deletions
|
|
@ -81,7 +81,7 @@ struct alignas(2) BFloat16 {
|
|||
#endif
|
||||
|
||||
struct from_bits_t {};
|
||||
static constexpr from_bits_t from_bits() {
|
||||
static constexpr C10_HOST_DEVICE from_bits_t from_bits() {
|
||||
return from_bits_t();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue