File tree Expand file tree Collapse file tree 2 files changed +2
-7
lines changed
Expand file tree Collapse file tree 2 files changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ limitations under the License.
1919#define XLA_PRIMITIVE_UTIL_H_
2020
2121#include < array>
22+ #include < climits>
2223#include < cstdint>
2324#include < limits>
2425#include < string>
@@ -696,7 +697,7 @@ inline constexpr int PrimitiveTypeBitWidth() {
696697 (IsSignedIntegralType (primitive_type) ? 1 : 0 );
697698 }
698699 if constexpr (primitive_type == PRED) {
699- return std::numeric_limits< NativeT>::digits ;
700+ return sizeof ( NativeT) * CHAR_BIT ;
700701 }
701702 if constexpr (IsMXType (primitive_type)) {
702703 return NativeT::kBits ;
Original file line number Diff line number Diff line change @@ -202,9 +202,6 @@ ENTRY main {
202202}
203203
204204TEST_F (BitcastConvertHloTest, FourPredToF32) {
205- if (test::DeviceTypeIs ({test::kTpu })) {
206- GTEST_SKIP ();
207- }
208205 absl::string_view hlo_string = R"(
209206HloModule bitcast_to_smaller
210207
@@ -225,9 +222,6 @@ ENTRY main {
225222 ROOT out = pred[10] bitcast-convert(p)
226223}
227224)" ;
228- if (test::DeviceTypeIs ({test::kTpu })) {
229- GTEST_SKIP ();
230- }
231225 EXPECT_TRUE (RunAndCompare (hlo_string, ErrorSpec{1e-5 , 1e-5 }));
232226}
233227
You can’t perform that action at this time.
0 commit comments