This is an archive of the discontinued LLVM Phabricator instance.

[mlir][sparse] extend foreach operation to accept reduction arguments.
ClosedPublic

Authored by Peiming on Nov 4 2022, 1:36 PM.

Diff Detail

Event Timeline

Peiming created this revision.Nov 4 2022, 1:36 PM
Herald added a project: Restricted Project. · View Herald Transcript
Peiming requested review of this revision.Nov 4 2022, 1:36 PM
aartbik added inline comments.Nov 4 2022, 1:46 PM
mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td
872

update doc with init/results

903

Do we have two example sections?

Regardless, please add an example with SSA chain and yield

mlir/test/Dialect/SparseTensor/invalid.mlir
584

can you add one with a mismatch in the yield?

aartbik accepted this revision.Nov 4 2022, 4:17 PM

Good to go after address my nits.

This revision is now accepted and ready to land.Nov 4 2022, 4:17 PM
Peiming updated this revision to Diff 473367.Nov 4 2022, 4:18 PM
Peiming marked 2 inline comments as done.

address comments from Aart

Peiming marked an inline comment as done.Nov 4 2022, 4:18 PM
aartbik added inline comments.Nov 4 2022, 4:26 PM
mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td
871

typo: variable, and probably even plural, variables

903

Maybe, For example:
too, to be consistent?

Peiming marked an inline comment as done.Nov 4 2022, 4:29 PM
Peiming added inline comments.
mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td
903

Can I remove it?

This used to be the common parts for all sparse tensor operations, but now it seems useless since it does not bring in any new information here.

Peiming updated this revision to Diff 473372.Nov 4 2022, 4:30 PM

fix typo + address comments from Aart

This revision was landed with ongoing or failed builds.Nov 4 2022, 4:34 PM
This revision was automatically updated to reflect the committed changes.