This rewriting was no longer functional after recent migration to one shot
bufferization. However, this revision makes it work again, with a CHECK test
to ensure fusion happens. Note that functionality is tested by several
integration tests.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorRewriting.cpp | ||
---|---|---|
149 | Just out of curiosity, why does the producer has to be zero? Even if it is non-zero |
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorRewriting.cpp | ||
---|---|---|
149 | I am perhaps a bit overly conservative here, but for all bufferization patterns generated, zero init will probably be the norm. We can relax later if we find we are missing real-world cases. |
Just out of curiosity, why does the producer has to be zero?
Even if it is non-zero
T(i,j) = SUM(k, A(i,j,k) * B(i,j,k) * ... )
can be transformed to
T0 = alloc_tensor<0>; T0(i,j) = SUM(T(i, j), SUM(k, A(i,j,k) * B(i,j,k) * ... ))