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

Method UpdateDynamicDimension

tensorflow/compiler/xla/shape_util.cc:301–313  ·  view source on GitHub ↗

static */

Source from the content-addressed store, hash-verified

299}
300
301/* static */ void ShapeUtil::UpdateDynamicDimension(Shape* shape,
302 ShapeIndexView index,
303 int64 dim,
304 bool is_dynamic) {
305 if (index.empty()) {
306 CHECK(!shape->IsTuple());
307 shape->set_dynamic_dimension(dim, is_dynamic);
308 return;
309 }
310
311 UpdateDynamicDimension(shape->mutable_tuple_shapes(index.front()),
312 index.ConsumeFront(), dim, is_dynamic);
313}
314
315/* static */ void ShapeUtil::AppendMajorDimension(int bound, Shape* shape) {
316 CHECK(LayoutUtil::IsDenseArray(*shape));

Callers

nothing calls this directly

Calls 6

set_dynamic_dimensionMethod · 0.80
mutable_tuple_shapesMethod · 0.80
ConsumeFrontMethod · 0.80
emptyMethod · 0.45
IsTupleMethod · 0.45
frontMethod · 0.45

Tested by

no test coverage detected