This is an archive of the discontinued LLVM Phabricator instance.

[mlir][sparse] Improve ConcatenateOp rewriting for annotated all dense result.
ClosedPublic

Authored by bixia on Jan 11 2023, 9:18 AM.

Details

Summary

Previously, we rely on InsertOp to add values to the result, in the same way we
add values to a sparse tensor with compressed dimensions. We now direct store
values to the values buffer.

Diff Detail

Event Timeline

bixia created this revision.Jan 11 2023, 9:18 AM
Herald added a project: Restricted Project. · View Herald Transcript
bixia requested review of this revision.Jan 11 2023, 9:18 AM
Peiming added inline comments.Jan 11 2023, 3:36 PM
mlir/test/Dialect/SparseTensor/sparse_concat_codegen.mlir
277

Why this cast is needed? is it possible to allocate a static-shaped memref L274 at the first place?

bixia updated this revision to Diff 488423.Jan 11 2023, 4:36 PM
bixia marked an inline comment as done.

Allocate buffer with static shape to avoid memref.cast.
rebase.

mlir/test/Dialect/SparseTensor/sparse_concat_codegen.mlir
277

Good point. Modify genAlloca to support this.

Peiming accepted this revision.Jan 12 2023, 12:55 PM
This revision is now accepted and ready to land.Jan 12 2023, 12:55 PM