Returns whether the instruction is a default dot operation.
| 98 | |
| 99 | // Returns whether the instruction is a default dot operation. |
| 100 | bool DotIsDefault(const HloInstruction* instruction) { |
| 101 | auto dnums = instruction->dot_dimension_numbers(); |
| 102 | DotDimensionNumbers default_dimension_numbers; |
| 103 | default_dimension_numbers.add_lhs_contracting_dimensions( |
| 104 | instruction->operand(0)->shape().dimensions_size() == 1 ? 0 : 1); |
| 105 | default_dimension_numbers.add_rhs_contracting_dimensions(0); |
| 106 | return xla::protobuf_util::ProtobufEquals(dnums, default_dimension_numbers); |
| 107 | } |
| 108 | } // namespace |
| 109 | |
| 110 | StatusOr<mlir::FuncOp> HloFunctionImporter::ImportFunction( |
no test coverage detected