<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/mlir/python, branch users/nico/python-1</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][python] Add utils for more pythonic context creation and registration management</title>
<updated>2025-07-04T08:51:43+00:00</updated>
<author>
<name>Nicolas Vasilache</name>
<email>nico.vasilache@amd.com</email>
</author>
<published>2025-07-04T08:32:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2b8f82b2bad6b2ada988fb2b874d676aa748a35b'/>
<id>2b8f82b2bad6b2ada988fb2b874d676aa748a35b</id>
<content type='text'>
Co-authored-by: Fabian Mora &lt;fmora.dev@gmail.com
Co-authored-by: Oleksandr "Alex" Zinenko &lt;git@ozinenko.com&gt;
Co-authored-by: Tres &lt;tpopp@users.noreply.github.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-authored-by: Fabian Mora &lt;fmora.dev@gmail.com
Co-authored-by: Oleksandr "Alex" Zinenko &lt;git@ozinenko.com&gt;
Co-authored-by: Tres &lt;tpopp@users.noreply.github.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[MLIR][Transform] expose transform.debug extension in Python (#145550)</title>
<updated>2025-06-25T15:39:01+00:00</updated>
<author>
<name>Rolf Morel</name>
<email>rolf.morel@intel.com</email>
</author>
<published>2025-06-25T15:39:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c08502defe47d71d3e0beecee8ca040279c4dff9'/>
<id>c08502defe47d71d3e0beecee8ca040279c4dff9</id>
<content type='text'>
Removes the Debug... prefix on the ops in tablegen, in line with pretty
much all other Transform-dialect extension ops. This means that the ops
in Python look like
`debug.EmitParamAsRemarkOp`/`debug.emit_param_as_remark` instead of
`debug.DebugEmitParamAsRemarkOp`/`debug.debug_emit_param_as_remark`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Removes the Debug... prefix on the ops in tablegen, in line with pretty
much all other Transform-dialect extension ops. This means that the ops
in Python look like
`debug.EmitParamAsRemarkOp`/`debug.emit_param_as_remark` instead of
`debug.DebugEmitParamAsRemarkOp`/`debug.debug_emit_param_as_remark`.</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][python] add `MLIR_BINDINGS_PYTHON_INSTALL_PREFIX` to make bindings install dir configurable (#124878)</title>
<updated>2025-06-23T19:49:01+00:00</updated>
<author>
<name>Maksim Levental</name>
<email>maksim.levental@gmail.com</email>
</author>
<published>2025-06-23T19:49:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=653d0d007375d421875f91ae758b4189ce8e02b2'/>
<id>653d0d007375d421875f91ae758b4189ce8e02b2</id>
<content type='text'>
This PR parameterizes the install directory of the MLIR Python bindings in the final distribution.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This PR parameterizes the install directory of the MLIR Python bindings in the final distribution.</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir] [python] Fixed the return type of `MemRefType.get_strides_and_offset` (#144523)</title>
<updated>2025-06-18T13:53:20+00:00</updated>
<author>
<name>Sergei Lebedev</name>
<email>185856+superbobry@users.noreply.github.com</email>
</author>
<published>2025-06-18T13:53:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1d6f1029f7e8cf5468309078da3e85201844b625'/>
<id>1d6f1029f7e8cf5468309078da3e85201844b625</id>
<content type='text'>
Previously, the return type for `offset` was `list[int]`, which clearly
is not right.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, the return type for `offset` was `list[int]`, which clearly
is not right.</pre>
</div>
</content>
</entry>
<entry>
<title>[MLIR][Transform] apply_registered_pass: support ListOptions (#144026)</title>
<updated>2025-06-16T11:40:50+00:00</updated>
<author>
<name>Rolf Morel</name>
<email>rolf.morel@intel.com</email>
</author>
<published>2025-06-16T11:40:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e00853859e89114d8db24aa0b863b618175f79c7'/>
<id>e00853859e89114d8db24aa0b863b618175f79c7</id>
<content type='text'>
Interpret an option value with multiple values, either in the form of an
`ArrayAttr` (either static or passed through a param) or as the multiple
attrs associated to a param, as a comma-separated list, i.e. as a
ListOption on a pass.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Interpret an option value with multiple values, either in the form of an
`ArrayAttr` (either static or passed through a param) or as the multiple
attrs associated to a param, as a comma-separated list, i.e. as a
ListOption on a pass.</pre>
</div>
</content>
</entry>
<entry>
<title>[MLIR][Transform] apply_registered_op fixes: arg order &amp; python options auto-conversion (#143779)</title>
<updated>2025-06-11T20:19:52+00:00</updated>
<author>
<name>Rolf Morel</name>
<email>rolf.morel@intel.com</email>
</author>
<published>2025-06-11T20:19:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=fb761aa38b0bc01ab911f5dbbfb474b70aaafbb4'/>
<id>fb761aa38b0bc01ab911f5dbbfb474b70aaafbb4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[MLIR][Transform] apply_registered_pass op's options as a dict (#143159)</title>
<updated>2025-06-11T16:33:55+00:00</updated>
<author>
<name>Rolf Morel</name>
<email>854835+rolfmorel@users.noreply.github.com</email>
</author>
<published>2025-06-11T16:33:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=fe7bf4b90b1a835418bddd2b2aa63b4977a9f6d2'/>
<id>fe7bf4b90b1a835418bddd2b2aa63b4977a9f6d2</id>
<content type='text'>
Improve ApplyRegisteredPassOp's support for taking options by taking
them as a dict (vs a list of string-valued key-value pairs).

Values of options are provided as either static attributes or as params
(which pass in attributes at interpreter runtime). In either case, the
keys and value attributes are converted to strings and a single
options-string, in the format used on the commandline, is constructed to
pass to the `addToPipeline`-pass API.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Improve ApplyRegisteredPassOp's support for taking options by taking
them as a dict (vs a list of string-valued key-value pairs).

Values of options are provided as either static attributes or as params
(which pass in attributes at interpreter runtime). In either case, the
keys and value attributes are converted to strings and a single
options-string, in the format used on the commandline, is constructed to
pass to the `addToPipeline`-pass API.</pre>
</div>
</content>
</entry>
<entry>
<title>assert with more information to help debug (#132194)</title>
<updated>2025-05-29T04:14:37+00:00</updated>
<author>
<name>drazi</name>
<email>fengxie83@gmail.com</email>
</author>
<published>2025-05-29T04:14:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=25c5235f30f22b9a95e440f16d1671970554df75'/>
<id>25c5235f30f22b9a95e440f16d1671970554df75</id>
<content type='text'>
This PR output debug message to assertion to help debug user python
code. Will print out more friendly information

```
&gt;           assert isinstance(arg, _cext.ir.Value), f"expects Value, got {type(arg)}"                                                          
E           AssertionError: expected Value, got &lt;class 'UserDefinedClass'&gt;       
```</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This PR output debug message to assertion to help debug user python
code. Will print out more friendly information

```
&gt;           assert isinstance(arg, _cext.ir.Value), f"expects Value, got {type(arg)}"                                                          
E           AssertionError: expected Value, got &lt;class 'UserDefinedClass'&gt;       
```</pre>
</div>
</content>
</entry>
<entry>
<title>[MLIR][Linalg] Introduce transpose/broadcast semantic to linalg.batch… (#130944)</title>
<updated>2025-05-12T12:29:34+00:00</updated>
<author>
<name>Md Asghar Ahmad Shahid</name>
<email>md.asghar.ahmad.shahid@intel.com</email>
</author>
<published>2025-05-12T12:29:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d78ff5f6a9c1e63a9a33ef92778edec37bf4d292'/>
<id>d78ff5f6a9c1e63a9a33ef92778edec37bf4d292</id>
<content type='text'>
…_reduce_matmul.

This patch exposes broadcast and transpose semantics on
'batch_reduce_matmul'. This is the last one in continuation of other two
variant of matmul ops.

The broadcast and transpose semantic are as follows:

Broadcast and Transpose semantics can be appiled by specifying the
explicit attribute 'indexing_maps' as shown below. This is a list
attribute, so must include maps for all arguments if specified.

    Example Transpose:
    ```
    linalg.batch_reduce_matmul indexing_maps = [
       affine_map&lt;(d0, d1, d2, d3) -&gt; (d0, d3, d1)&gt;, // transpose
       affine_map&lt;(d0, d1, d2, d3) -&gt; (d0, d3, d2)&gt;,
       affine_map&lt;(d0, d1, d2, d3) -&gt; (d1, d2)&gt;
       ]
          ins(%arg0, %arg1 : memref&lt;2x5x3xf32&gt;,memref&lt;2x5x7xf32&gt;)
          outs(%arg2: memref&lt;3x7xf32&gt;)
    ```

    Example Broadcast:
    ```
    linalg.batch_reduce_matmul indexing_maps = [
       affine_map&lt;(d0, d1, d2, d3) -&gt; (d3)&gt;,         // broadcast
       affine_map&lt;(d0, d1, d2, d3) -&gt; (d0, d3, d2)&gt;,
       affine_map&lt;(d0, d1, d2, d3) -&gt; (d1, d2)&gt;
       ]
          ins(%arg0, %arg1 : memref&lt;5xf32&gt;, memref&lt;2x5x7xf32&gt;)
          outs(%arg2: memref&lt;3x7xf32&gt;)
    ```

    Example Broadcast and Transpose:
    ```
    linalg.batch_reduce_matmul indexing_maps = [
       affine_map&lt;(d0, d1, d2, d3) -&gt; (d1, d3)&gt;,     // broadcast
       affine_map&lt;(d0, d1, d2, d3) -&gt; (d0, d2, d3)&gt;, // transpose
       affine_map&lt;(d0, d1, d2, d3) -&gt; (d1, d2)&gt;
       ]
          ins(%arg0, %arg1 : memref&lt;3x5xf32&gt;, memref&lt;2x7x5xf32&gt;)
          outs(%arg2: memref&lt;3x7xf32&gt;)
    ```

RFCs and related PR:

https://discourse.llvm.org/t/rfc-linalg-opdsl-constant-list-attribute-definition/80149
https://discourse.llvm.org/t/rfc-op-explosion-in-linalg/82863
https://discourse.llvm.org/t/rfc-mlir-linalg-operation-tree/83586
https://github.com/llvm/llvm-project/pull/115319
https://github.com/llvm/llvm-project/pull/122275</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
…_reduce_matmul.

This patch exposes broadcast and transpose semantics on
'batch_reduce_matmul'. This is the last one in continuation of other two
variant of matmul ops.

The broadcast and transpose semantic are as follows:

Broadcast and Transpose semantics can be appiled by specifying the
explicit attribute 'indexing_maps' as shown below. This is a list
attribute, so must include maps for all arguments if specified.

    Example Transpose:
    ```
    linalg.batch_reduce_matmul indexing_maps = [
       affine_map&lt;(d0, d1, d2, d3) -&gt; (d0, d3, d1)&gt;, // transpose
       affine_map&lt;(d0, d1, d2, d3) -&gt; (d0, d3, d2)&gt;,
       affine_map&lt;(d0, d1, d2, d3) -&gt; (d1, d2)&gt;
       ]
          ins(%arg0, %arg1 : memref&lt;2x5x3xf32&gt;,memref&lt;2x5x7xf32&gt;)
          outs(%arg2: memref&lt;3x7xf32&gt;)
    ```

    Example Broadcast:
    ```
    linalg.batch_reduce_matmul indexing_maps = [
       affine_map&lt;(d0, d1, d2, d3) -&gt; (d3)&gt;,         // broadcast
       affine_map&lt;(d0, d1, d2, d3) -&gt; (d0, d3, d2)&gt;,
       affine_map&lt;(d0, d1, d2, d3) -&gt; (d1, d2)&gt;
       ]
          ins(%arg0, %arg1 : memref&lt;5xf32&gt;, memref&lt;2x5x7xf32&gt;)
          outs(%arg2: memref&lt;3x7xf32&gt;)
    ```

    Example Broadcast and Transpose:
    ```
    linalg.batch_reduce_matmul indexing_maps = [
       affine_map&lt;(d0, d1, d2, d3) -&gt; (d1, d3)&gt;,     // broadcast
       affine_map&lt;(d0, d1, d2, d3) -&gt; (d0, d2, d3)&gt;, // transpose
       affine_map&lt;(d0, d1, d2, d3) -&gt; (d1, d2)&gt;
       ]
          ins(%arg0, %arg1 : memref&lt;3x5xf32&gt;, memref&lt;2x7x5xf32&gt;)
          outs(%arg2: memref&lt;3x7xf32&gt;)
    ```

RFCs and related PR:

https://discourse.llvm.org/t/rfc-linalg-opdsl-constant-list-attribute-definition/80149
https://discourse.llvm.org/t/rfc-op-explosion-in-linalg/82863
https://discourse.llvm.org/t/rfc-mlir-linalg-operation-tree/83586
https://github.com/llvm/llvm-project/pull/115319
https://github.com/llvm/llvm-project/pull/122275</pre>
</div>
</content>
</entry>
<entry>
<title>[MLIR][Linalg][Python] Improve bindings for linalg.elementwise (#139462)</title>
<updated>2025-05-12T09:34:55+00:00</updated>
<author>
<name>Rolf Morel</name>
<email>854835+rolfmorel@users.noreply.github.com</email>
</author>
<published>2025-05-12T09:34:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ba739c166da518f04bdc83c956f962744e0487c6'/>
<id>ba739c166da518f04bdc83c956f962744e0487c6</id>
<content type='text'>
Adds wrappers for ElementWiseOp, in particular to ensure appropriate
default indexing maps are derived.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adds wrappers for ElementWiseOp, in particular to ensure appropriate
default indexing maps are derived.</pre>
</div>
</content>
</entry>
</feed>
