[llvm] [mlir] [MLIR][Python] reland (narrower) type stub generation (PR #157930)
Ingo Müller via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 19 01:52:31 PDT 2025
ingomueller-net wrote:
> I had to add a lot of signatures by hand using `MAKE_MLIR_PYTHON_QUALNAME` (the ones I mentioned above, where either the args or returns are the opaque structs).
I was wondering the shortened names can't be handled with a [patterns file](https://nanobind.readthedocs.io/en/latest/typing.html#pattern-files). The doc describes a `\from` construct that can be used to import other types with aliases. My idea was to `import my_mlir_package.ir` such that `ir.Type` works but I never tried. Couldn't we import the most important types that way to save some of the manual handling with `MAKE_MLIR_PYTHON_QUALNAME`?
https://github.com/llvm/llvm-project/pull/157930
More information about the llvm-commits
mailing list