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

Method ElementHasBitWidth

tensorflow/compiler/xla/shape_util.cc:331–336  ·  view source on GitHub ↗

static */

Source from the content-addressed store, hash-verified

329}
330
331/* static */ bool ShapeUtil::ElementHasBitWidth(const Shape& shape, int bits) {
332 if (!shape.IsArray()) {
333 return false;
334 }
335 return primitive_util::BitWidth(shape.element_type()) == bits;
336}
337
338/* static */ bool ShapeUtil::ElementIsSigned(const Shape& shape) {
339 switch (shape.element_type()) {

Callers

nothing calls this directly

Calls 3

BitWidthFunction · 0.85
IsArrayMethod · 0.45
element_typeMethod · 0.45

Tested by

no test coverage detected