[Mlir-commits] [mlir] [mlir][python] add dict-style to IR attributes (PR #163200)
Mehdi Amini
llvmlistbot at llvm.org
Thu Oct 16 07:05:25 PDT 2025
joker-eph wrote:
@Wheest — Thanks for your patience, and sorry that this discussion was derailed beyond the scope of the patch (and the point I was initially trying to raise). I had marked the PR as blocked because it was late in my timezone and I mainly wanted to ensure that we didn’t skip over the broader discussion about the API’s direction — not because of any fundamental issue with your patch. Unfortunately by the time I returned, things had already spiraled a bit.
Let me try to bring this back to focus. This shouldn’t be a complex issue, I don't know why this escalated so much — I mainly want to make sure we have a shared understanding of the context. Here’s where I’m coming from:
* **On the design side:** a class modeling an MLIR Operation ultimately shouldn’t expose something as generic as “attributes” — we’ll need to distinguish between *inherent* and *discardable* attributes in the API.
* **On the migration path:** we should think ahead about how to handle this transition in the Python layer to minimize disruption for users. At some point, it’s better to focus improvements on newer APIs rather than extending older ones. I’m not saying we’ve reached that point yet, but this is something to keep in mind as it's a natural part of the migration to steer users towards newer APIs.
* **Regarding this patch:** there’s nothing inherently wrong with it. What we need right now is acknowledgement about the current state and direction. Separately from this (but somehow related), `properties` will also require to start having a more concrete plan on the Python-side.
Assuming we’re aligned on these points, I don’t have any objections to moving forward with the current patch.
https://github.com/llvm/llvm-project/pull/163200
More information about the Mlir-commits
mailing list