| 972 | } |
| 973 | |
| 974 | bool HloTransposeInstruction::IsRank2Transpose() const { |
| 975 | return dimensions() == std::vector<int64>({1, 0}) && |
| 976 | shape().dimensions_size() == 2 && |
| 977 | std::equal(shape().dimensions().begin(), shape().dimensions().end(), |
| 978 | operand(0)->shape().dimensions().rbegin()); |
| 979 | } |
| 980 | |
| 981 | HloInstructionProto HloTransposeInstruction::ToProto() const { |
| 982 | HloInstructionProto proto = HloInstruction::ToProto(); |
nothing calls this directly
no test coverage detected