Skip to content

Commit

Permalink
[XLA] Fix Warning in OSS build
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 529968563
  • Loading branch information
blakehechtman authored and tensorflower-gardener committed May 6, 2023
1 parent 8df6a70 commit 2d9d9c0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tensorflow/compiler/xla/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -541,15 +541,17 @@ constexpr int NanPayloadBits() {

template <typename T>
constexpr uint64_t QuietNanWithoutPayload() {
if constexpr (const int bits = NanPayloadBits<T>()) {
constexpr int bits = NanPayloadBits<T>();
if constexpr (bits > 0) {
return uint64_t{1} << (bits - 1);
}
return 0;
}

template <typename T>
constexpr uint64_t NanPayloadBitMask() {
if constexpr (const int bits = NanPayloadBits<T>()) {
constexpr int bits = NanPayloadBits<T>();
if constexpr (bits > 0) {
return LsbMask<uint64_t>(bits);
}
return 0;
Expand Down

0 comments on commit 2d9d9c0

Please sign in to comment.