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

Function DotIsDefault

tensorflow/compiler/mlir/xla/hlo_function_importer.cc:100–107  ·  view source on GitHub ↗

Returns whether the instruction is a default dot operation.

Source from the content-addressed store, hash-verified

98
99// Returns whether the instruction is a default dot operation.
100bool 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
110StatusOr<mlir::FuncOp> HloFunctionImporter::ImportFunction(

Callers 1

ImportInstructionMethod · 0.85

Calls 4

ProtobufEqualsFunction · 0.85
dimensions_sizeMethod · 0.80
shapeMethod · 0.45
operandMethod · 0.45

Tested by

no test coverage detected