<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/mlir/lib/Dialect/XeGPU/Transforms/XeGPUWgToSgDistribute.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] Fix dropSgLayoutAndData &amp; dropInstData in SliceAttr (#168618)</title>
<updated>2025-11-21T20:40:16+00:00</updated>
<author>
<name>Nishant Patel</name>
<email>nishant.b.patel@intel.com</email>
</author>
<published>2025-11-21T20:40:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=778e104dee8186c8a8c8ed781692825fb3a8bec8'/>
<id>778e104dee8186c8a8c8ed781692825fb3a8bec8</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 distribution pattern for vector.constant_mask from Wg To Sg (#168118)</title>
<updated>2025-11-20T23:00:57+00:00</updated>
<author>
<name>Nishant Patel</name>
<email>nishant.b.patel@intel.com</email>
</author>
<published>2025-11-20T23:00:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=310abe0e4b4ebb57976928cc0b520f9e878b54a7'/>
<id>310abe0e4b4ebb57976928cc0b520f9e878b54a7</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] Use DistributeLayoutAttr instead of LayoutAttr for load gather/scatter ops (#167850)</title>
<updated>2025-11-17T19:00:03+00:00</updated>
<author>
<name>Dmitry Chigarev</name>
<email>dmitry.chigarev@intel.com</email>
</author>
<published>2025-11-17T19:00:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=cd5d5b31bff0052be214357133ad3dd7f3f24a74'/>
<id>cd5d5b31bff0052be214357133ad3dd7f3f24a74</id>
<content type='text'>
The PR changes the layout attribute type for
`xegpu::LoadGatherOp/StoreScatterOp` from `LayoutAttr` to
`DistributeLayoutAttr` to also support `xegpu.slice` layouts.

Initially we [wanted to restrict slice
layouts](https://github.com/llvm/llvm-project/pull/163414#discussion_r2478978798)
from the attribute, but now it turns out there are actually valid use
cases for that:
```mlir
gpu.func @distribute_load_slice_attr() {
  %2 = memref.alloca() {alignment = 1024} : memref&lt;4096xf32&gt;
  %offset =  arith.constant {layout_result_0 = #xegpu.layout&lt;sg_layout = [8], sg_data = [32], inst_data = [16]&gt; } dense&lt;0&gt; : vector&lt;256xindex&gt;
  %mask = arith.constant {layout_result_0 = #xegpu.layout&lt;sg_layout = [8], sg_data = [32], inst_data = [16]&gt; } dense&lt;1&gt; : vector&lt;256xi1&gt;

  %3 = xegpu.load %2[%offset], %mask &lt;{chunk_size = 1, layout = #xegpu.slice&lt;#xegpu.layout&lt;sg_layout = [8, 8], sg_data = [32, 32], inst_data = [8, 16]&gt;, dims = [0]&gt;&gt;} {
      layout_result_0 = #xegpu.slice&lt;#xegpu.layout&lt;sg_layout = [8, 8], sg_data = [32, 32], inst_data = [8, 16]&gt;, dims = [0]&gt; 
  } : memref&lt;4096xf32&gt;, vector&lt;256xindex&gt;, vector&lt;256xi1&gt; -&gt; vector&lt;256xf32&gt;

  %4 = vector.broadcast %3 {layout_result_0 =
      #xegpu.layout&lt;sg_layout = [8, 8], sg_data = [32, 32], inst_data = [8, 16]&gt;} : vector&lt;256xf32&gt; to vector&lt;256x256xf32&gt;
  gpu.return
}
```

Signed-off-by: dchigarev &lt;dmitry.chigarev@intel.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The PR changes the layout attribute type for
`xegpu::LoadGatherOp/StoreScatterOp` from `LayoutAttr` to
`DistributeLayoutAttr` to also support `xegpu.slice` layouts.

Initially we [wanted to restrict slice
layouts](https://github.com/llvm/llvm-project/pull/163414#discussion_r2478978798)
from the attribute, but now it turns out there are actually valid use
cases for that:
```mlir
gpu.func @distribute_load_slice_attr() {
  %2 = memref.alloca() {alignment = 1024} : memref&lt;4096xf32&gt;
  %offset =  arith.constant {layout_result_0 = #xegpu.layout&lt;sg_layout = [8], sg_data = [32], inst_data = [16]&gt; } dense&lt;0&gt; : vector&lt;256xindex&gt;
  %mask = arith.constant {layout_result_0 = #xegpu.layout&lt;sg_layout = [8], sg_data = [32], inst_data = [16]&gt; } dense&lt;1&gt; : vector&lt;256xi1&gt;

  %3 = xegpu.load %2[%offset], %mask &lt;{chunk_size = 1, layout = #xegpu.slice&lt;#xegpu.layout&lt;sg_layout = [8, 8], sg_data = [32, 32], inst_data = [8, 16]&gt;, dims = [0]&gt;&gt;} {
      layout_result_0 = #xegpu.slice&lt;#xegpu.layout&lt;sg_layout = [8, 8], sg_data = [32, 32], inst_data = [8, 16]&gt;, dims = [0]&gt; 
  } : memref&lt;4096xf32&gt;, vector&lt;256xindex&gt;, vector&lt;256xi1&gt; -&gt; vector&lt;256xf32&gt;

  %4 = vector.broadcast %3 {layout_result_0 =
      #xegpu.layout&lt;sg_layout = [8, 8], sg_data = [32, 32], inst_data = [8, 16]&gt;} : vector&lt;256xf32&gt; to vector&lt;256x256xf32&gt;
  gpu.return
}
```

Signed-off-by: dchigarev &lt;dmitry.chigarev@intel.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[MLIR][XeGPU] Support order attribute and add pattern for vector.transpose in WgToSg Pass (#165307)</title>
<updated>2025-11-05T03:37:08+00:00</updated>
<author>
<name>Nishant Patel</name>
<email>nishant.b.patel@intel.com</email>
</author>
<published>2025-11-05T03:37:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f291f335c9628ea8d855fcc7c246171d70ceff58'/>
<id>f291f335c9628ea8d855fcc7c246171d70ceff58</id>
<content type='text'>
This PR does the following:
1. Handle order attribute during the delinearization from linear
subgroup Id to multi-dim id.
2. Adds a transformation pattern for vector.transpose in wg to sg pass.
3. Updates CHECKS in the wg to sg tests</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This PR does the following:
1. Handle order attribute during the delinearization from linear
subgroup Id to multi-dim id.
2. Adds a transformation pattern for vector.transpose in wg to sg pass.
3. Updates CHECKS in the wg to sg tests</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][XeGPU] Add optional layout attribute to LoadGather StoreScatter ops (#163414)</title>
<updated>2025-11-04T16:19:47+00:00</updated>
<author>
<name>Dmitry Chigarev</name>
<email>dmitry.chigarev@intel.com</email>
</author>
<published>2025-11-04T16:19:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6c563dc6a2127e3f7dd8e957093e57bd3ba35f5b'/>
<id>6c563dc6a2127e3f7dd8e957093e57bd3ba35f5b</id>
<content type='text'>
As [suggested
here](https://github.com/llvm/llvm-project/pull/163071#discussion_r2427229637)
the PR adds an optional layout attribute for `LoadGather` and
`StoreScatter` ops.

For the load-op the attribute describes the layout of the result (ex
`layout_result_0`), and for store-op it describes the layout for the
vector-to-store operand (ex `layout_operand_0`).

The PR also reworks `propagate-layout` pass to consider perm layout
attributes and back-propagate them accordingly.

The helper utility function `getDistributeLayoutAttr` is reworked to
return either `layout_operand/result_0` or `layout` for load/store ops
(denepding on which one is set). After an offline discussion decided
that the overall utilities layouts API is confusing since it tries to
mix permament and temporary layouts. Would need to change it in the
future.

---------

Signed-off-by: dchigarev &lt;dmitry.chigarev@intel.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As [suggested
here](https://github.com/llvm/llvm-project/pull/163071#discussion_r2427229637)
the PR adds an optional layout attribute for `LoadGather` and
`StoreScatter` ops.

For the load-op the attribute describes the layout of the result (ex
`layout_result_0`), and for store-op it describes the layout for the
vector-to-store operand (ex `layout_operand_0`).

The PR also reworks `propagate-layout` pass to consider perm layout
attributes and back-propagate them accordingly.

The helper utility function `getDistributeLayoutAttr` is reworked to
return either `layout_operand/result_0` or `layout` for load/store ops
(denepding on which one is set). After an offline discussion decided
that the overall utilities layouts API is confusing since it tries to
mix permament and temporary layouts. Would need to change it in the
future.

---------

Signed-off-by: dchigarev &lt;dmitry.chigarev@intel.com&gt;</pre>
</div>
</content>
</entry>
<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] Switch uses of deprecated .create methods to free function. NFC. (#164635)</title>
<updated>2025-10-22T14:51:03+00:00</updated>
<author>
<name>Jakub Kuderski</name>
<email>jakub@nod-labs.com</email>
</author>
<published>2025-10-22T14:51:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ae11c5c2c4d7ae4cba4a8e05f0c7d85b316a2cf0'/>
<id>ae11c5c2c4d7ae4cba4a8e05f0c7d85b316a2cf0</id>
<content type='text'>
See https://discourse.llvm.org/t/psa-opty-create-now-with-100-more-tab-complete/87339.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
See https://discourse.llvm.org/t/psa-opty-create-now-with-100-more-tab-complete/87339.</pre>
</div>
</content>
</entry>
<entry>
<title>[MLIR][XeGPU] XeVM lowering support for load_matrix/store_matrix + fix sanitizer issue (#163858)</title>
<updated>2025-10-16T21:09:48+00:00</updated>
<author>
<name>Jianhui Li</name>
<email>jian.hui.li@intel.com</email>
</author>
<published>2025-10-16T21:09:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=77cb19d7aac29215a8cb2f58e35e790b0c94d799'/>
<id>77cb19d7aac29215a8cb2f58e35e790b0c94d799</id>
<content type='text'>
This PR fix the sanitizer issue reported post-merge for
https://github.com/llvm/llvm-project/pull/162780</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This PR fix the sanitizer issue reported post-merge for
https://github.com/llvm/llvm-project/pull/162780</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[MLIR][XeGPU] XeVM lowering support for load_matrix/store_matrix" (#163684)</title>
<updated>2025-10-16T03:11:42+00:00</updated>
<author>
<name>Vitaly Buka</name>
<email>vitalybuka@google.com</email>
</author>
<published>2025-10-16T03:11:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d43581aaee8aa60f93f884d7161169435c40dc0a'/>
<id>d43581aaee8aa60f93f884d7161169435c40dc0a</id>
<content type='text'>
Reverts llvm/llvm-project#162780

Breaks build bots, see #162780.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reverts llvm/llvm-project#162780

Breaks build bots, see #162780.</pre>
</div>
</content>
</entry>
<entry>
<title>[MLIR][XeGPU] XeVM lowering support for load_matrix/store_matrix (#162780)</title>
<updated>2025-10-15T23:50:41+00:00</updated>
<author>
<name>Jianhui Li</name>
<email>jian.hui.li@intel.com</email>
</author>
<published>2025-10-15T23:50:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6cae29fb3a139c37bbaa09fbaa1179a643a231c9'/>
<id>6cae29fb3a139c37bbaa09fbaa1179a643a231c9</id>
<content type='text'>
This PR adds lowering of xegpu.load_matrix/store_matrix to
xevm.blockload/blockstore or and llvm.load/store, depending on wi level
attributes.
It includes a few components: 
   1. adds wi-level attributes: subgroup_block_io.   
2. expand load_matrix/store_matrix op definition to support scalar data
(besides vector data).
2. adds a member function to mem_desc to compute the linearized address
for a nd offsets.
   3. add lowering depending on wi-level attributes: 
a) if subgroup_block_io attribute presents, lower to
xevm.blockload/blockstore
c) else lower to llvm.load/store. If result is a vector, lower to
llvm.load/store with vector operand.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This PR adds lowering of xegpu.load_matrix/store_matrix to
xevm.blockload/blockstore or and llvm.load/store, depending on wi level
attributes.
It includes a few components: 
   1. adds wi-level attributes: subgroup_block_io.   
2. expand load_matrix/store_matrix op definition to support scalar data
(besides vector data).
2. adds a member function to mem_desc to compute the linearized address
for a nd offsets.
   3. add lowering depending on wi-level attributes: 
a) if subgroup_block_io attribute presents, lower to
xevm.blockload/blockstore
c) else lower to llvm.load/store. If result is a vector, lower to
llvm.load/store with vector operand.</pre>
</div>
</content>
</entry>
</feed>
