[Mlir-commits] [mlir] [MLIR][XeGPU] Introduce `xegpu::uArch` usage in target-sensitive passes (PR #163801)
    Artem Kroviakov 
    llvmlistbot at llvm.org
       
    Wed Oct 29 07:59:13 PDT 2025
    
    
  
================
@@ -456,7 +482,22 @@ void LayoutInfoPropagation::visitPrefetchNdOp(
   // Here we assign the default layout to the tensor descriptor operand of
   // prefetch.
   auto tdescTy = prefetch.getTensorDescType();
-  auto prefetchLayout = getDefaultSIMTLayoutInfo(tdescTy);
+
+  auto uArch = getUArch(getChipStr(prefetch).value_or(""));
+  int subgroupSize = uArch->getSubgroupSize();
+  auto uArchInstruction =
+      std::static_pointer_cast<xegpu::uArch::PrefetchNdInstruction>(
+          uArch->getInstruction(xegpu::uArch::InstructionKind::STORE_ND));
+  int maxVecLength =
+      uArchInstruction
+          ->getSortedLaneVectorLengths(tdescTy.getElementTypeBitWidth())
+          .back();
+  SmallVector<int> instData;
+  if (tdescTy.getRank() == 1)
+    instData = {subgroupSize};
+  else
+    instData = {maxVecLength, subgroupSize};
----------------
akroviakov wrote:
Added code to pick the largest multiple of the allowed uArch size, please check it. @charithaintc @Jianhui-Li 
https://github.com/llvm/llvm-project/pull/163801
    
    
More information about the Mlir-commits
mailing list