This is an archive of the discontinued LLVM Phabricator instance.

[mlir][sparse] introduce operations to query sparse tensor slice offset/strides at the given dimenion
ClosedPublic

Authored by Peiming on Jan 10 2023, 3:46 PM.

Diff Detail

Event Timeline

Peiming created this revision.Jan 10 2023, 3:46 PM
Herald added a project: Restricted Project. · View Herald Transcript
Peiming requested review of this revision.Jan 10 2023, 3:46 PM
Peiming updated this revision to Diff 488789.Jan 12 2023, 3:18 PM

[mlir][sparse] extends storage specifier operations for slices.

aartbik added inline comments.Feb 15 2023, 1:42 PM
mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td
301

can you add a bit more in the description other than an example
Having a simple illustrative example in terms of a tensor value helps too

will these be implemented both along lib path as well as direct IR path?

wrengr added inline comments.Feb 15 2023, 1:47 PM
mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td
298

Do you really mean "dimension" here? or is this actually a "level"?

313

ditto

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

use getRankedTensorType

776

ditto

Peiming added inline comments.Feb 15 2023, 1:53 PM
mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td
298

I did mean dimension. Because slice should be applied on the user-faced shape (if you have high order mapping, the slice is not applied on storage level).

Peiming marked 2 inline comments as done.Feb 15 2023, 1:53 PM
wrengr added inline comments.Feb 15 2023, 2:36 PM
mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td
298

Cool cool. I just wanted to make sure we got the right thing, so we don't need to change it later :)

Peiming updated this revision to Diff 497840.Feb 15 2023, 4:18 PM
Peiming marked 4 inline comments as done.

address comments.

aartbik accepted this revision.Feb 15 2023, 4:22 PM
aartbik added inline comments.
mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td
304

are still a work in progress

331

same

This revision is now accepted and ready to land.Feb 15 2023, 4:22 PM
Peiming updated this revision to Diff 497841.Feb 15 2023, 4:26 PM
Peiming marked 2 inline comments as done.

address comments.

This revision was landed with ongoing or failed builds.Feb 15 2023, 4:31 PM
This revision was automatically updated to reflect the committed changes.