| 70 | } |
| 71 | |
| 72 | HloSharding 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 | |
| 82 | HloSharding HloSharding::Single(const Shape& shape, |
| 83 | const HloSharding& sharding) { |
nothing calls this directly
no test coverage detected