Rationale:
Allocating the temporary buffers for access pattern expansion on the stack
(using alloca) is a bit too agressive, since it easily runs out of stack space
for large enveloping tensor dimensions. This revision changes the dynamic
allocation of these buffers with explicit alloc/dealloc pairs.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/test/Dialect/SparseTensor/conversion.mlir | ||
---|---|---|
464 | Note that the original test was never even executed (no CHECK tags) ;-) |
I'll have to take a closer look at the new test, but otherwise everything lgtm
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp | ||
---|---|---|
822–827 | Why not do something like this instead? | |
mlir/test/Dialect/SparseTensor/conversion.mlir | ||
480–488 | Why have the numbers after the .*? We don't do that elsewhere so... |
Modulo my comments, lgtm
mlir/test/Dialect/SparseTensor/sparse_expand.mlir | ||
---|---|---|
27 | Why name %[[D]] if not using it anywhere, especially since it doesn't appear in the CHECK-CONVERT test |
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp | ||
---|---|---|
822–827 | Because that is semantically different. If we are already at top level, that would set parent to the "func" and then exit the loop. In the original, we exit the loop, but at original level. | |
mlir/test/Dialect/SparseTensor/conversion.mlir | ||
480–488 | The joy of CHECK-SAME :-) Normally CHECK is a bit smarter by using context, You see the use of numbers at a few other places to avoid this. |
mlir/test/Dialect/SparseTensor/sparse_expand.mlir | ||
---|---|---|
27 | Yeah, fair enough. Replaced with anonymous pattern. |
Why not do something like this instead?