(1) also fixes memory leak in sparse2dense rewriting
(2) still needs fix in dense2sparse by skipping zeros
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Dialect/SparseTensor/Transforms/CodegenUtils.cpp | ||
---|---|---|
952 | Should this first assert that the buffer has an appropriate type to be the argument to DeallocOp? I'm thinking mainly about ensuring nice error messages for debugging (since I'm guessing the error would only be caught rather further down down the compilation pipeline). | |
mlir/lib/Dialect/SparseTensor/Transforms/CodegenUtils.h | ||
149 | The type of buffer and the actual implementation are a lot more general than this function name would indicate. Perhaps rename to deallocMemref or deallocBuffer? |
mlir/lib/Dialect/SparseTensor/Transforms/CodegenUtils.cpp | ||
---|---|---|
952 | agreed, also pushed to the next revision (so this one is just moving it out) | |
mlir/lib/Dialect/SparseTensor/Transforms/CodegenUtils.h | ||
149 | agreed, but since I just migrated existing code out, and we have allocDenseTensor, let's do that as a generic follow-up on all these methods |
The type of buffer and the actual implementation are a lot more general than this function name would indicate. Perhaps rename to deallocMemref or deallocBuffer?