<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/mlir/lib/Dialect/Vector/Transforms, 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][Vector] Add support for scalable vectors to `ScanToArithOps` (#123117)</title>
<updated>2025-11-20T13:39:52+00:00</updated>
<author>
<name>Andrzej Warzyński</name>
<email>andrzej.warzynski@arm.com</email>
</author>
<published>2025-11-20T13:39:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=cfda27d0fbda65de4a7f482d46231933c9f2c678'/>
<id>cfda27d0fbda65de4a7f482d46231933c9f2c678</id>
<content type='text'>
Note, scalable reductions dims are left as a TODO.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Note, scalable reductions dims are left as a TODO.</pre>
</div>
</content>
</entry>
<entry>
<title>[MLIR][Vector] Add unroll pattern for vector.shape_cast (#167738)</title>
<updated>2025-11-20T00:16:44+00:00</updated>
<author>
<name>Nishant Patel</name>
<email>nishant.b.patel@intel.com</email>
</author>
<published>2025-11-20T00:16:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=af73aeaa19929127655d544b48a5145105e9e28c'/>
<id>af73aeaa19929127655d544b48a5145105e9e28c</id>
<content type='text'>
This PR adds pattern for unrolling shape_cast given a targetShape. This
PR is a follow up of #164010 which was very general and was using
inserts and extracts on each element (which is also
LowerVectorShapeCast.cpp is doing).
After doing some more research on use cases, we (me and @Jianhui-Li )
realized that the previous version in #164010 is unnecessarily generic
and doesn't fit our performance needs.

Our use case requires that targetShape is contiguous in both source and
result vector.

This pattern only applies when contiguous slices can be extracted from
the source vector and inserted into the result vector such that each
slice remains in vector form with targetShape (and not decompose to
scalars). In these cases, the unrolling proceeds as:

vector.extract_strided_slice -&gt; vector.shape_cast (on the slice
unrolled) -&gt; vector.insert_strided_slice</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This PR adds pattern for unrolling shape_cast given a targetShape. This
PR is a follow up of #164010 which was very general and was using
inserts and extracts on each element (which is also
LowerVectorShapeCast.cpp is doing).
After doing some more research on use cases, we (me and @Jianhui-Li )
realized that the previous version in #164010 is unnecessarily generic
and doesn't fit our performance needs.

Our use case requires that targetShape is contiguous in both source and
result vector.

This pattern only applies when contiguous slices can be extracted from
the source vector and inserted into the result vector such that each
slice remains in vector form with targetShape (and not decompose to
scalars). In these cases, the unrolling proceeds as:

vector.extract_strided_slice -&gt; vector.shape_cast (on the slice
unrolled) -&gt; vector.insert_strided_slice</pre>
</div>
</content>
</entry>
<entry>
<title>[MLIR] Extend vector.scatter to accept tensor as base (#165548)</title>
<updated>2025-11-14T19:56:24+00:00</updated>
<author>
<name>Ryutaro Okada</name>
<email>140468571+sakupan102@users.noreply.github.com</email>
</author>
<published>2025-11-14T19:56:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7e7ea9c5357efcdf9ba6bd7ea3669e607a9af400'/>
<id>7e7ea9c5357efcdf9ba6bd7ea3669e607a9af400</id>
<content type='text'>
This PR makes the following improvements to `vector.scatter` and its
lowering pipeline:
- In addition to `memref`, accept a ranked `tensor` as the base operand
of `vector.scatter`, similar to `vector.transfer_write`.
- Implement bufferization support for `vector.scatter`, so that
tensor-based scatter ops can be fully lowered to memref-based forms.

It's worth to complete the functionality of map_scatter decomposition.
Full discussion can be found here:
https://github.com/iree-org/iree/issues/21135

---------

Signed-off-by: Ryutaro Okada &lt;1015ryu88@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This PR makes the following improvements to `vector.scatter` and its
lowering pipeline:
- In addition to `memref`, accept a ranked `tensor` as the base operand
of `vector.scatter`, similar to `vector.transfer_write`.
- Implement bufferization support for `vector.scatter`, so that
tensor-based scatter ops can be fully lowered to memref-based forms.

It's worth to complete the functionality of map_scatter decomposition.
Full discussion can be found here:
https://github.com/iree-org/iree/issues/21135

---------

Signed-off-by: Ryutaro Okada &lt;1015ryu88@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][vector][xegpu] Accept uniform values in `getDistributedType` (#163887)</title>
<updated>2025-10-22T15:41:41+00:00</updated>
<author>
<name>Charitha Saumya</name>
<email>136391709+charithaintc@users.noreply.github.com</email>
</author>
<published>2025-10-22T15:41:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1e8834ea3ab770bf7befa3fae917f2c686d00e3b'/>
<id>1e8834ea3ab770bf7befa3fae917f2c686d00e3b</id>
<content type='text'>
Uniform values should not be distributed during vector distribution.
Example would be a reduction result where reduction happens across
lanes.

However, current `getDistributedType` does not accept a zero result
affine map (i.e. no distributed dims) when describing the distributed
dimensions. This result in null type being returned and crashing the
vector distribution in some cases. An example case would be a `scf.for`
op (about to be distributed) in which one of the for result is a uniform
value and it does not have a user outside the warp op. This necessitates
querying the `getDistributedType` to figure our the distributed type of
this value.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Uniform values should not be distributed during vector distribution.
Example would be a reduction result where reduction happens across
lanes.

However, current `getDistributedType` does not accept a zero result
affine map (i.e. no distributed dims) when describing the distributed
dimensions. This result in null type being returned and crashing the
vector distribution in some cases. An example case would be a `scf.for`
op (about to be distributed) in which one of the for result is a uniform
value and it does not have a user outside the warp op. This necessitates
querying the `getDistributedType` to figure our the distributed type of
this value.</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][Vector] Pattern to linearize broadcast (#163845)</title>
<updated>2025-10-17T23:31:18+00:00</updated>
<author>
<name>James Newling</name>
<email>james.newling@gmail.com</email>
</author>
<published>2025-10-17T23:31:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=fe5b72a0e84cf2ebf6572e02bce3abb72ee0a8a0'/>
<id>fe5b72a0e84cf2ebf6572e02bce3abb72ee0a8a0</id>
<content type='text'>
The PR https://github.com/llvm/llvm-project/pull/162167 removed a
pattern to linearize vector.splat, without adding the equivalent pattern
for vector.broadcast. This PR adds such a pattern, hopefully brining
vector.broadcast up to full parity with vector.splat that has now been
removed.

---------

Signed-off-by: James Newling &lt;james.newling@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The PR https://github.com/llvm/llvm-project/pull/162167 removed a
pattern to linearize vector.splat, without adding the equivalent pattern
for vector.broadcast. This PR adds such a pattern, hopefully brining
vector.broadcast up to full parity with vector.splat that has now been
removed.

---------

Signed-off-by: James Newling &lt;james.newling@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][vector] Add support for yielding loop bounds in `scf.for` distribution.  (#163443)</title>
<updated>2025-10-17T16:07:17+00:00</updated>
<author>
<name>Charitha Saumya</name>
<email>136391709+charithaintc@users.noreply.github.com</email>
</author>
<published>2025-10-17T16:07:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f7a5264890fe050124cd576410695a7c90c4d8d8'/>
<id>f7a5264890fe050124cd576410695a7c90c4d8d8</id>
<content type='text'>
In some cases, loop bounds (lower, upper and step) of `scf.for` can come
locally from the parent warp op the `scf.for`. Current logic will not
yield the loop bounds in the new warp op generated during lowering
causing sinked `scf.for` to have non dominating use.

In this PR, we have added logic to yield loop bounds by default (treat
them as other operands of `scf.for`) which fixes this bug.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In some cases, loop bounds (lower, upper and step) of `scf.for` can come
locally from the parent warp op the `scf.for`. Current logic will not
yield the loop bounds in the new warp op generated during lowering
causing sinked `scf.for` to have non dominating use.

In this PR, we have added logic to yield loop bounds by default (treat
them as other operands of `scf.for`) which fixes this bug.</pre>
</div>
</content>
</entry>
<entry>
<title>[MLIR][Vector] Extend elementwise pattern to support unrolling from higher rank to lower rank (#162515)</title>
<updated>2025-10-15T13:51:23+00:00</updated>
<author>
<name>Nishant Patel</name>
<email>nishant.b.patel@intel.com</email>
</author>
<published>2025-10-15T13:51:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4ff8f118cc91870aed357be351230df63ef14dcf'/>
<id>4ff8f118cc91870aed357be351230df63ef14dcf</id>
<content type='text'>
This PR enhances the elementwise unrolling pattern to support higher
rank to lower rank unroll. The approach is to add leading unit dims to
lower rank targetShape to match the rank of original vector (because
ExtractStridedSlice requires same rank to extractSlices), extract slice,
reshape to targetShape's rank and perform the operation.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This PR enhances the elementwise unrolling pattern to support higher
rank to lower rank unroll. The approach is to add leading unit dims to
lower rank targetShape to match the rank of original vector (because
ExtractStridedSlice requires same rank to extractSlices), extract slice,
reshape to targetShape's rank and perform the operation.</pre>
</div>
</content>
</entry>
<entry>
<title>[MLIR][Vector] Improve warp distribution robustness (#161647)</title>
<updated>2025-10-15T08:52:24+00:00</updated>
<author>
<name>Artem Kroviakov</name>
<email>71938912+akroviakov@users.noreply.github.com</email>
</author>
<published>2025-10-15T08:52:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0a71fd15283e70def97a9919186548a8ccbbbcae'/>
<id>0a71fd15283e70def97a9919186548a8ccbbbcae</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir] Use llvm accumulate wrappers. NFCI. (#162957)</title>
<updated>2025-10-11T15:33:18+00:00</updated>
<author>
<name>Jakub Kuderski</name>
<email>jakub@nod-labs.com</email>
</author>
<published>2025-10-11T15:33:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0820266651649c0eb6c384df91da4c6f662e5136'/>
<id>0820266651649c0eb6c384df91da4c6f662e5136</id>
<content type='text'>
Use wrappers around `std::accumulate` to make the code more concise and
less bug-prone: https://github.com/llvm/llvm-project/pull/162129.

With `std::accumulate`, it's the initial value that determines the
accumulator type. `llvm::sum_of` and `llvm::product_of` pick the right
accumulator type based on the range element type.

Found some funny bugs like a local accumulate helper that calculated a
sum with initial value of 1 -- we didn't hit the bug because the code
was actually dead...</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use wrappers around `std::accumulate` to make the code more concise and
less bug-prone: https://github.com/llvm/llvm-project/pull/162129.

With `std::accumulate`, it's the initial value that determines the
accumulator type. `llvm::sum_of` and `llvm::product_of` pick the right
accumulator type based on the range element type.

Found some funny bugs like a local accumulate helper that calculated a
sum with initial value of 1 -- we didn't hit the bug because the code
was actually dead...</pre>
</div>
</content>
</entry>
</feed>
