[Mlir-commits] [mlir] [mlir][gpu] Avoid duplicate attrs when lowering gpu.func (PR #205035)

Fabian Mora llvmlistbot at llvm.org
Tue Jun 23 04:17:35 PDT 2026


fabianmcg wrote:

> > The crash is correct
> 
> A crash is never "correct", we should error and bail out cleanly instead if we intend to forbid this.

I agree there should be an error, but to me the error is not exclusive to this lowering. The error happens because there's an association happening of the inherent attribute `my_attr_key` in the op with `my_dialect.my_attr_key` (the association in this case happens because of the dialect attr helper).

Thus, to me the fix should come in the form of emitting an error when you have someone trying to assign to (or construct) an op with an attribute that matches the op `dialect` + inherent attribute key.

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


More information about the Mlir-commits mailing list