This is an archive of the discontinued LLVM Phabricator instance.

[mlir][sparse] Enable VLA ops in index value generation
ClosedPublic

Authored by jsetoain on Apr 26 2022, 7:05 AM.

Details

Summary

Current index value generation uses fixed-length vector ops, this patch
adds an alterantive codegen path compatible with scalable vectors by
using LLVM::StepVectorOp.

Diff Detail

Event Timeline

jsetoain created this revision.Apr 26 2022, 7:05 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 26 2022, 7:05 AM
jsetoain requested review of this revision.Apr 26 2022, 7:05 AM
jsetoain updated this revision to Diff 425204.Apr 26 2022, 7:06 AM

Clang format

jsetoain retitled this revision from [mlir][SparseTensor] Enable VLA ops in index value generation to [mlir][sparse] Enable VLA ops in index value generation.

Thanks for making this work in scalable land!

mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp
897

Interesting. I don't think we should inject unrealized casts ourselves.
What happens if you simply try to cast this from stepvty to vtp?
Does a later pass do the same then?

jsetoain updated this revision to Diff 425450.Apr 27 2022, 2:30 AM

Replace unrealized cast with index cast

jsetoain marked an inline comment as done.Apr 27 2022, 2:32 AM
jsetoain added inline comments.
mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp
897

An index cast does actually do the same thing. It was just a debug-induced bad though process on my side :-) Thanks!

aartbik accepted this revision.Apr 27 2022, 9:13 AM

Thanks for keeping the code up-to-date, Javier. Much appreciated!

This revision is now accepted and ready to land.Apr 27 2022, 9:13 AM
This revision was automatically updated to reflect the committed changes.
jsetoain marked an inline comment as done.