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

llvmlistbot at llvm.org llvmlistbot at llvm.org
Mon Jun 22 07:26:12 PDT 2026


lijinpei-amd wrote:

> The crash is correct, it highlights inappropriate use of the API and attributes, eg. ` gpu.known_block_size = array<i32: 32, 1, 1>` creates an invalid state. Having said that, this does reveals an issue with inherent v. discardable attributes that needs to be solved in IR.

Perhaps it would be better to
1. never crash, instead at least give some meaningful diagnostics.
2. for a lowering/transformation pass, it should properly handle the inherent/discardable attributes it knows of, and ignore other attrs it doesn't know.

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


More information about the Mlir-commits mailing list