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

Method ByteSizeOfElements

tensorflow/compiler/xla/shape_util.cc:649–658  ·  view source on GitHub ↗

static */

Source from the content-addressed store, hash-verified

647}
648
649/* static */ int64 ShapeUtil::ByteSizeOfElements(const Shape& shape) {
650 TF_DCHECK_OK(ValidateShape(shape));
651 CHECK(shape.IsArray());
652 int64 allocated_element_count;
653
654 CHECK(LayoutUtil::IsDenseArray(shape)) << shape.ShortDebugString();
655 allocated_element_count = ElementsIn(shape);
656 return allocated_element_count *
657 ByteSizeOfPrimitiveType(shape.element_type());
658}
659
660/* static */ Status ShapeUtil::ValidateShapeWithOptionalLayoutInternal(
661 const Shape& shape) {

Callers

nothing calls this directly

Calls 5

ValidateShapeFunction · 0.85
ByteSizeOfPrimitiveTypeFunction · 0.85
IsArrayMethod · 0.45
ShortDebugStringMethod · 0.45
element_typeMethod · 0.45

Tested by

no test coverage detected