This is an archive of the discontinued LLVM Phabricator instance.

[mlir] [VectorOps] Allow AXPY to be expressed as special case of OUTERPRODUCT
ClosedPublic

Authored by aartbik on Jul 8 2020, 9:35 PM.

Details

Summary

This specialization allows sharing more code where an AXPY follows naturally
in cases where an OUTERPRODUCT on a scalar would be generated.

Diff Detail

Event Timeline

aartbik created this revision.Jul 8 2020, 9:35 PM
aartbik updated this revision to Diff 276634.Jul 8 2020, 9:45 PM

fixed typo in example text

aartbik updated this revision to Diff 276900.Jul 9 2020, 7:53 PM

favor rhs scalar

Thanks for adopting what we discussed previously and special casing the impl!

Overall this looks good, I was expecting to see much more red on the VectorTransforms side as well as folding the AXPY into OuterProduct option.
Is this left for a future revision?
It seems the refactoring would be more compelling if it had all the red it deserves :)

Is this left for a future revision?

Yes, the merging of the outerproduct/AXPY lowering is already done, but in a separate CL.

I like to keep CL's small to make the review easier, and extending the semantics of outer with axpy seemed a logically contained unit.
Refactoring to use the new operation seemed another logical unit.

Refactoring to use the new operation seemed another logical unit.

SGTM, thanks!

This revision is now accepted and ready to land.Jul 10 2020, 12:02 PM
This revision was automatically updated to reflect the committed changes.