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

Method DotGeneral

tensorflow/compiler/xla/client/xla_builder.cc:1130–1147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1128}
1129
1130XlaOp XlaBuilder::DotGeneral(XlaOp lhs, XlaOp rhs,
1131 const DotDimensionNumbers& dimension_numbers,
1132 const PrecisionConfig* precision_config) {
1133 return ReportErrorOrReturn([&]() -> StatusOr<XlaOp> {
1134 HloInstructionProto instr;
1135 TF_ASSIGN_OR_RETURN(const Shape* lhs_shape, GetShapePtr(lhs));
1136 TF_ASSIGN_OR_RETURN(const Shape* rhs_shape, GetShapePtr(rhs));
1137 TF_ASSIGN_OR_RETURN(Shape shape,
1138 ShapeInference::InferDotOpShape(*lhs_shape, *rhs_shape,
1139 dimension_numbers));
1140 *instr.mutable_shape() = shape.ToProto();
1141 *instr.mutable_dot_dimension_numbers() = dimension_numbers;
1142 if (precision_config != nullptr) {
1143 *instr.mutable_precision_config() = *precision_config;
1144 }
1145 return AddInstruction(std::move(instr), HloOpcode::kDot, {lhs, rhs});
1146 });
1147}
1148
1149Status XlaBuilder::VerifyConvolution(
1150 const Shape& lhs_shape, const Shape& rhs_shape,

Callers 1

DotGeneralFunction · 0.45

Calls 3

mutable_shapeMethod · 0.45
ToProtoMethod · 0.45

Tested by

no test coverage detected