<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/mlir/test/lib/Dialect/XeGPU/TestXeGPUTransforms.cpp, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[MLIR][XeGPU] Matrix load/store subgroup distribution (#165008)</title>
<updated>2025-11-03T20:48:27+00:00</updated>
<author>
<name>Artem Kroviakov</name>
<email>71938912+akroviakov@users.noreply.github.com</email>
</author>
<published>2025-11-03T20:48:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=68c4c83bcbf9612a02074b946fe6bb73054183ef'/>
<id>68c4c83bcbf9612a02074b946fe6bb73054183ef</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][xegpu] Add more tests in XeGPU subgroup distribution.  (#162543)</title>
<updated>2025-10-10T16:27:36+00:00</updated>
<author>
<name>Charitha Saumya</name>
<email>136391709+charithaintc@users.noreply.github.com</email>
</author>
<published>2025-10-10T16:27:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=bd6da1feaacf58a42ecdfd3cfa3c489bc911d317'/>
<id>bd6da1feaacf58a42ecdfd3cfa3c489bc911d317</id>
<content type='text'>
This PR adds some tests for covering some useful corner cases.

1. more tests for `vector.shape_cast` distribution.
2. testing for `MoveFuncBodyToWarpOp` pattern that was not possible
before.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This PR adds some tests for covering some useful corner cases.

1. more tests for `vector.shape_cast` distribution.
2. testing for `MoveFuncBodyToWarpOp` pattern that was not possible
before.</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][xegpu] Create a test pass for subgroup distribution.  (#161592)</title>
<updated>2025-10-03T19:35:13+00:00</updated>
<author>
<name>Charitha Saumya</name>
<email>136391709+charithaintc@users.noreply.github.com</email>
</author>
<published>2025-10-03T19:35:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b86fef88c54b20812ed3f1a67869dcaa54a07882'/>
<id>b86fef88c54b20812ed3f1a67869dcaa54a07882</id>
<content type='text'>
Current subgroup distribution test employ the entire
`xegpu-subgroup-distribute` pass which include multiple steps like
layout propagation, move func body into warp op, and distribute to work
items.

This makes it harder to isolate the testing for xegpu subgroup
distribution logic, because certain corner cases may be not supported
yet by other steps mentioned above.

This PR introduces a test pass for subgroup distribution logic and
isolate the testing for distribution logic. We plan to add more corner
case (that were not possible before) covering non-xegpu ops (like
vector) in next PRs.

This PR also include,
1. minor bug fixes in gather/scatter distribution.  
2. bug fix in vector multi reduction lowering where it fails to retain
some layouts.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Current subgroup distribution test employ the entire
`xegpu-subgroup-distribute` pass which include multiple steps like
layout propagation, move func body into warp op, and distribute to work
items.

This makes it harder to isolate the testing for xegpu subgroup
distribution logic, because certain corner cases may be not supported
yet by other steps mentioned above.

This PR introduces a test pass for subgroup distribution logic and
isolate the testing for distribution logic. We plan to add more corner
case (that were not possible before) covering non-xegpu ops (like
vector) in next PRs.

This PR also include,
1. minor bug fixes in gather/scatter distribution.  
2. bug fix in vector multi reduction lowering where it fails to retain
some layouts.</pre>
</div>
</content>
</entry>
<entry>
<title>[MLIR] Remove unused debug macros (NFC)</title>
<updated>2025-10-01T12:09:58+00:00</updated>
<author>
<name>Mehdi Amini</name>
<email>joker.eph@gmail.com</email>
</author>
<published>2025-10-01T12:09:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=da160574e0b28e279de4e06edfc66ff3c0a06c9a'/>
<id>da160574e0b28e279de4e06edfc66ff3c0a06c9a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][XeGPU][XeGPUUnroll] Support new syntax with offsets moved to load_nd/store_nd/prefetch_nd (#160323)</title>
<updated>2025-09-25T18:31:17+00:00</updated>
<author>
<name>Dmitry Chigarev</name>
<email>dmitry.chigarev@intel.com</email>
</author>
<published>2025-09-25T18:31:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=04258fe3b15c9ecf78848c9b1470e1048844989e'/>
<id>04258fe3b15c9ecf78848c9b1470e1048844989e</id>
<content type='text'>
Adds support for new syntax in XeGPUUnroll for:
1. `create_nd_desc` without offsets
2. `load_nd` with offsets
3. `store_nd` with offsets
4. `prefetch_nd` with offsets

`create_nd_desc with offsets` + `load_nd with offsets` won't be lowered
correctly. In this case the IR would still have two unrealized
conversions that will fail later in the pipeline.

The offsets computation for the unrolled tile is now moved from
descriptors to load/store/prefetch operations. The resulted IR now has
one single descriptor that is being iterated in load/store/prefetch ops.

&lt;details&gt;&lt;summary&gt;old/new behavior examples&lt;/summary&gt;

```mlir
// before unroll pass:
gpu.func @load_nd(%src: memref&lt;256x318xf32&gt;) -&gt; vector&lt;24x32xf32&gt; {
  %tdesc = xegpu.create_nd_tdesc %src : memref&lt;256x318xf32&gt; -&gt; !xegpu.tensor_desc&lt;24x32xf32, #xegpu.layout&lt;inst_data = [8, 16]&gt;&gt;
  %ld = xegpu.load_nd %tdesc[8, 16]: !xegpu.tensor_desc&lt;24x32xf32, #xegpu.layout&lt;inst_data = [8, 16]&gt;&gt; -&gt; vector&lt;24x32xf32&gt;
  gpu.return %ld : vector&lt;24x32xf32&gt;
}

// after unroll pass (offsets in create_nd_desc):
gpu.func @create_nd_tdesc2(%arg0: memref&lt;256x318xf32&gt;) -&gt; vector&lt;24x32xf32&gt; {
  %cst = arith.constant dense&lt;0.000000e+00&gt; : vector&lt;24x32xf32&gt;
  %c24 = arith.constant 24 : index
  %c32 = arith.constant 32 : index
  %c8 = arith.constant 8 : index
  %c16 = arith.constant 16 : index
  // create 6 descriptors for each tile
  %0 = xegpu.create_nd_tdesc %arg0[%c8, %c16] : memref&lt;256x318xf32&gt; -&gt; !xegpu.tensor_desc&lt;8x16xf32&gt;
  %1 = xegpu.create_nd_tdesc %arg0[%c8, %c32] : memref&lt;256x318xf32&gt; -&gt; !xegpu.tensor_desc&lt;8x16xf32&gt;
  %2 = xegpu.create_nd_tdesc %arg0[%c16, %c16] : memref&lt;256x318xf32&gt; -&gt; !xegpu.tensor_desc&lt;8x16xf32&gt;
  %3 = xegpu.create_nd_tdesc %arg0[%c16, %c32] : memref&lt;256x318xf32&gt; -&gt; !xegpu.tensor_desc&lt;8x16xf32&gt;
  %4 = xegpu.create_nd_tdesc %arg0[%c24, %c16] : memref&lt;256x318xf32&gt; -&gt; !xegpu.tensor_desc&lt;8x16xf32&gt;
  %5 = xegpu.create_nd_tdesc %arg0[%c24, %c32] : memref&lt;256x318xf32&gt; -&gt; !xegpu.tensor_desc&lt;8x16xf32&gt;
  %6 = xegpu.load_nd %0  : !xegpu.tensor_desc&lt;8x16xf32&gt; -&gt; vector&lt;8x16xf32&gt;
  %7 = xegpu.load_nd %1  : !xegpu.tensor_desc&lt;8x16xf32&gt; -&gt; vector&lt;8x16xf32&gt;
  %8 = xegpu.load_nd %2  : !xegpu.tensor_desc&lt;8x16xf32&gt; -&gt; vector&lt;8x16xf32&gt;
  %9 = xegpu.load_nd %3  : !xegpu.tensor_desc&lt;8x16xf32&gt; -&gt; vector&lt;8x16xf32&gt;
  %10 = xegpu.load_nd %4  : !xegpu.tensor_desc&lt;8x16xf32&gt; -&gt; vector&lt;8x16xf32&gt;
  %11 = xegpu.load_nd %5  : !xegpu.tensor_desc&lt;8x16xf32&gt; -&gt; vector&lt;8x16xf32&gt;
  ...
}

// after unroll pass (offsets in load_nd):
gpu.func @load_nd(%arg0: memref&lt;256x318xf32&gt;) -&gt; vector&lt;24x32xf32&gt; {
  %cst = arith.constant dense&lt;0.000000e+00&gt; : vector&lt;24x32xf32&gt;
  %c24 = arith.constant 24 : index
  %c32 = arith.constant 32 : index
  %c16 = arith.constant 16 : index
  %c8 = arith.constant 8 : index
  // create only one descriptor with proper tile shape
  %0 = xegpu.create_nd_tdesc %arg0 : memref&lt;256x318xf32&gt; -&gt; !xegpu.tensor_desc&lt;8x16xf32&gt;
  // compute tile offsets at the operation (using only one descriptor)
  %1 = xegpu.load_nd %0[%c8, %c16]  : !xegpu.tensor_desc&lt;8x16xf32&gt; -&gt; vector&lt;8x16xf32&gt;
  %2 = xegpu.load_nd %0[%c8, %c32]  : !xegpu.tensor_desc&lt;8x16xf32&gt; -&gt; vector&lt;8x16xf32&gt;
  %3 = xegpu.load_nd %0[%c16, %c16]  : !xegpu.tensor_desc&lt;8x16xf32&gt; -&gt; vector&lt;8x16xf32&gt;
  %4 = xegpu.load_nd %0[%c16, %c32]  : !xegpu.tensor_desc&lt;8x16xf32&gt; -&gt; vector&lt;8x16xf32&gt;
  %5 = xegpu.load_nd %0[%c24, %c16]  : !xegpu.tensor_desc&lt;8x16xf32&gt; -&gt; vector&lt;8x16xf32&gt;
  %6 = xegpu.load_nd %0[%c24, %c32]  : !xegpu.tensor_desc&lt;8x16xf32&gt; -&gt; vector&lt;8x16xf32&gt;
  ...
}
```

&lt;/details&gt;

---------

Signed-off-by: dchigarev &lt;dmitry.chigarev@intel.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adds support for new syntax in XeGPUUnroll for:
1. `create_nd_desc` without offsets
2. `load_nd` with offsets
3. `store_nd` with offsets
4. `prefetch_nd` with offsets

`create_nd_desc with offsets` + `load_nd with offsets` won't be lowered
correctly. In this case the IR would still have two unrealized
conversions that will fail later in the pipeline.

The offsets computation for the unrolled tile is now moved from
descriptors to load/store/prefetch operations. The resulted IR now has
one single descriptor that is being iterated in load/store/prefetch ops.

&lt;details&gt;&lt;summary&gt;old/new behavior examples&lt;/summary&gt;

```mlir
// before unroll pass:
gpu.func @load_nd(%src: memref&lt;256x318xf32&gt;) -&gt; vector&lt;24x32xf32&gt; {
  %tdesc = xegpu.create_nd_tdesc %src : memref&lt;256x318xf32&gt; -&gt; !xegpu.tensor_desc&lt;24x32xf32, #xegpu.layout&lt;inst_data = [8, 16]&gt;&gt;
  %ld = xegpu.load_nd %tdesc[8, 16]: !xegpu.tensor_desc&lt;24x32xf32, #xegpu.layout&lt;inst_data = [8, 16]&gt;&gt; -&gt; vector&lt;24x32xf32&gt;
  gpu.return %ld : vector&lt;24x32xf32&gt;
}

// after unroll pass (offsets in create_nd_desc):
gpu.func @create_nd_tdesc2(%arg0: memref&lt;256x318xf32&gt;) -&gt; vector&lt;24x32xf32&gt; {
  %cst = arith.constant dense&lt;0.000000e+00&gt; : vector&lt;24x32xf32&gt;
  %c24 = arith.constant 24 : index
  %c32 = arith.constant 32 : index
  %c8 = arith.constant 8 : index
  %c16 = arith.constant 16 : index
  // create 6 descriptors for each tile
  %0 = xegpu.create_nd_tdesc %arg0[%c8, %c16] : memref&lt;256x318xf32&gt; -&gt; !xegpu.tensor_desc&lt;8x16xf32&gt;
  %1 = xegpu.create_nd_tdesc %arg0[%c8, %c32] : memref&lt;256x318xf32&gt; -&gt; !xegpu.tensor_desc&lt;8x16xf32&gt;
  %2 = xegpu.create_nd_tdesc %arg0[%c16, %c16] : memref&lt;256x318xf32&gt; -&gt; !xegpu.tensor_desc&lt;8x16xf32&gt;
  %3 = xegpu.create_nd_tdesc %arg0[%c16, %c32] : memref&lt;256x318xf32&gt; -&gt; !xegpu.tensor_desc&lt;8x16xf32&gt;
  %4 = xegpu.create_nd_tdesc %arg0[%c24, %c16] : memref&lt;256x318xf32&gt; -&gt; !xegpu.tensor_desc&lt;8x16xf32&gt;
  %5 = xegpu.create_nd_tdesc %arg0[%c24, %c32] : memref&lt;256x318xf32&gt; -&gt; !xegpu.tensor_desc&lt;8x16xf32&gt;
  %6 = xegpu.load_nd %0  : !xegpu.tensor_desc&lt;8x16xf32&gt; -&gt; vector&lt;8x16xf32&gt;
  %7 = xegpu.load_nd %1  : !xegpu.tensor_desc&lt;8x16xf32&gt; -&gt; vector&lt;8x16xf32&gt;
  %8 = xegpu.load_nd %2  : !xegpu.tensor_desc&lt;8x16xf32&gt; -&gt; vector&lt;8x16xf32&gt;
  %9 = xegpu.load_nd %3  : !xegpu.tensor_desc&lt;8x16xf32&gt; -&gt; vector&lt;8x16xf32&gt;
  %10 = xegpu.load_nd %4  : !xegpu.tensor_desc&lt;8x16xf32&gt; -&gt; vector&lt;8x16xf32&gt;
  %11 = xegpu.load_nd %5  : !xegpu.tensor_desc&lt;8x16xf32&gt; -&gt; vector&lt;8x16xf32&gt;
  ...
}

// after unroll pass (offsets in load_nd):
gpu.func @load_nd(%arg0: memref&lt;256x318xf32&gt;) -&gt; vector&lt;24x32xf32&gt; {
  %cst = arith.constant dense&lt;0.000000e+00&gt; : vector&lt;24x32xf32&gt;
  %c24 = arith.constant 24 : index
  %c32 = arith.constant 32 : index
  %c16 = arith.constant 16 : index
  %c8 = arith.constant 8 : index
  // create only one descriptor with proper tile shape
  %0 = xegpu.create_nd_tdesc %arg0 : memref&lt;256x318xf32&gt; -&gt; !xegpu.tensor_desc&lt;8x16xf32&gt;
  // compute tile offsets at the operation (using only one descriptor)
  %1 = xegpu.load_nd %0[%c8, %c16]  : !xegpu.tensor_desc&lt;8x16xf32&gt; -&gt; vector&lt;8x16xf32&gt;
  %2 = xegpu.load_nd %0[%c8, %c32]  : !xegpu.tensor_desc&lt;8x16xf32&gt; -&gt; vector&lt;8x16xf32&gt;
  %3 = xegpu.load_nd %0[%c16, %c16]  : !xegpu.tensor_desc&lt;8x16xf32&gt; -&gt; vector&lt;8x16xf32&gt;
  %4 = xegpu.load_nd %0[%c16, %c32]  : !xegpu.tensor_desc&lt;8x16xf32&gt; -&gt; vector&lt;8x16xf32&gt;
  %5 = xegpu.load_nd %0[%c24, %c16]  : !xegpu.tensor_desc&lt;8x16xf32&gt; -&gt; vector&lt;8x16xf32&gt;
  %6 = xegpu.load_nd %0[%c24, %c32]  : !xegpu.tensor_desc&lt;8x16xf32&gt; -&gt; vector&lt;8x16xf32&gt;
  ...
}
```

&lt;/details&gt;

---------

Signed-off-by: dchigarev &lt;dmitry.chigarev@intel.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[MLIR][XeGPU] Add unroll pattern for load_gather and store_scatter with offsets (#159453)</title>
<updated>2025-09-24T20:28:43+00:00</updated>
<author>
<name>Nishant Patel</name>
<email>nishant.b.patel@intel.com</email>
</author>
<published>2025-09-24T20:28:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d235d62d65a8403f1a239720058646bcefcd3d74'/>
<id>d235d62d65a8403f1a239720058646bcefcd3d74</id>
<content type='text'>
This PR adds unrolling/blocking patterns for load_gather and
store_scatter ops with offsets.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This PR adds unrolling/blocking patterns for load_gather and
store_scatter ops with offsets.</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][xegpu] Add support for `vector.multi_reduction` and `vector.shape_cast` SIMT distribution.  (#157560)</title>
<updated>2025-09-12T16:37:04+00:00</updated>
<author>
<name>Charitha Saumya</name>
<email>136391709+charithaintc@users.noreply.github.com</email>
</author>
<published>2025-09-12T16:37:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9b0d7ddb04665e76cfa90b5d69c6183b90772243'/>
<id>9b0d7ddb04665e76cfa90b5d69c6183b90772243</id>
<content type='text'>
Add support for distributing the `vector.multi_reduction` operation
across lanes in a warp. Currently only 2D to 1D reductions are
supported. Given layouts for the source and accumulator vectors,
* If the reduction dimension is distributed across lanes, the reduction
is non-lane-local and the reduction is done using warp shuffles. Here we
simply rewrite the `MultiDimReductionOp` to a sequence of `ReductionOp`s
inside the warp op body. Actual distribution will be done by
`WarpOpReduction` pattern.
* If the reduction dimension is not distributed across lanes, the
reduction is lane-local. In this case, we yield the source and
accumulator vectors from the warp op and perform the lane-local
reduction outside the warp op using a sequence of `ReductionOp`s.

PR also adds support for distributing `vector.shape_cast` based on
layouts.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add support for distributing the `vector.multi_reduction` operation
across lanes in a warp. Currently only 2D to 1D reductions are
supported. Given layouts for the source and accumulator vectors,
* If the reduction dimension is distributed across lanes, the reduction
is non-lane-local and the reduction is done using warp shuffles. Here we
simply rewrite the `MultiDimReductionOp` to a sequence of `ReductionOp`s
inside the warp op body. Actual distribution will be done by
`WarpOpReduction` pattern.
* If the reduction dimension is not distributed across lanes, the
reduction is lane-local. In this case, we yield the source and
accumulator vectors from the warp op and perform the lane-local
reduction outside the warp op using a sequence of `ReductionOp`s.

PR also adds support for distributing `vector.shape_cast` based on
layouts.</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][XeGPU] add WgToSg distribution pattern for load_matrix and store_matrix.  (#154403)</title>
<updated>2025-08-21T15:02:45+00:00</updated>
<author>
<name>Chao Chen</name>
<email>chao.chen@intel.com</email>
</author>
<published>2025-08-21T15:02:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=68d68664280c2d2620ba09c09caba93bfe0a67ce'/>
<id>68d68664280c2d2620ba09c09caba93bfe0a67ce</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir] Update builders to use new form. (#154132)</title>
<updated>2025-08-18T15:19:34+00:00</updated>
<author>
<name>Jacques Pienaar</name>
<email>jpienaar@google.com</email>
</author>
<published>2025-08-18T15:19:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4bf33958dac30facec505e7410e4be8cea567a2e'/>
<id>4bf33958dac30facec505e7410e4be8cea567a2e</id>
<content type='text'>
Mechanically applied using clang-tidy.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Mechanically applied using clang-tidy.</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][xegpu] Add definition of SliceAttr (#150146)</title>
<updated>2025-08-08T16:27:17+00:00</updated>
<author>
<name>Chao Chen</name>
<email>chao.chen@intel.com</email>
</author>
<published>2025-08-08T16:27:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c96223434c64d32c3f397d20a8ed1d9749aae441'/>
<id>c96223434c64d32c3f397d20a8ed1d9749aae441</id>
<content type='text'>
---------

Co-authored-by: Charitha Saumya &lt;136391709+charithaintc@users.noreply.github.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
---------

Co-authored-by: Charitha Saumya &lt;136391709+charithaintc@users.noreply.github.com&gt;</pre>
</div>
</content>
</entry>
</feed>
