[Mlir-commits] [mlir] [MLIR][XeGPU] Add support for subgroup_id_range (PR #148661)
Chao Chen
llvmlistbot at llvm.org
Mon Jul 21 07:44:32 PDT 2025
================
@@ -174,8 +194,27 @@ struct WgToSgCreateNdOp : public OpConversionPattern<xegpu::CreateNdDescOp> {
sgDataDim[i] = rewriter.create<arith::ConstantIndexOp>(loc, sgShape[i]);
}
+ int64_t startOfRange = -1, endOfRange = -1;
+ bool sgIdRangeSpecified =
+ isSgIdRangeSpecified(op, startOfRange, endOfRange);
+
+ Value adjustedSgId = linearSgId;
+ if (sgIdRangeSpecified) {
+ int64_t sgCount = endOfRange - startOfRange;
+ if (computeProduct(sgLayout) != sgCount) {
+ return rewriter.notifyMatchFailure(
+ op, "sg_layout size must match the sg_id_range");
+ }
----------------
chencha3 wrote:
braces are not needed around single statement
https://github.com/llvm/llvm-project/pull/148661
More information about the Mlir-commits
mailing list