MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / MakeBitwiseErrorStatus

Function MakeBitwiseErrorStatus

tensorflow/compiler/xla/literal_comparison.cc:102–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100
101template <typename NativeT, typename UnsignedT>
102Status MakeBitwiseErrorStatus(NativeT lhs, NativeT rhs,
103 absl::Span<const int64> multi_index) {
104 auto ulhs = absl::bit_cast<UnsignedT>(GetRawValue(lhs));
105 auto urhs = absl::bit_cast<UnsignedT>(GetRawValue(rhs));
106 auto lhs_double = static_cast<double>(lhs);
107 auto rhs_double = static_cast<double>(rhs);
108 return InvalidArgument(
109 "floating values are not bitwise-equal; and equality testing "
110 "was requested: %s=%s=%a vs %s=%s=%a at array index %s",
111 StrCat(absl::Hex(ulhs)), RoundTripFpToString(lhs), lhs_double,
112 StrCat(absl::Hex(urhs)), RoundTripFpToString(rhs), rhs_double,
113 LiteralUtil::MultiIndexAsString(multi_index));
114}
115
116template <typename NativeT>
117Status MakeErrorStatus(NativeT lhs, NativeT rhs,

Callers

nothing calls this directly

Calls 5

InvalidArgumentFunction · 0.85
HexClass · 0.85
RoundTripFpToStringFunction · 0.85
GetRawValueFunction · 0.70
StrCatFunction · 0.50

Tested by

no test coverage detected