<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/mlir/lib/Dialect/Vector/Transforms/LowerVectorMultiReduction.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][Vector] Add support for inner-parallel masked multi-reductions (#126722)</title>
<updated>2025-02-14T19:08:24+00:00</updated>
<author>
<name>Manupa Karunaratne</name>
<email>manupa.karunaratne@amd.com</email>
</author>
<published>2025-02-14T19:08:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=db1e15a1da20ff15c9bac8e6d731ec11871431bb'/>
<id>db1e15a1da20ff15c9bac8e6d731ec11871431bb</id>
<content type='text'>
This commit adds support to lower inner-parallel flavor of masked vector
multi-reductions.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit adds support to lower inner-parallel flavor of masked vector
multi-reductions.</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir] Enable decoupling two kinds of greedy behavior. (#104649)</title>
<updated>2024-12-20T16:15:48+00:00</updated>
<author>
<name>Jacques Pienaar</name>
<email>jpienaar@google.com</email>
</author>
<published>2024-12-20T16:15:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=09dfc5713d7e2342bea4c8447d1ed76c85eb8225'/>
<id>09dfc5713d7e2342bea4c8447d1ed76c85eb8225</id>
<content type='text'>
The greedy rewriter is used in many different flows and it has a lot of
convenience (work list management, debugging actions, tracing, etc). But
it combines two kinds of greedy behavior 1) how ops are matched, 2)
folding wherever it can.

These are independent forms of greedy and leads to inefficiency. E.g.,
cases where one need to create different phases in lowering and is
required to applying patterns in specific order split across different
passes. Using the driver one ends up needlessly retrying folding/having
multiple rounds of folding attempts, where one final run would have
sufficed.

Of course folks can locally avoid this behavior by just building their
own, but this is also a common requested feature that folks keep on
working around locally in suboptimal ways.

For downstream users, there should be no behavioral change. Updating
from the deprecated should just be a find and replace (e.g., `find ./
-type f -exec sed -i
's|applyPatternsAndFoldGreedily|applyPatternsGreedily|g' {} \;` variety)
as the API arguments hasn't changed between the two.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The greedy rewriter is used in many different flows and it has a lot of
convenience (work list management, debugging actions, tracing, etc). But
it combines two kinds of greedy behavior 1) how ops are matched, 2)
folding wherever it can.

These are independent forms of greedy and leads to inefficiency. E.g.,
cases where one need to create different phases in lowering and is
required to applying patterns in specific order split across different
passes. Using the driver one ends up needlessly retrying folding/having
multiple rounds of folding attempts, where one final run would have
sufficed.

Of course folks can locally avoid this behavior by just building their
own, but this is also a common requested feature that folks keep on
working around locally in suboptimal ways.

For downstream users, there should be no behavioral change. Updating
from the deprecated should just be a find and replace (e.g., `find ./
-type f -exec sed -i
's|applyPatternsAndFoldGreedily|applyPatternsGreedily|g' {} \;` variety)
as the API arguments hasn't changed between the two.</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][Vector] Remove trivial uses of vector.extractelement/vector.insertelement (1/N) (#116053)</title>
<updated>2024-11-13T15:45:59+00:00</updated>
<author>
<name>Kunwar Grover</name>
<email>groverkss@gmail.com</email>
</author>
<published>2024-11-13T15:45:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8e6630391699116641cf390a10476295b7d4b95c'/>
<id>8e6630391699116641cf390a10476295b7d4b95c</id>
<content type='text'>
This patch removes trivial usages of
vector.extractelement/vector.insertelement. These operations can be
fully represented by vector.extract/vector.insert. See
https://discourse.llvm.org/t/rfc-psa-remove-vector-extractelement-and-vector-insertelement-ops-in-favor-of-vector-extract-and-vector-insert-ops/71116
for more information.

Further patches will remove more usages of these ops.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch removes trivial usages of
vector.extractelement/vector.insertelement. These operations can be
fully represented by vector.extract/vector.insert. See
https://discourse.llvm.org/t/rfc-psa-remove-vector-extractelement-and-vector-insertelement-ops-in-favor-of-vector-extract-and-vector-insert-ops/71116
for more information.

