2 Commits

Author SHA1 Message Date
Alan Li
0ba1361478
[MLIR][GPU] Use arith instead of index for subgroup_id (#137843)
Trying to simplify situation by using `arith` dialect instead of `index`
in the rewriting of `gpu.subgroup_id`.
2025-04-30 09:03:24 -04:00
Alan Li
ac65b2c327
[MLIR][GPU] Add a pattern to rewrite gpu.subgroup_id (#137671)
This patch impelemnts a rewrite pattern for transforming
`gpu.subgroup_id` to:
```
subgroup_id = linearized_thread_id / gpu.subgroup_size
```

where:
```
linearized_thread_id = thread_id.x + block_dim.x * (thread_id.y + block_dim.y * thread_id.z)
```
2025-04-29 10:54:48 -04:00