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

Function GetNumberOf32bitUnits

tensorflow/compiler/xla/service/rng_expander.cc:35–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33}
34
35int64 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
42StatusOr<HloInstruction*> ConvertSmallFpRngToF32Rng(HloInstruction* rng) {
43 CHECK_EQ(rng->opcode(), HloOpcode::kRng);

Callers 1

ExpandInstructionMethod · 0.85

Calls 2

BitWidthFunction · 0.85
element_typeMethod · 0.45

Tested by

no test coverage detected