[Mlir-commits] [mlir] [MLIR][SparseTensor] Dense Outer Loop Ordering Strategy (PR #160168)

Aart Bik llvmlistbot at llvm.org
Mon Oct 20 12:59:46 PDT 2025


================
@@ -59,8 +59,10 @@ namespace sparse_tensor {
 
 /// Defines a strategy for loop ordering during sparse code generation.
 enum class LoopOrderingStrategy : unsigned {
-  kDefault, ///< Default strategy (eagerly selects last loop in topological
-            ///< sort).
+  kDefault,    ///< Default strategy (eagerly selects last loop in topological
+               ///< sort).
+  kDenseOuter, ///< Prefer dense, then compressed, then singleton dimensions
----------------
aartbik wrote:

You duplicate the description here in the header (as comment) and in the td file (as user doc). These things tend to become inconsistent over time as folks change one description and not the other. So I would suggest to remove the description here, and just keep the td. Perhaps you can say "see td file" here to refer readers to where more information can be found

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


More information about the Mlir-commits mailing list