This is an archive of the discontinued LLVM Phabricator instance.

[mlir][sparse] fix crashes when using custom reduce with unary operation.
ClosedPublic

Authored by Peiming on Jun 5 2023, 3:26 PM.

Diff Detail

Event Timeline

Peiming created this revision.Jun 5 2023, 3:26 PM
Herald added a reviewer: aartbik. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
Peiming requested review of this revision.Jun 5 2023, 3:26 PM
Peiming edited the summary of this revision. (Show Details)Jun 5 2023, 3:29 PM
aartbik accepted this revision.Jun 5 2023, 4:28 PM
aartbik added inline comments.
mlir/lib/Dialect/SparseTensor/Transforms/SparseVectorization.cpp
522

You can do this even before the yield = ... statement

and perhaps let's even test pedantically

if (block.getOperations().size() <= 1)
   return false

so that we never crash getting the yield either

This revision is now accepted and ready to land.Jun 5 2023, 4:28 PM
Peiming updated this revision to Diff 528625.Jun 5 2023, 4:33 PM
Peiming edited the summary of this revision. (Show Details)

address comments.

This revision was landed with ongoing or failed builds.Jun 5 2023, 4:41 PM
This revision was automatically updated to reflect the committed changes.