Further patches will remove more usages of these ops.</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][vector] Use `DenseI64ArrayAttr` in vector.multi_reduction (#102637)</title>
<updated>2024-08-10T13:10:24+00:00</updated>
<author>
<name>Benjamin Maxwell</name>
<email>benjamin.maxwell@arm.com</email>
</author>
<published>2024-08-10T13:10:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5f26497da7de10c4eeec33b5a5cfcb47e96836cc'/>
<id>5f26497da7de10c4eeec33b5a5cfcb47e96836cc</id>
<content type='text'>
This prevents some unnecessary conversions to/from int64_t and
IntegerAttr.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This prevents some unnecessary conversions to/from int64_t and
IntegerAttr.</pre>
</div>
</content>
</entry>
<entry>
<title> [MLIR][Vector] Allow Scalable Dim in OneDimMultiReductionToTwoDim (#89978)</title>
<updated>2024-04-25T20:54:47+00:00</updated>
<author>
<name>Zhaoshi Zheng</name>
<email>zhaoshiz@quicinc.com</email>
</author>
<published>2024-04-25T20:54:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=dbcc4549e6b75ff328256e3d914763c9a74b2635'/>
<id>dbcc4549e6b75ff328256e3d914763c9a74b2635</id>
<content type='text'>
To correctly lower multi_reduction of 1-dim scalable vector, e.g., &lt;[4]xf32&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To correctly lower multi_reduction of 1-dim scalable vector, e.g., &lt;[4]xf32&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][vector] Add lower-vector-multi-reduction pass (#87333)</title>
<updated>2024-04-09T17:04:25+00:00</updated>
<author>
<name>xiaoleis-nv</name>
<email>99947620+xiaoleis-nv@users.noreply.github.com</email>
</author>
<published>2024-04-09T17:04:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8d6469b0e02c4c7bd1d496972c63ed3e2de0e077'/>
<id>8d6469b0e02c4c7bd1d496972c63ed3e2de0e077</id>
<content type='text'>
This MR adds the `lower-vector-multi-reduction` pass to lower the
vector.multi_reduction operation.

While the Transform Dialect includes an operation,
`transform.apply_patterns.vector.lower_multi_reduction`, intended for a
similar purpose, its utility is limited to projects that have adopted
the Transform Dialect. Recognizing that not all projects are equipped to
integrate this dialect, the proposed pass serves as a vital standalone
alternative. It ensures that projects solely dependent on the
traditional pass infrastructure can also benefit from the optimized
lowering of `multi_reduction` operation.

---------

Co-authored-by: Xiaolei Shi &lt;xiaoleis@nvidia.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This MR adds the `lower-vector-multi-reduction` pass to lower the
vector.multi_reduction operation.

While the Transform Dialect includes an operation,
`transform.apply_patterns.vector.lower_multi_reduction`, intended for a
similar purpose, its utility is limited to projects that have adopted
the Transform Dialect. Recognizing that not all projects are equipped to
integrate this dialect, the proposed pass serves as a vital standalone
alternative. It ensures that projects solely dependent on the
traditional pass infrastructure can also benefit from the optimized
lowering of `multi_reduction` operation.

---------

Co-authored-by: Xiaolei Shi &lt;xiaoleis@nvidia.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][Vector] Add support for scalable vectors in multi_reduction</title>
<updated>2023-08-08T17:01:59+00:00</updated>
<author>
<name>Andrzej Warzynski</name>
<email>andrzej.warzynski@arm.com</email>
</author>
<published>2023-08-01T13:15:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5c581720b9bc28e933de1aed99c79557803f22ac'/>
<id>5c581720b9bc28e933de1aed99c79557803f22ac</id>
<content type='text'>
Support for scalable vectors in vector.multi_reduction is added by
simply updating MultiDimReductionOp::verify.

Also, the conversion pattern for reducing n-D vector.multi_reduction to
2D vector.multi_reduction is updated.

Differential Revision: https://reviews.llvm.org/D157092
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Support for scalable vectors in vector.multi_reduction is added by
simply updating MultiDimReductionOp::verify.

Also, the conversion pattern for reducing n-D vector.multi_reduction to
2D vector.multi_reduction is updated.

Differential Revision: https://reviews.llvm.org/D157092
</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir] Update method cast calls to function calls</title>
<updated>2023-05-12T09:21:30+00:00</updated>
<author>
<name>Tres Popp</name>
<email>tpopp@google.com</email>
</author>
<published>2023-05-11T09:10:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c1fa60b4cde512964544ab66404dea79dbc5dcb4'/>
<id>c1fa60b4cde512964544ab66404dea79dbc5dcb4</id>
<content type='text'>
The MLIR classes Type/Attribute/Operation/Op/Value support
cast/dyn_cast/isa/dyn_cast_or_null functionality through llvm's doCast
functionality in addition to defining methods with the same name.
This change begins the migration of uses of the method to the
corresponding function call as has been decided as more consistent.

