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

Method SingleTuple

tensorflow/compiler/xla/service/hlo_sharding.cc:72–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70}
71
72HloSharding HloSharding::SingleTuple(const Shape& tuple_shape,
73 const HloSharding& sharding) {
74 CHECK(tuple_shape.IsTuple()) << ShapeUtil::HumanString(tuple_shape);
75 CHECK(!sharding.IsTuple()) << sharding.ToString();
76 int64 leaf_count = RequiredLeaves(tuple_shape);
77 std::vector<HloSharding> flattened_list;
78 flattened_list.resize(leaf_count, sharding);
79 return HloSharding(flattened_list);
80}
81
82HloSharding HloSharding::Single(const Shape& shape,
83 const HloSharding& sharding) {

Callers

nothing calls this directly

Calls 4

HloShardingClass · 0.85
IsTupleMethod · 0.45
ToStringMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected