This is an archive of the discontinued LLVM Phabricator instance.

[mlir][sparse] add source materizalization callback for sparse tensor codegen type converter.
ClosedPublic

Authored by Peiming on Oct 20 2022, 10:22 AM.

Details

Diff Detail

Event Timeline

Peiming created this revision.Oct 20 2022, 10:22 AM
Herald added a project: Restricted Project. · View Herald Transcript
Peiming requested review of this revision.Oct 20 2022, 10:22 AM
Peiming edited the summary of this revision. (Show Details)
aartbik added inline comments.Oct 20 2022, 10:47 AM
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorPasses.cpp
169 ↗(On Diff #469276)

This looks okay, but shall we do this in the constructor in the SparseTensorCodegen.cpp file?
Just so that all logic is in one place?

mlir::SparseTensorTypeToBufferConverter::SparseTensorTypeToBufferConverter() {

addConversion([](Type type) { return type; });
addConversion(convertSparseTensorType);

}

Peiming updated this revision to Diff 469293.Oct 20 2022, 10:52 AM
Peiming edited the summary of this revision. (Show Details)

address comments from Aart.

aartbik accepted this revision.Oct 20 2022, 10:54 AM
aartbik added inline comments.
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorCodegen.cpp
754

Last nit: Not a sparse tensor.
;=)

(capital N)

757

Ah, this is a nice side-effect of moving it ;)
genTuple reuse

This revision is now accepted and ready to land.Oct 20 2022, 10:54 AM
Peiming updated this revision to Diff 469297.Oct 20 2022, 10:58 AM

fix comment.

Peiming marked 2 inline comments as done.Oct 20 2022, 10:59 AM
This revision was landed with ongoing or failed builds.Oct 20 2022, 11:05 AM
This revision was automatically updated to reflect the committed changes.