This is an archive of the discontinued LLVM Phabricator instance.

[mlir][Vector] Support 0-D vectors in ReductionOp
ClosedPublic

Authored by guraypp on Aug 15 2022, 8:15 AM.

Details

Summary

This commit adds support for 0-D vectors in ReductionOp.

Diff Detail

Event Timeline

guraypp created this revision.Aug 15 2022, 8:15 AM
guraypp requested review of this revision.Aug 15 2022, 8:15 AM
Herald added a project: Restricted Project. · View Herald Transcript
dcaballe accepted this revision.Aug 15 2022, 9:51 PM

Thanks, Guray! LGTM!

mlir/include/mlir/Dialect/Vector/IR/VectorOps.td
270–271

nit: split line?

This revision is now accepted and ready to land.Aug 15 2022, 9:51 PM
guraypp updated this revision to Diff 452961.Aug 16 2022, 5:13 AM

Splitted the large line in two

nicolasvasilache accepted this revision.Aug 16 2022, 5:45 AM

LGTM conditioned on trimming unnecessary tests.

mlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir
1120

Can we add just 1 test ? The behavior you want to test here is already covered and replicating the same test for different elemental types is unnecessary.

mlir/test/Dialect/Vector/ops.mlir
549

same here re duplication plz

guraypp updated this revision to Diff 452972.Aug 16 2022, 5:53 AM

trimmed the extra tests

This revision was automatically updated to reflect the committed changes.