| 33 | } |
| 34 | |
| 35 | int64 GetNumberOf32bitUnits(const Shape& shape) { |
| 36 | int64 bit_width = primitive_util::BitWidth(shape.element_type()); |
| 37 | CHECK(bit_width == 32 || bit_width == 64); |
| 38 | int64 num_elems = ShapeUtil::ElementsIn(shape); |
| 39 | return num_elems * (bit_width / 32); |
| 40 | } |
| 41 | |
| 42 | StatusOr<HloInstruction*> ConvertSmallFpRngToF32Rng(HloInstruction* rng) { |
| 43 | CHECK_EQ(rng->opcode(), HloOpcode::kRng); |
no test coverage detected