[llvm] [Matrix] Use tiled loops automatically for large kernels. (PR #179325)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 10 06:10:41 PST 2026
================
@@ -68,9 +68,10 @@ static cl::opt<unsigned> TileSize(
"fuse-matrix-tile-size", cl::init(4), cl::Hidden,
cl::desc(
"Tile size for matrix instruction fusion using square-shaped tiles."));
-static cl::opt<bool> TileUseLoops("fuse-matrix-use-loops", cl::init(false),
- cl::Hidden,
- cl::desc("Generate loop nest for tiling."));
+static cl::opt<unsigned>
+ TileLoopsThreshold("fuse-matrix-loops-threshold", cl::init(200), cl::Hidden,
+ cl::desc("Generate loop nests for tiling when expected "
+ "number of operations exceeds threshold."));
----------------
fhahn wrote:
Hmm, I'd like to limit this to a single flag, to keep things more compact/simpler. One thing to note is that those are not really user facing options and should only be used for testing/debugging. Or as limited workaround in case there is an issue with tiled loop codegen between releases.
Having 0 to disable would require a bit of extra code and explanation, so I'd prefer to not add this to not make things more complex than needed.
WDYT?
https://github.com/llvm/llvm-project/pull/179325
More information about the llvm-commits
mailing list