[Mlir-commits] [mlir] [MLIR][XeGPU] Introduce `xegpu::uArch` usage in target-sensitive passes (PR #163801)
Charitha Saumya
llvmlistbot at llvm.org
Mon Oct 27 15:05:57 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};
----------------
charithaintc wrote:
here shouldn't we take the min of tile size and uArch max size?
https://github.com/llvm/llvm-project/pull/163801
More information about the Mlir-commits
mailing list