The "sparsification" pass does not need the ability to use runtime values for
the dimension, so the only source for variability would have been user code.
Restricting the dimension to constants simplifies code generation.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorCodegen.cpp | ||
---|---|---|
486 | Much more clear! |
Very nice! Just recently I was wondering to myself why we supported SSA-value dimensions here when we don't for the various other ops (e.g., concat). This helps clean things up a lot :)
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp | ||
---|---|---|
1081 | I can't help but wonder if we shouldn't just define a helper method to do this, since we use that particular expression in a number of different places. Perhaps even just pass getDimension an implicit bool for whether to do zero-extension or not? |
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp | ||
---|---|---|
1081 | Agreed, sounds like a good idea (in follow up revision) to move this into a shared util place |
Much more clear!