<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/mlir/lib/Interfaces/ViewLikeInterface.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] 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] Directly call ShapedType::isDynamic without lambdas (NFC) (#142994)</title>
<updated>2025-06-05T23:14:27+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-06-05T23:14:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=85480a4d37b4d3eaf5ea86f642978cc834e1a47e'/>
<id>85480a4d37b4d3eaf5ea86f642978cc834e1a47e</id>
<content type='text'>
We do not need lambdas in these places.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We do not need lambdas in these places.</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][tensor] Fix slice canonicalizer for out-of-bounds cases (#132534)</title>
<updated>2025-03-24T13:39:37+00:00</updated>
<author>
<name>Matthias Springer</name>
<email>me@m-sp.org</email>
</author>
<published>2025-03-24T13:39:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=529ee3cf3bb97b7ff468b5046372d070a8667147'/>
<id>529ee3cf3bb97b7ff468b5046372d070a8667147</id>
<content type='text'>
Since #130487, `tensor.extract_slice` and `tensor.insert_slice` ops that
are statically detected to go out of bounds are rejected by the
verifier.

This commit fixes canonicalization patterns that currently fold
dynamically out-of-bounds ops (valid IR) to statically out-of-bounds ops
(invalid IR).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since #130487, `tensor.extract_slice` and `tensor.insert_slice` ops that
are statically detected to go out of bounds are rejected by the
verifier.

This commit fixes canonicalization patterns that currently fold
dynamically out-of-bounds ops (valid IR) to statically out-of-bounds ops
(invalid IR).</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][Interfaces][NFC] Update doc of ViewLikeOpInterface parser/printer handlers (#122555)</title>
<updated>2025-01-15T01:58:52+00:00</updated>
<author>
<name>Diego Caballero</name>
<email>dieg0ca6aller0@gmail.com</email>
</author>
<published>2025-01-15T01:58:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ef4800c9168ee45ced8295d13ac68f58b4358759'/>
<id>ef4800c9168ee45ced8295d13ac68f58b4358759</id>
<content type='text'>
This PR addresses part of the feedback provided in #115808.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This PR addresses part of the feedback provided in #115808.</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][transform] Consistent `linalg` `transform` op syntax for dynamic index lists (#90897)</title>
<updated>2024-05-08T14:11:53+00:00</updated>
<author>
<name>srcarroll</name>
<email>50210727+srcarroll@users.noreply.github.com</email>
</author>
<published>2024-05-08T14:11:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2c1c67674cb3beb4e091a9f446de5858631cf8ae'/>
<id>2c1c67674cb3beb4e091a9f446de5858631cf8ae</id>
<content type='text'>
This patch is a first pass at making consistent syntax across the
`LinalgTransformOp`s that use dynamic index lists for size parameters.
Previously, there were two different forms: inline types in the list, or
place them in the functional style tuple. This patch goes for the
latter.

In order to do this, the `printPackedOrDynamicIndexList`,
`printDynamicIndexList` and their `parse` counterparts were modified so
that the types can be optionally provided to the corresponding custom
directives.

All affected ops now use tablegen `assemblyFormat`, so custom
`parse`/`print` functions have been removed. There are a couple ops that
will likely add dynamic size support, and once that happens it should be
made sure that the assembly remains consistent with the changes in this
patch.

The affected ops are as follows: `pack`, `pack_greedily`,
`tile_using_forall`. The `tile_using_for` and `vectorize` ops already
used this syntax, but their custom assembly was removed.

---------

Co-authored-by: Oleksandr "Alex" Zinenko &lt;ftynse@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch is a first pass at making consistent syntax across the
`LinalgTransformOp`s that use dynamic index lists for size parameters.
Previously, there were two different forms: inline types in the list, or
place them in the functional style tuple. This patch goes for the
latter.

In order to do this, the `printPackedOrDynamicIndexList`,
`printDynamicIndexList` and their `parse` counterparts were modified so
that the types can be optionally provided to the corresponding custom
directives.

All affected ops now use tablegen `assemblyFormat`, so custom
`parse`/`print` functions have been removed. There are a couple ops that
will likely add dynamic size support, and once that happens it should be
made sure that the assembly remains consistent with the changes in this
patch.

The affected ops are as follows: `pack`, `pack_greedily`,
`tile_using_forall`. The `tile_using_for` and `vectorize` ops already
used this syntax, but their custom assembly was removed.

---------

Co-authored-by: Oleksandr "Alex" Zinenko &lt;ftynse@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[MLIR] Remove unused implicit capture in the lambda (NFC)</title>
<updated>2024-03-18T21:52:06+00:00</updated>
<author>
<name>Mehdi Amini</name>
<email>joker.eph@gmail.com</email>
</author>
<published>2024-03-18T21:50:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e0b19e957e0ef9b4d88e09c44d6499d931328ecc'/>
<id>e0b19e957e0ef9b4d88e09c44d6499d931328ecc</id>
<content type='text'>
This lambda does not capture anything, the `&amp;` is just misleading.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This lambda does not capture anything, the `&amp;` is just misleading.
</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir] Verify non-negative `offset` and `size` (#72059)</title>
<updated>2023-11-16T06:42:37+00:00</updated>
<author>
<name>Rik Huijzer</name>
<email>github@huijzer.xyz</email>
</author>
<published>2023-11-16T06:42:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1949fe90bfccaa13b4ecbce33de3123824b9a150'/>
<id>1949fe90bfccaa13b4ecbce33de3123824b9a150</id>
<content type='text'>
In #71153, the `memref.subview` canonicalizer crashes due to a negative
`size` being passed as an operand. During `SubViewOp::verify` this
negative `size` is not yet detectable since it is dynamic and only
available after constant folding, which happens during the
canonicalization passes. As discussed in
&lt;https://discourse.llvm.org/t/rfc-more-opfoldresult-and-mixed-indices-in-ops-that-deal-with-shaped-values/72510&gt;,
the verifier should not be extended as it should "only verify local
aspects of an operation".

This patch fixes #71153 by not folding in aforementioned situation.

Also, this patch adds a basic offset and size check in the
`OffsetSizeAndStrideOpInterface` verifier.

Note: only `offset` and `size` are checked because `stride` is allowed
to be negative
(https://github.com/llvm/llvm-project/commit/54d81e49e3b72f6a305891fe169ecd7c6f559223).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In #71153, the `memref.subview` canonicalizer crashes due to a negative
`size` being passed as an operand. During `SubViewOp::verify` this
negative `size` is not yet detectable since it is dynamic and only
available after constant folding, which happens during the
canonicalization passes. As discussed in
&lt;https://discourse.llvm.org/t/rfc-more-opfoldresult-and-mixed-indices-in-ops-that-deal-with-shaped-values/72510&gt;,
the verifier should not be extended as it should "only verify local
aspects of an operation".

This patch fixes #71153 by not folding in aforementioned situation.

Also, this patch adds a basic offset and size check in the
`OffsetSizeAndStrideOpInterface` verifier.

Note: only `offset` and `size` are checked because `stride` is allowed
to be negative
(https://github.com/llvm/llvm-project/commit/54d81e49e3b72f6a305891fe169ecd7c6f559223).</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][Interfaces][NFC] Delete dead code from OffsetSizeAndStrideOpInterface</title>
<updated>2023-08-03T09:47:01+00:00</updated>
<author>
<name>Matthias Springer</name>
<email>me@m-sp.org</email>
</author>
<published>2023-08-03T09:37:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b2d1de2d632b7d4f2cb677f6b8ba36c6dda2c846'/>
<id>b2d1de2d632b7d4f2cb677f6b8ba36c6dda2c846</id>
<content type='text'>
Also make `getNumDynamicEntriesUpToIdx` a helper function. It does not have to be an interface method.

Differential Revision: https://reviews.llvm.org/D156864
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also make `getNumDynamicEntriesUpToIdx` a helper function. It does not have to be an interface method.

Differential Revision: https://reviews.llvm.org/D156864
</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][Interfaces][NFC] Use camel case for offset/size/stride accessors</title>
<updated>2023-08-03T09:32:17+00:00</updated>
<author>
<name>Matthias Springer</name>
<email>me@m-sp.org</email>
</author>
<published>2023-08-03T09:30:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a1f04b7037ad43e27dc196a687d954c78a97247a'/>
<id>a1f04b7037ad43e27dc196a687d954c78a97247a</id>
<content type='text'>
This is for consistency with the remaining MLIR code base.

Differential Revision: https://reviews.llvm.org/D156857
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is for consistency with the remaining MLIR code base.

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