[Mlir-commits] [mlir] [mlir][xegpu] Remove chunk_size attribute; infer from types (PR #205122)
Jianhui Li
llvmlistbot at llvm.org
Wed Sep 2 15:58:29 PDT 2026
================
@@ -1849,13 +1838,20 @@ xegpu::setupLoadNdAnchorLayout(xegpu::LayoutKind layoutKind,
///
/// For Subgroup layout, uses the consumer layout directly.
///
-/// For InstData layout, takes consumer's inst_data as-is. lane_layout and
-/// lane_data are taken from the consumer when present; otherwise the helper
-/// derives the standard scatter-style default (subgroupSize lanes on the
-/// innermost dim, per-lane vector capped by maxChunkSize).
+/// For InstData layout, takes consumer's inst_data as-is; lane_layout and
+/// lane_data are taken from the consumer.
+///
+/// For Lane layout, lane_layout/lane_data are taken from the consumer.
///
-/// For Lane layout, lane_layout/lane_data are taken from the consumer when
-/// present; otherwise derived from the same default.
+/// TODO: `maxChunkSize` (the per-lane contiguous-chunk cap from the uArch's max
+/// lane access size, or 1 for a plain gather) is currently NOT consumed on the
+/// load path: a load always has a consumer whose layout dictates lane_layout /
+/// lane_data, so the cap is inherited implicitly. It is retained here for the
+/// planned LoadMatrix/StoreMatrix coalescing, which will need to *derive* a
+/// chunked default when no consumer layout is available -- mirroring the store
----------------
Jianhui-Li wrote:
Is the comment correct? The logic assumes the consumer layout must be present. But it didn't apply the cap using maxChunkSize. I think it is just a missing logic.
https://github.com/llvm/llvm-project/pull/205122
More information about the Mlir-commits
mailing list