| 66 | bool ShapeLayout::LayoutIsSet() const { return LayoutUtil::HasLayout(shape_); } |
| 67 | |
| 68 | void ShapeLayout::ResetLayout(const Layout& layout) { |
| 69 | CHECK(!shape_.IsTuple()); |
| 70 | CHECK(!shape_.IsOpaque()); |
| 71 | *shape_.mutable_layout() = layout; |
| 72 | TF_CHECK_OK(ShapeUtil::ValidateShape(shape_)); |
| 73 | } |
| 74 | |
| 75 | void ShapeLayout::ResetLayout(const Layout& layout, |
| 76 | ShapeIndexView shape_index) { |