[Mlir-commits] [mlir] [mlir][arith.constant]Fix element type of the dense attributes in target attributes to be consistent with result type in LLVM::detail::oneToOneRewrite() (PR #149787)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Wed Jul 23 11:30:32 PDT 2025
banach-space wrote:
> > @gysit , could you share a code example? I'm having difficult time visualising that.
>
> Sure this is an example for the array case:
>
> `llvm.mlir.constant(dense<-8.900000e+01> : tensor<2xf64>) : !llvm.array<2 x f64>`
Thanks! Diving into this a bit deeper, it sounds like it would be ok to require the numeric element types to match.
>
> For string we use a string attribute though:
>
> `llvm.mlir.constant("hello") : !llvm.array<5 x i8>`
Here, the input has non-numeric element type, so that could be an exception.
Does this make sense?
https://github.com/llvm/llvm-project/pull/149787
More information about the Mlir-commits
mailing list