[llvm-branch-commits] [mlir] [mlir][sparse] Add `has_runtime_library` test op (PR #85355)

Matthias Springer via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Mar 14 20:21:32 PDT 2024


================
@@ -140,10 +140,16 @@ module {
     sparse_tensor.print %s1 : tensor<4x3x2xf32, #BatchedCSR>
     sparse_tensor.print %s2 : tensor<4x3x2xf32, #CSRDense>
 
-    // FIXME: doing this explicitly crashes runtime
-    // bufferization.dealloc_tensor %s0 : tensor<4x3x2xf32, #CCC>
-    // bufferization.dealloc_tensor %s1 : tensor<4x3x2xf32, #BatchedCSR>
-    // bufferization.dealloc_tensor %s2 : tensor<4x3x2xf32, #CSRDense>
+    %has_runtime = sparse_tensor.has_runtime_library
----------------
matthias-springer wrote:

Note: This check is no longer needed when switching to the buffer deallocation pass. When running in codegen mode, `dealloc_tensor` will turn into a no-op.


https://github.com/llvm/llvm-project/pull/85355


More information about the llvm-branch-commits mailing list