[Mlir-commits] [mlir] [mlir][python] Add pythonic interface for GPUFuncOp (PR #163596)

Maksim Levental llvmlistbot at llvm.org
Wed Oct 15 10:48:51 PDT 2025


makslevental wrote:

So in python-extras I have both [`gpu.func`](https://github.com/makslevental/mlir-python-extras/blob/main/mlir/extras/dialects/ext/gpu.py#L382-L416) and [`func.func`](https://github.com/makslevental/mlir-python-extras/blob/main/mlir/extras/dialects/ext/func.py#L366) supported using the same base class [FuncBase](https://github.com/makslevental/mlir-python-extras/blob/main/mlir/extras/dialects/ext/func.py#L141). 

I would have liked to upstream `FuncBase` because lots of people end up defining their own `dialect.func` ops (for whatever reasons...) but I didn't get around to it and currently I'm waiting on legal at `$JOB` to approve me upstreaming that code here........... But I can say that 

1. This PR doesn't actually contravene such a layering as I currently have in python-extras (because it's simply providing a custom builder);
2. I'd be more than happy if you took my code in python-extras and copy-pasted it into a PR here where I could help adjust it for upstreaming 😉 (but then again, no pressure to use my formulation).

https://github.com/llvm/llvm-project/pull/163596


More information about the Mlir-commits mailing list