[Mlir-commits] [mlir] [mlir][memref]: Fix Bug in GlobalOp Verifier (PR #144900)

Jack Frankland llvmlistbot at llvm.org
Wed Jun 25 04:06:22 PDT 2025


FranklandJack wrote:

> I would change the `memref.global` verifier: it should check the shape + element type of the memref / tensor types match, nothing more. The only reason why there is a tensor type at all is because we want to reuse `DenseElementsAttr`, which requires a type.

Sounds good to me. I've updated the verifier to do exactly that and added specific tests case for when the element types mismatch and when the shapes mismatch. I've also added a round trip to check we can now construct a memref in a given address space from an initializer with no matching encoding.

Let me know if you would like any further changes.

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


More information about the Mlir-commits mailing list