This is an archive of the discontinued LLVM Phabricator instance.

[mlir][sparse] introduce sparse_tensor::unpack operation
ClosedPublic

Authored by Peiming on Feb 9 2023, 11:09 AM.

Details

Diff Detail

Event Timeline

Peiming created this revision.Feb 9 2023, 11:09 AM
Herald added a project: Restricted Project. · View Herald Transcript
Peiming requested review of this revision.Feb 9 2023, 11:09 AM
Peiming updated this revision to Diff 496632.Feb 10 2023, 4:33 PM

update example code

aartbik added inline comments.Feb 10 2023, 4:35 PM
mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td
61–62

please rebase with the Pure and doc change before this

85–86

yeah, new example coming up ;-)

110

indice -> indices

111

an integer

114

an unpacked

114

E.g. on next line

117

I would formulate this differently:

The unpack operation ends the life time of the sparse tensor, and using this after the unpack is undefined behavior

122

use 1.1 and 5.5 or so to make it jump out

mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp
623

this error will be bit generic when it happens

how about just, must operate on a COO tensor

623

do we have an invalid.mlir for this?

Peiming updated this revision to Diff 496635.Feb 10 2023, 4:44 PM
Peiming marked 10 inline comments as done.

address comments.

mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp
623

Added

aartbik accepted this revision.Feb 10 2023, 4:45 PM
aartbik added inline comments.
mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp
623

must operate (no s)

This revision is now accepted and ready to land.Feb 10 2023, 4:45 PM
Peiming updated this revision to Diff 496637.Feb 10 2023, 4:49 PM

fix typo.

Peiming marked an inline comment as done.Feb 10 2023, 4:49 PM
This revision was landed with ongoing or failed builds.Feb 10 2023, 5:01 PM
This revision was automatically updated to reflect the committed changes.