<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/mlir/lib/Dialect/Utils/StaticValueUtils.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] Cleanup `constantTripCount()` (NFC) (#159307)</title>
<updated>2025-09-17T11:17:57+00:00</updated>
<author>
<name>Mehdi Amini</name>
<email>joker.eph@gmail.com</email>
</author>
<published>2025-09-17T11:17:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=385c9f5b0244b6e9ff33856852aafc04e6b370a3'/>
<id>385c9f5b0244b6e9ff33856852aafc04e6b370a3</id>
<content type='text'>
Add post-merge review comments on #158679</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add post-merge review comments on #158679</pre>
</div>
</content>
</entry>
<entry>
<title>[MLIR] Add a getStaticTripCount method to LoopLikeOpInterface (#158679)</title>
<updated>2025-09-17T08:00:16+00:00</updated>
<author>
<name>Mehdi Amini</name>
<email>joker.eph@gmail.com</email>
</author>
<published>2025-09-17T08:00:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=75469bb376b7fa931d03ea95f6b7142d27ef0e51'/>
<id>75469bb376b7fa931d03ea95f6b7142d27ef0e51</id>
<content type='text'>
This patch adds a `getStaticTripCount` to the LoopLikeOpInterface,
allowing loops to optionally return a static trip count when possible.
This is implemented on SCF ForOp, revamping the implementation of
`constantTripCount`, removing redundant duplicate implementations from
SCF.cpp.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds a `getStaticTripCount` to the LoopLikeOpInterface,
allowing loops to optionally return a static trip count when possible.
This is implemented on SCF ForOp, revamping the implementation of
`constantTripCount`, removing redundant duplicate implementations from
SCF.cpp.</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][DialectUtils] Fix div by zero crash (#153380)</title>
<updated>2025-08-13T11:38:57+00:00</updated>
<author>
<name>Matthias Springer</name>
<email>me@m-sp.org</email>
</author>
<published>2025-08-13T11:38:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2fcdabaf39c0af87677155f76d9c284d3cb7fbde'/>
<id>2fcdabaf39c0af87677155f76d9c284d3cb7fbde</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir] ViewLikeInterface - verify ranks in verifyOffsetSizeAndStrideOp (#147926)</title>
<updated>2025-07-20T11:20:16+00:00</updated>
<author>
<name>Maya Amrami</name>
<email>62667278+amrami@users.noreply.github.com</email>
</author>
<published>2025-07-20T11:20:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e138c951550779143551b9bd3f66183f6ad5b3df'/>
<id>e138c951550779143551b9bd3f66183f6ad5b3df</id>
<content type='text'>
getMixedOffsets() calls getMixedValues() with `static_offsets` and
`offsets`. It is assumed that the number of dynamic offsets in
`static_offsets` equals the rank of `offsets`. Otherwise, we fail on
assert when trying to access an array out of its bounds.
The same applies to getMixedStrides() and getMixedOffsets().

A verification of this assumption is added to
verifyOffsetSizeAndStrideOp() and a clear assert is added in
getMixedValues().</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
getMixedOffsets() calls getMixedValues() with `static_offsets` and
`offsets`. It is assumed that the number of dynamic offsets in
`static_offsets` equals the rank of `offsets`. Otherwise, we fail on
assert when trying to access an array out of its bounds.
The same applies to getMixedStrides() and getMixedOffsets().

A verification of this assumption is added to
verifyOffsetSizeAndStrideOp() and a clear assert is added in
getMixedValues().</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir] Add `isStatic`* size check for `ShapedType`s. NFCI. (#147085)</title>
<updated>2025-07-07T18:57:27+00:00</updated>
<author>
<name>Jakub Kuderski</name>
<email>jakub@nod-labs.com</email>
</author>
<published>2025-07-07T18:57:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6512ca7ddb0a462362aaedb18844e2993c5ae336'/>
<id>6512ca7ddb0a462362aaedb18844e2993c5ae336</id>
<content type='text'>
The motivation is to avoid having to negate `isDynamic*` checks, avoid
double negations, and allow for `ShapedType::isStaticDim` to be used in
ADT functions without having to wrap it in a lambda performing the
negation.

Also add the new functions to C and Python bindings.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The motivation is to avoid having to negate `isDynamic*` checks, avoid
double negations, and allow for `ShapedType::isStaticDim` to be used in
ADT functions without having to wrap it in a lambda performing the
negation.

Also add the new functions to C and Python bindings.</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][PartialReductionTilingInterface] Add support for `ReductionTilingStrategy::PartialReductionOuterParallel` in `tileUsingSCF`. (#143988)</title>
<updated>2025-06-23T19:27:26+00:00</updated>
<author>
<name>MaheshRavishankar</name>
<email>1663364+MaheshRavishankar@users.noreply.github.com</email>
</author>
<published>2025-06-23T19:27:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7bc956d3d64362f2ff68ff6bf94ed342914013db'/>
<id>7bc956d3d64362f2ff68ff6bf94ed342914013db</id>
<content type='text'>
Following up from https://github.com/llvm/llvm-project/pull/143467,
this PR adds support for
`ReductionTilingStrategy::PartialReductionOuterParallel` to
`tileUsingSCF`. The implementation of
`PartialReductionTilingInterface` for `Linalg` ops has been updated to
support this strategy as well. This makes the `tileUsingSCF` come on
par with `linalg::tileReductionUsingForall` which will be deprecated
subsequently.

Changes summary
- `PartialReductionTilingInterface` changes :
  - `tileToPartialReduction` method needed to get the induction
    variables of the generated tile loops. This was needed to keep the
    generated code similar to `linalg::tileReductionUsingForall`,
    specifically to create a simplified access for slicing the
intermediate partial results tensor when tiled in `num_threads` mode.
  - `getPartialResultTilePosition` methods needs the induction
    varialbes for the generated tile loops for the same reason above,
    and also needs the `tilingStrategy` to be passed in to generate
    correct code.

The tests in `transform-tile-reduction.mlir` testing the
`linalg::tileReductionUsingForall` have been moved over to test
`scf::tileUsingSCF` with
`ReductionTilingStrategy::PartialReductionOuterParallel`
strategy. Some of the test that were doing further cyclic distribution
of the transformed code from tiling are removed. Those seem like two
separate transformation that were merged into one. Ideally that would
need to happen when resolving the `scf.forall` rather than during
tiling.

Please review only the top commit. Depends on
https://github.com/llvm/llvm-project/pull/143467

Signed-off-by: MaheshRavishankar &lt;mahesh.ravishankar@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Following up from https://github.com/llvm/llvm-project/pull/143467,
this PR adds support for
`ReductionTilingStrategy::PartialReductionOuterParallel` to
`tileUsingSCF`. The implementation of
`PartialReductionTilingInterface` for `Linalg` ops has been updated to
support this strategy as well. This makes the `tileUsingSCF` come on
par with `linalg::tileReductionUsingForall` which will be deprecated
subsequently.

Changes summary
- `PartialReductionTilingInterface` changes :
  - `tileToPartialReduction` method needed to get the induction
    variables of the generated tile loops. This was needed to keep the
    generated code similar to `linalg::tileReductionUsingForall`,
    specifically to create a simplified access for slicing the
intermediate partial results tensor when tiled in `num_threads` mode.
  - `getPartialResultTilePosition` methods needs the induction
    varialbes for the generated tile loops for the same reason above,
    and also needs the `tilingStrategy` to be passed in to generate
    correct code.

The tests in `transform-tile-reduction.mlir` testing the
`linalg::tileReductionUsingForall` have been moved over to test
`scf::tileUsingSCF` with
`ReductionTilingStrategy::PartialReductionOuterParallel`
strategy. Some of the test that were doing further cyclic distribution
of the transformed code from tiling are removed. Those seem like two
separate transformation that were merged into one. Ideally that would
need to happen when resolving the `scf.forall` rather than during
tiling.

Please review only the top commit. Depends on
https://github.com/llvm/llvm-project/pull/143467

Signed-off-by: MaheshRavishankar &lt;mahesh.ravishankar@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir] Compare std::optional&lt;T&gt; to values directly (NFC) (#144241)</title>
<updated>2025-06-15T06:23:42+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-06-15T06:23:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c4ba734993ac7ca39cc101db62797aad3a2a265a'/>
<id>c4ba734993ac7ca39cc101db62797aad3a2a265a</id>
<content type='text'>
This patch transforms:

  X &amp;&amp; *X == Y

to:

  X == Y

where X is of std::optional&lt;T&gt;, and Y is of T or similar.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch transforms:

  X &amp;&amp; *X == Y

to:

  X == Y

where X is of std::optional&lt;T&gt;, and Y is of T or similar.</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][NFC] Simplify constant checks with isOneInteger and renamed isZeroInteger. (#139340)</title>
<updated>2025-05-20T21:53:02+00:00</updated>
<author>
<name>Han-Chung Wang</name>
<email>hanhan0912@gmail.com</email>
</author>
<published>2025-05-20T21:53:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c39915fa2ea2f8cc7f51d3692d17cbc8a968714c'/>
<id>c39915fa2ea2f8cc7f51d3692d17cbc8a968714c</id>
<content type='text'>
The revision adds isOneInteger helper, and simplifies the existing code
with the two methods. It removes some lambda, which makes code cleaner.

For downstream users, you can update the code with the below script.

```bash
sed -i "s/isZeroIndex/isZeroInteger/g" **/*.h
sed -i "s/isZeroIndex/isZeroInteger/g" **/*.cpp
```

---------

Signed-off-by: hanhanW &lt;hanhan0912@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The revision adds isOneInteger helper, and simplifies the existing code
with the two methods. It removes some lambda, which makes code cleaner.

For downstream users, you can update the code with the below script.

```bash
sed -i "s/isZeroIndex/isZeroInteger/g" **/*.h
sed -i "s/isZeroIndex/isZeroInteger/g" **/*.cpp
```

---------

Signed-off-by: hanhanW &lt;hanhan0912@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][NFC] Use `llvm::sort` (#140261)</title>
<updated>2025-05-16T15:35:13+00:00</updated>
<author>
<name>Iris Shi</name>
<email>0.0@owo.li</email>
</author>
<published>2025-05-16T15:35:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=78af0f3ab8e6fcd52337b7ba5873deea5d2bfe7d'/>
<id>78af0f3ab8e6fcd52337b7ba5873deea5d2bfe7d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][Tensor] Rework `ReifyRankedShapedTypeInterface` implementation for `tensor.expand_shape` op. (#113501)</title>
<updated>2025-01-27T15:05:34+00:00</updated>
<author>
<name>MaheshRavishankar</name>
<email>1663364+MaheshRavishankar@users.noreply.github.com</email>
</author>
<published>2025-01-27T15:05:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=092372da15e5165be14cdbb7cac3cf4976fd82d0'/>
<id>092372da15e5165be14cdbb7cac3cf4976fd82d0</id>
<content type='text'>
The op carries the output-shape directly. This can be used directly.
Also adds a method to get the shape as a `SmallVector&lt;OpFoldResult&gt;`.

Signed-off-by: MaheshRavishankar &lt;mahesh.ravishankar@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The op carries the output-shape directly. This can be used directly.
Also adds a method to get the shape as a `SmallVector&lt;OpFoldResult&gt;`.

Signed-off-by: MaheshRavishankar &lt;mahesh.ravishankar@gmail.com&gt;</pre>
</div>
</content>
</entry>
</feed>
