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

Method PopulateShape

tensorflow/compiler/xla/shape_util.cc:252–262  ·  view source on GitHub ↗

static */

Source from the content-addressed store, hash-verified

250}
251
252/* static */ Status ShapeUtil::PopulateShape(PrimitiveType element_type,
253 absl::Span<const int64> dimensions,
254 Shape* shape) {
255 shape->Clear();
256 shape->set_element_type(element_type);
257 for (int64 dimension : dimensions) {
258 shape->add_dimensions(dimension);
259 }
260 LayoutUtil::SetToDefaultLayout(shape);
261 return ValidateShape(*shape);
262}
263
264/* static */ Shape ShapeUtil::MakeTupleShape(absl::Span<const Shape> shapes) {
265 Shape result;

Callers

nothing calls this directly

Calls 4

ValidateShapeFunction · 0.85
set_element_typeMethod · 0.80
add_dimensionsMethod · 0.80
ClearMethod · 0.45

Tested by

no test coverage detected