This is an archive of the discontinued LLVM Phabricator instance.

[mlir][Vector] Add support for high-order masked contractions
ClosedPublic

Authored by dcaballe on Feb 20 2023, 12:47 PM.

Details

Summary

This patch adds support for masked vector.contract ops that needs to be
decomposed using the ContractionOpLowering pattern. It just slices the
mask according to the rest of the lowering.

Diff Detail

Event Timeline

dcaballe created this revision.Feb 20 2023, 12:47 PM
dcaballe requested review of this revision.Feb 20 2023, 12:47 PM
ThomasRaoux added inline comments.Feb 21 2023, 12:03 PM
mlir/lib/Dialect/Vector/Transforms/VectorTransforms.cpp
1944

dito: is this cast neeed?

1945–1953

nit: could be

Operation *rootOp = op;
Value mask;
if (maskableOp.isMasked()) {
  rewriter.setInsertionPoint(maskableOp.getMaskingOp());
  rootOp = maskableOp.getMaskingOp();
  mask = maskableOp.getMaskingOp().getMask();
}
dcaballe updated this revision to Diff 499351.Feb 21 2023, 7:12 PM

Addressed feedback

ThomasRaoux accepted this revision.Feb 21 2023, 7:26 PM
This revision is now accepted and ready to land.Feb 21 2023, 7:26 PM
This revision was landed with ongoing or failed builds.Feb 21 2023, 11:00 PM
This revision was automatically updated to reflect the committed changes.