[Mlir-commits] [mlir] [mlir][sparse] Fix number_of_entries for loose-compressed tensors (PR #224167)
Kohei Yamaguchi
llvmlistbot at llvm.org
Mon Sep 28 17:09:57 PDT 2026
================
@@ -1358,6 +1358,35 @@ struct CrdTranslateRewriter : public OpRewritePattern<CrdTranslateOp> {
}
};
+/// Count entries in loose-compressed tensors by traversing their stored
+/// elements. The values buffer may contain holes, so its size is not the
+/// number of entries. Keep the constant-time buffer-size query for formats
+/// without loose-compressed levels.
----------------
sott0n wrote:
Done. I reworded the comment to explicitly state that this changes the constant-time query to an O(n) traversal.
https://github.com/llvm/llvm-project/pull/224167
More information about the Mlir-commits
mailing list