[Mlir-commits] [mlir] [MLIR] Don't drop attached discardable attributes (PR #111261)

Han-Chung Wang llvmlistbot at llvm.org
Mon Oct 7 09:44:33 PDT 2024


hanhanW wrote:

>> Also, it's not clear to me why this is correct in the full generality: how do you know that the transformation isn't invalidating some of these attributes potentially?
>
> This is not correct in full generality. For this patch, the only concern is canonicalize dropping the discardable attrs, which shouldn't be the case.

+1, it is a canonicalization pattern which infers static shapes when possible. The transformations are not applied yet, so we don't drop the attributes.

This is also what's happening in Linalg transformations. Some old school patterns look at linalg ops with `__linalg_transformation__` attribute, which uses it as a matcher. And we also have static shape inference in LinalgOp canonicalization patterns, which do not drop the discardable attributes.


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


More information about the Mlir-commits mailing list