[Mlir-commits] [mlir] [mlir][sparse] Fix memory leaks (part 4) (PR #85729)
Yinying Li
llvmlistbot at llvm.org
Wed Mar 20 10:19:18 PDT 2024
================
@@ -279,6 +279,31 @@ module {
%si = tensor.extract %li[] : tensor<i64>
vector.print %si : i64
+ // TODO: This check is no longer needed once the codegen path uses the
+ // buffer deallocation pass. "dealloc_tensor" turn into a no-op in the
+ // codegen path.
+ %has_runtime = sparse_tensor.has_runtime_library
+ scf.if %has_runtime {
+ // sparse_tensor.assemble copies buffers when running with the runtime
+ // library. Deallocations are needed not needed when running in codgen
----------------
yinying-lisa-li wrote:
Thanks for the explanation! The comment actually said `Deallocations are needed not needed`. Needed or not needed, that is the question ;)
https://github.com/llvm/llvm-project/pull/85729
More information about the Mlir-commits
mailing list