[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


================
@@ -1972,18 +1970,16 @@ static xegpu::DistributeLayoutAttr setupGenericStoreAnchorLayout(
 /// Sets up the anchor layout for a store scatter operation.
 xegpu::DistributeLayoutAttr
 xegpu::setupStoreScatterAnchorLayout(xegpu::LayoutKind layoutKind,
-                                     VectorType srcVecTy, int contigChunkSize,
-                                     int numSg, const uArch::uArch *uArch) {
+                                     VectorType srcVecTy, int numSg,
+                                     const uArch::uArch *uArch) {
 
   const int subgroupSize = uArch->getSubgroupSize();
   ArrayRef<int64_t> srcShape = srcVecTy.getShape();
   auto context = srcVecTy.getContext();
 
-  const auto *uArchInstruction =
-      dyn_cast<xegpu::uArch::StoreScatterInstruction>(
-          uArch->getInstruction(xegpu::uArch::InstructionKind::StoreScatter));
-  int maxChunkSize =
-      std::min(uArchInstruction->getMaxLaneAccessSizeBytes(), contigChunkSize);
+  // Scatter stores one element per lane, so the innermost per-lane vector is
+  // capped at a single element.
+  int maxChunkSize = 1;
----------------
Jianhui-Li wrote:

I dont' think this PR should touch these code. the maxChunkSize used here is a hint based on contiguity and uArch restriction, which has nothing to do with the to-be-deprecated user-specified chunk_size attribute. 

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


More information about the Mlir-commits mailing list