[Mlir-commits] [mlir] [mlir][memref]: Fix Bug in GlobalOp Verifier (PR #144900)
Jack Frankland
llvmlistbot at llvm.org
Wed Jun 25 08:22:21 PDT 2025
================
@@ -342,6 +342,16 @@ memref.global "priate" constant @memref5 : memref<2xf32> = uninitialized
// -----
+// expected-error @+1 {{op initial value element expected to be of type 'f16', but was of type 'f32'}}
+"memref.global"() <{constant, initial_value = dense<1.000000e+00> : tensor<1xf32>, sym_name = "memref6", sym_visibility = "private", type = memref<1xf16>}> : () -> ()
+
----------------
FranklandJack wrote:
So I tried this and it gives a slightly different error message which makes me think that in the pretty form it is triggering a different verifier:
```
unexpected decimal integer literal for a floating point value
memref.global "private" constant @memref6 : memref<1xf16> = dense<[1]>
```
https://github.com/llvm/llvm-project/pull/144900
More information about the Mlir-commits
mailing list