[Mlir-commits] [mlir] [mlir][SparseTensor][NFC] Improve documentation for SparseTensor_LvlOp (PR #223307)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Sun Sep 13 22:21:32 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-mlir

Author: Vito Secona (secona)

<details>
<summary>Changes</summary>

Update the `sparse_tensor.lvl` documentation to correctly describe the level mapping for `%j floordiv 3`.

---
Full diff: https://github.com/llvm/llvm-project/pull/223307.diff


1 Files Affected:

- (modified) mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td (+1-1) 


``````````diff
diff --git a/mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td b/mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td
index d4901645c51d1..ec7da305bc5b7 100644
--- a/mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td
+++ b/mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td
@@ -624,7 +624,7 @@ def SparseTensor_LvlOp : SparseTensor_Op<"lvl", [ConditionallySpeculatable, NoMe
     %c0 = arith.constant 0 : index
     %x = sparse_tensor.lvl %A, %c0 : tensor<4x?xf32, #BSR>
 
-    // Return the dynamic dimension of %A computed by %j mod 3.
+    // Return the dynamic level size of %A computed by j floordiv 3.
     %c1 = arith.constant 1 : index
     %y = sparse_tensor.lvl %A, %c1 : tensor<4x?xf32, #BSR>
 

``````````

</details>


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


More information about the Mlir-commits mailing list