[Mlir-commits] [mlir] [mlir][gpu] Preserve argument attributes during kernel outlining (PR #221465)
Fabian Mora
llvmlistbot at llvm.org
Sun Sep 6 07:23:39 PDT 2026
fabianmcg wrote:
> I understand it better now, Thanks for your guidance. I wish to proceed on the filtering technique @fabianmcg is it okay?
As @FedericoBruzzone mentioned there's no generic interface to determine what's safe. Further, this is a generic pass that is not tied to LLVM, meaning we shouldn't make decisions based on it.
Unfortunately this means the filtering approach would be restricted to gpu dialect attributes for parameters (eg. something like `gpu.nonnull`), but none of those exist. In other words, the filtering approach is not really possible without establishing semantics for gpu parameter attributes. This requires an RFC and a concrete proposal of the semantics, and how they are expected to behave, eg. how is `gpu.nonnull` handled by LLVM and SPIR-V.
IMO it's better to amend the op so that we can tag captured operands with their own attr dicts, ie. make the map between captured operands and kernel args explicit, ie. bypass the semantics conversation entirely. This requires a new patch first extending the op.
https://github.com/llvm/llvm-project/pull/221465
More information about the Mlir-commits
mailing list