`vector.contract` is being lowered to the default mul/add contraction
regardless if of the kind indicated. Stop the lowering completely in
this case until the correct one can be implemented.
Reviewed By: springerm, ThomasRaoux
Differential Revision: https://reviews.llvm.org/D136079
op.getRhsType().getElementType() != getElementTypeOrSelf(op.getAccType()))
return failure();
+ // TODO: the code below assumes the default contraction, make sure it supports
+ // other kinds before enabling this lowering.
+ if (op.getKind() != vector::CombiningKind::ADD) {
+ return rewriter.notifyMatchFailure(
+ op, "contractions other than 'add' not supported");
+ }
+
// TODO: implement benefits, cost models.
MLIRContext *ctx = op.getContext();
ContractionOpToMatmulOpLowering pat1(vectorTransformOptions, ctx);