[Mlir-commits] [mlir] [mlir][gpu] Preserve argument attributes during kernel outlining (PR #221465)
purnima shrivastava
llvmlistbot at llvm.org
Sun Sep 6 06:20:09 PDT 2026
purnima-nlp wrote:
> +1 for what @fabianmcg suggested.
>
> @purnima-nlp, note that there are lots of `llvm` attributes, take a look here for the definition in MLIR:
>
> https://github.com/llvm/llvm-project/blob/ee0f7ff7e6971fcd35db64589b2c243d50b2c53e/mlir/include/mlir/Dialect/LLVMIR/LLVMDialect.td#L41-L77
>
> and [here](https://llvm.org/docs/LangRef.html) for the LangRef.
>
> > For the filtering approach, what would you suggest as the basis for deciding which argument attributes are safe to propagate to gpu.func kernel arguments? Should this be a small whitelist of optimization-related attributes like llvm.align / llvm.noalias, or is there an existing interface/convention in MLIR that I should follow?
>
> I would base it on the semantics of the attribute: an attribute should only be propagated if its meaning is preserved for a kernel argument represented by `gpu.func` or something like that. Also, I'm not aware of a generic MLIR interface that defines a _safe to propagate to gpu.func argument_ set for arbitrary LLVM parameter attributes, but @fabianmcg is more familiar with this area.
I understand it better now, Thanks for your guidance.
I wish to proceed on the filtering technique.
https://github.com/llvm/llvm-project/pull/221465
More information about the Mlir-commits
mailing list