<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/mlir/test/python/ir, 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][py][c] Enable setting block arg locations. (#169033)</title>
<updated>2025-11-21T13:31:46+00:00</updated>
<author>
<name>Jacques Pienaar</name>
<email>jpienaar@google.com</email>
</author>
<published>2025-11-21T13:31:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5ab49edde282814f41b90431194afaff694deba7'/>
<id>5ab49edde282814f41b90431194afaff694deba7</id>
<content type='text'>
This enables changing the location of a block argument. Follows the
approach for updating type of block arg.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This enables changing the location of a block argument. Follows the
approach for updating type of block arg.</pre>
</div>
</content>
</entry>
<entry>
<title>[MLIR][Python] Add wrappers for scf.index_switch (#167458)</title>
<updated>2025-11-11T23:49:45+00:00</updated>
<author>
<name>Asher Mancinelli</name>
<email>ashermancinelli@gmail.com</email>
</author>
<published>2025-11-11T23:49:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ce175995533c7407a00d72633f867bf93d4d4499'/>
<id>ce175995533c7407a00d72633f867bf93d4d4499</id>
<content type='text'>
The C++ index switch op has utilities for `getCaseBlock(int i)` and
`getDefaultBlock()`, so these have been added.
Optional body builder args have been added: one for the default case and
one for the switch cases.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The C++ index switch op has utilities for `getCaseBlock(int i)` and
`getDefaultBlock()`, so these have been added.
Optional body builder args have been added: one for the default case and
one for the switch cases.</pre>
</div>
</content>
</entry>
<entry>
<title>[MLIR][Python] fix PyRegionList `__iter__` (#167466)</title>
<updated>2025-11-11T15:25:50+00:00</updated>
<author>
<name>Maksim Levental</name>
<email>maksim.levental@gmail.com</email>
</author>
<published>2025-11-11T15:25:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8346a772bcce11d8bd0f0c8635b4fb4d1d477220'/>
<id>8346a772bcce11d8bd0f0c8635b4fb4d1d477220</id>
<content type='text'>
Fixes https://github.com/llvm/llvm-project/issues/167455</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes https://github.com/llvm/llvm-project/issues/167455</pre>
</div>
</content>
</entry>
<entry>
<title>[MLIR][Python] fix getOwner to return (typed) nb::object instead of abstract PyOpView (#165053)</title>
<updated>2025-10-26T01:48:46+00:00</updated>
<author>
<name>Maksim Levental</name>
<email>maksim.levental@gmail.com</email>
</author>
<published>2025-10-26T01:48:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c05ce9b0057c9b1413bee964bb2d400ffbddede5'/>
<id>c05ce9b0057c9b1413bee964bb2d400ffbddede5</id>
<content type='text'>
https://github.com/llvm/llvm-project/pull/157930 changed `nb::object
getOwner()` to `PyOpView getOwner()` which implicitly constructs the
generic OpView against from a (possibly) concrete OpView. This PR fixes
that.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/llvm/llvm-project/pull/157930 changed `nb::object
getOwner()` to `PyOpView getOwner()` which implicitly constructs the
generic OpView against from a (possibly) concrete OpView. This PR fixes
that.</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][python] add dict-style to IR attributes (#163200)</title>
<updated>2025-10-16T17:42:05+00:00</updated>
<author>
<name>Perry Gibson</name>
<email>Wheest@users.noreply.github.com</email>
</author>
<published>2025-10-16T17:42:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=35cd291427d56d068573f717e4f8660e81eef0e3'/>
<id>35cd291427d56d068573f717e4f8660e81eef0e3</id>
<content type='text'>
It makes sense that Attribute dicts/maps should behave like dicts in the
Python bindings. Previously this was not the case.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It makes sense that Attribute dicts/maps should behave like dicts in the
Python bindings. Previously this was not the case.</pre>
</div>
</content>
</entry>
<entry>
<title>[MLIR][Python] expose Operation::setLoc (#161594)</title>
<updated>2025-10-02T04:57:10+00:00</updated>
<author>
<name>Maksim Levental</name>
<email>maksim.levental@gmail.com</email>
</author>
<published>2025-10-02T04:57:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=fea2cca4d6364f66a5f663d95141c9cab53dbfd2'/>
<id>fea2cca4d6364f66a5f663d95141c9cab53dbfd2</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[MLIR][Python] add unchecked gettors (#160954)</title>
<updated>2025-09-27T18:54:33+00:00</updated>
<author>
<name>Maksim Levental</name>
<email>maksim.levental@gmail.com</email>
</author>
<published>2025-09-27T18:54:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3834c5428dcdd8807331b2ff522115dba2f89aae'/>
<id>3834c5428dcdd8807331b2ff522115dba2f89aae</id>
<content type='text'>
Some of the current gettors require passing locations (i.e., there be an
active location) because they're using the "checked" APIs. This PR adds
"unchecked" gettors which only require an active context.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some of the current gettors require passing locations (i.e., there be an
active location) because they're using the "checked" APIs. This PR adds
"unchecked" gettors which only require an active context.</pre>
</div>
</content>
</entry>
<entry>
<title>[MLIR][Python] Add docstring for generated python op classes (#158198)</title>
<updated>2025-09-16T03:16:28+00:00</updated>
<author>
<name>Twice</name>
<email>twice@apache.org</email>
</author>
<published>2025-09-16T03:16:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=10d0d955e22be43abab8fe7e339e99068aaac030'/>
<id>10d0d955e22be43abab8fe7e339e99068aaac030</id>
<content type='text'>
This PR adds support in mlir-tblgen for generating docstrings for each
Python class corresponding to an MLIR op. The docstrings are currently
derived from the op’s description in ODS, with indentation adjusted to
display nicely in Python. This makes it easier for Python users to see
the op descriptions directly in their IDE or LSP while coding.

In the future, we can extend the docstrings to include explanations for
each method, attribute, and so on.

This idea was previously discussed in the `#mlir-python` channel on
Discord with @makslevental and @superbobry.

---------

Co-authored-by: Maksim Levental &lt;maksim.levental@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This PR adds support in mlir-tblgen for generating docstrings for each
Python class corresponding to an MLIR op. The docstrings are currently
derived from the op’s description in ODS, with indentation adjusted to
display nicely in Python. This makes it easier for Python users to see
the op descriptions directly in their IDE or LSP while coding.

In the future, we can extend the docstrings to include explanations for
each method, attribute, and so on.

This idea was previously discussed in the `#mlir-python` channel on
Discord with @makslevental and @superbobry.

---------

Co-authored-by: Maksim Levental &lt;maksim.levental@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[MLIR][Python] fix generated value builder type hints (#158449)</title>
<updated>2025-09-15T17:54:03+00:00</updated>
<author>
<name>Maksim Levental</name>
<email>maksim.levental@gmail.com</email>
</author>
<published>2025-09-15T17:54:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=063d8d7d221406e66eeed859f5c0288d9c98753b'/>
<id>063d8d7d221406e66eeed859f5c0288d9c98753b</id>
<content type='text'>
Currently the type hints on the returns of the "value builders" are
`ir.Value`, `Sequence[ir.Value]`, and `ir.Operation`, none of which are
correct. The correct possibilities are `ir.OpResult`, `ir.OpResultList`,
the OpView class itself (e.g., `AttrSizedResultsOp`) or the union of the
3 (for variadic results). This PR fixes those hints.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently the type hints on the returns of the "value builders" are
`ir.Value`, `Sequence[ir.Value]`, and `ir.Operation`, none of which are
correct. The correct possibilities are `ir.OpResult`, `ir.OpResultList`,
the OpView class itself (e.g., `AttrSizedResultsOp`) or the union of the
3 (for variadic results). This PR fixes those hints.</pre>
</div>
</content>
</entry>
<entry>
<title>[MLIR][Python] restore `liveModuleMap` (#158506)</title>
<updated>2025-09-15T04:45:30+00:00</updated>
<author>
<name>Maksim Levental</name>
<email>maksim.levental@gmail.com</email>
</author>
<published>2025-09-15T04:45:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6a4f66476ff59a32898891345bc07547e71028ec'/>
<id>6a4f66476ff59a32898891345bc07547e71028ec</id>
<content type='text'>
There are cases where the same module can have multiple references (via
`PyModule::forModule` via `PyModule::createFromCapsule`) and thus when
`PyModule`s get gc'd `mlirModuleDestroy` can get called multiple times
for the same actual underlying `mlir::Module` (i.e., double free). So we
do actually need a "liveness map" for modules.

Note, if `type_caster&lt;MlirModule&gt;::from_cpp` weren't a thing we could guarantree
this never happened except explicitly when users called `PyModule::createFromCapsule`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are cases where the same module can have multiple references (via
`PyModule::forModule` via `PyModule::createFromCapsule`) and thus when
`PyModule`s get gc'd `mlirModuleDestroy` can get called multiple times
for the same actual underlying `mlir::Module` (i.e., double free). So we
do actually need a "liveness map" for modules.

Note, if `type_caster&lt;MlirModule&gt;::from_cpp` weren't a thing we could guarantree
this never happened except explicitly when users called `PyModule::createFromCapsule`.</pre>
</div>
</content>
</entry>
</feed>
