[Mlir-commits] [mlir] [mlir][gpu][spirv] Add patterns for gpu.shuffle up/down (PR #139105)
Jakub Kuderski
llvmlistbot at llvm.org
Mon Jun 2 13:00:32 PDT 2025
================
@@ -430,10 +430,12 @@ LogicalResult GPUShuffleConversion::matchAndRewrite(
unsigned subgroupSize =
targetEnv.getAttr().getResourceLimits().getSubgroupSize();
IntegerAttr widthAttr;
+ // The width argument specifies the number of lanes that participate in the
+ // shuffle. The width value should not exceed the subgroup limit.
if (!matchPattern(shuffleOp.getWidth(), m_Constant(&widthAttr)) ||
- widthAttr.getValue().getZExtValue() != subgroupSize)
+ widthAttr.getValue().getZExtValue() > subgroupSize)
return rewriter.notifyMatchFailure(
- shuffleOp, "shuffle width and target subgroup size mismatch");
+ shuffleOp, "shuffle width is larger than target subgroup size");
----------------
kuhar wrote:
This looks incompatible with the assumptions from the comment a few lines above
https://github.com/llvm/llvm-project/pull/139105
More information about the Mlir-commits
mailing list