This is an archive of the discontinued LLVM Phabricator instance.

[sparse] Make GenericOpSparsifier not crash on multi-output dense linalg.generic
ClosedPublic

Authored by bkramer on Oct 4 2022, 9:26 AM.

Details

Summary

The actual transformation doesn't support multi-output GenericOps, but
if we encounter one without sparse annotations we can just leave it
alone.

Diff Detail

Event Timeline

bkramer created this revision.Oct 4 2022, 9:26 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 4 2022, 9:26 AM
bkramer requested review of this revision.Oct 4 2022, 9:26 AM
aartbik added inline comments.Oct 4 2022, 9:58 AM
mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp
1857

how about,

if (op.getNumOutputs() != 1)

return failure();

so we don't enter the annotation analysis at all?

bkramer updated this revision to Diff 465064.Oct 4 2022, 10:02 AM

Fail gracefully instead of asserting

aartbik accepted this revision.Oct 4 2022, 12:39 PM
This revision is now accepted and ready to land.Oct 4 2022, 12:39 PM