Note that there still exist classes that only define methods directly,
such as AffineExpr, and this does not include work currently to support
a functional cast/isa call.

Context:

* https://mlir.llvm.org/deprecation/ at "Use the free function variants for dyn_cast/cast/isa/…"
* Original discussion at https://discourse.llvm.org/t/preferred-casting-style-going-forward/68443

Implementation:
This follows a previous patch that updated calls
`op.cast&lt;T&gt;()-&gt; cast&lt;T&gt;(op)`. However some cases could not handle an
unprefixed `cast` call due to occurrences of variables named cast, or
occurring inside of class definitions which would resolve to the method.
All C++ files that did not work automatically with `cast&lt;T&gt;()` are
updated here to `llvm::cast` and similar with the intention that they
can be easily updated after the methods are removed through a
find-replace.

See https://github.com/llvm/llvm-project/compare/main...tpopp:llvm-project:tidy-cast-check
for the clang-tidy check that is used and then update printed
occurrences of the function to include `llvm::` before.

One can then run the following:
```
ninja -C $BUILD_DIR clang-tidy

run-clang-tidy -clang-tidy-binary=$BUILD_DIR/bin/clang-tidy -checks='-*,misc-cast-functions'\
                 -export-fixes /tmp/cast/casts.yaml mlir/*\
                 -header-filter=mlir/ -fix

rm -rf $BUILD_DIR/tools/mlir/**/*.inc
```

Differential Revision: https://reviews.llvm.org/D150348
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The MLIR classes Type/Attribute/Operation/Op/Value support
cast/dyn_cast/isa/dyn_cast_or_null functionality through llvm's doCast
functionality in addition to defining methods with the same name.
This change begins the migration of uses of the method to the
corresponding function call as has been decided as more consistent.

Note that there still exist classes that only define methods directly,
such as AffineExpr, and this does not include work currently to support
a functional cast/isa call.

Context:

* https://mlir.llvm.org/deprecation/ at "Use the free function variants for dyn_cast/cast/isa/…"
* Original discussion at https://discourse.llvm.org/t/preferred-casting-style-going-forward/68443

Implementation:
This follows a previous patch that updated calls
`op.cast&lt;T&gt;()-&gt; cast&lt;T&gt;(op)`. However some cases could not handle an
unprefixed `cast` call due to occurrences of variables named cast, or
occurring inside of class definitions which would resolve to the method.
All C++ files that did not work automatically with `cast&lt;T&gt;()` are
updated here to `llvm::cast` and similar with the intention that they
can be easily updated after the methods are removed through a
find-replace.

See https://github.com/llvm/llvm-project/compare/main...tpopp:llvm-project:tidy-cast-check
for the clang-tidy check that is used and then update printed
occurrences of the function to include `llvm::` before.

One can then run the following:
```
ninja -C $BUILD_DIR clang-tidy

run-clang-tidy -clang-tidy-binary=$BUILD_DIR/bin/clang-tidy -checks='-*,misc-cast-functions'\
                 -export-fixes /tmp/cast/casts.yaml mlir/*\
                 -header-filter=mlir/ -fix

rm -rf $BUILD_DIR/tools/mlir/**/*.inc
```

Differential Revision: https://reviews.llvm.org/D150348
</pre>
</div>
</content>
</entry>
</feed>
