[Mlir-commits] [mlir] [MLIR][XeGPU] Add support for subgroup_id_range (PR #148661)

Adam Siemieniuk llvmlistbot at llvm.org
Wed Jul 23 08:57:52 PDT 2025


================
@@ -315,4 +315,33 @@ def XeGPU_LayoutAttr : XeGPUAttr<"Layout", "layout"> {
   let genVerifyDecl = 1;
 }
 
+def XeGPU_RangeAttr : XeGPUAttr<"Range", "range"> {
+  let summary = [{Specifies a half-open range}];
+  let description = [{
+    `RangeAttr` is an attribute that defines a half-open range [start, end).
+    The range is inclusive of the start value and exclusive of the end value.
+    One usage of this attribute can be to specify the subgroup id range.
+    The subgroup id range can be specified using this attribute,
+    and it can be attached to a scf.if op like
+    ```mlir
+    scf.if %cond {
+      // some operations
+    }{sg_id_range = #xegpu.range<[2, 4]>}
----------------
adam-smnk wrote:

```suggestion
    } {sg_id_range = #xegpu.range<[2, 4]>}
```

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


More information about the Mlir-commits mailing list