<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/mlir/lib/Dialect/Vector/Transforms/LowerVectorToFromElementsToShuffleTree.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][vector] Simplify op rewrite pattern inheriting constructors. NFC. (#161670)</title>
<updated>2025-10-02T23:07:25+00:00</updated>
<author>
<name>Jakub Kuderski</name>
<email>jakub@nod-labs.com</email>
</author>
<published>2025-10-02T23:07:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3960ff6ca03b0441087f9042850199583d9e11d2'/>
<id>3960ff6ca03b0441087f9042850199583d9e11d2</id>
<content type='text'>
Use the `Base` type alias from
https://github.com/llvm/llvm-project/pull/158433.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use the `Base` type alias from
https://github.com/llvm/llvm-project/pull/158433.</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][NFC] update `mlir/Dialect` create APIs (24/n) (#149931)</title>
<updated>2025-07-22T12:16:15+00:00</updated>
<author>
<name>Maksim Levental</name>
<email>maksim.levental@gmail.com</email>
</author>
<published>2025-07-22T12:16:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f904cdd6c3049e605d24ed17680e80e7133908a0'/>
<id>f904cdd6c3049e605d24ed17680e80e7133908a0</id>
<content type='text'>
See https://github.com/llvm/llvm-project/pull/147168 for more info.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
See https://github.com/llvm/llvm-project/pull/147168 for more info.</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir] Fix a warning</title>
<updated>2025-07-09T23:45:18+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-07-09T23:45:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=cd65f8bf17ecfc9896fd9913905f182ad7ce1446'/>
<id>cd65f8bf17ecfc9896fd9913905f182ad7ce1446</id>
<content type='text'>
This patch fixes:

  mlir/lib/Dialect/Vector/Transforms/LowerVectorToFromElementsToShuffleTree.cpp:42:20:
  error: unused variable 'kIndScale' [-Werror,-Wunused-const-variable]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes:

  mlir/lib/Dialect/Vector/Transforms/LowerVectorToFromElementsToShuffleTree.cpp:42:20:
  error: unused variable 'kIndScale' [-Werror,-Wunused-const-variable]
</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][Vector] Add `vector.shuffle` tree transformation (#145740)</title>
<updated>2025-07-09T23:09:53+00:00</updated>
<author>
<name>Diego Caballero</name>
<email>dieg0ca6aller0@gmail.com</email>
</author>
<published>2025-07-09T23:09:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ddf9b91f9fed8654c4649881f7db51f1e474701f'/>
<id>ddf9b91f9fed8654c4649881f7db51f1e474701f</id>
<content type='text'>
This PR adds a new transformation that turns sequences of `vector.to_elements` and `vector.from_elements` into a binary tree of `vector.shuffle` operations.

(Related RFC:
https://discourse.llvm.org/t/rfc-adding-vector-to-elements-op-to-the-vector-dialect/86779).

Example:

```
  %0:4 = vector.to_elements %a : vector&lt;4xf32&gt;
  %1:4 = vector.to_elements %b : vector&lt;4xf32&gt;
  %2:4 = vector.to_elements %c : vector&lt;4xf32&gt;
  %3 = vector.from_elements %0#0, %0#1, %0#2, %0#3,
                            %1#0, %1#1, %1#2, %1#3,
                            %2#0, %2#1, %2#2, %2#3 : vector&lt;12xf32&gt;

==&gt;

  %0 = vector.shuffle %a, %b [0, 1, 2, 3, 4, 5, 6, 7] : vector&lt;4xf32&gt;, vector&lt;4xf32&gt;
  %1 = vector.shuffle %c, %c [0, 1, 2, 3, -1, -1, -1, -1] : vector&lt;4xf32&gt;, vector&lt;4xf32&gt;
  %2 = vector.shuffle %0, %1 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] : vector&lt;8xf32&gt;, vector&lt;8xf32&gt;
```

The algorithm leverages the structured extraction/insertion information
of `vector.to_elements` and `vector.from_elements` operations and builds
a set of intervals to determine the vector length that should be used at
each level of the tree to combine the level inputs in pairs.

There are a few improvements that can be implemented in the future, such
as shuffle mask compression to avoid unnecessarily large vector lengths
with poison values, but I decided to keep things "simpler" and spend
more time documenting the different steps of the algorithm so that
people can follow along.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This PR adds a new transformation that turns sequences of `vector.to_elements` and `vector.from_elements` into a binary tree of `vector.shuffle` operations.

(Related RFC:
https://discourse.llvm.org/t/rfc-adding-vector-to-elements-op-to-the-vector-dialect/86779).

Example:

```
  %0:4 = vector.to_elements %a : vector&lt;4xf32&gt;
  %1:4 = vector.to_elements %b : vector&lt;4xf32&gt;
  %2:4 = vector.to_elements %c : vector&lt;4xf32&gt;
  %3 = vector.from_elements %0#0, %0#1, %0#2, %0#3,
                            %1#0, %1#1, %1#2, %1#3,
                            %2#0, %2#1, %2#2, %2#3 : vector&lt;12xf32&gt;

==&gt;

  %0 = vector.shuffle %a, %b [0, 1, 2, 3, 4, 5, 6, 7] : vector&lt;4xf32&gt;, vector&lt;4xf32&gt;
  %1 = vector.shuffle %c, %c [0, 1, 2, 3, -1, -1, -1, -1] : vector&lt;4xf32&gt;, vector&lt;4xf32&gt;
  %2 = vector.shuffle %0, %1 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] : vector&lt;8xf32&gt;, vector&lt;8xf32&gt;
```

The algorithm leverages the structured extraction/insertion information
of `vector.to_elements` and `vector.from_elements` operations and builds
a set of intervals to determine the vector length that should be used at
each level of the tree to combine the level inputs in pairs.

There are a few improvements that can be implemented in the future, such
as shuffle mask compression to avoid unnecessarily large vector lengths
with poison values, but I decided to keep things "simpler" and spend
more time documenting the different steps of the algorithm so that
people can follow along.</pre>
</div>
</content>
</entry>
</feed>
