[Mlir-commits] [mlir] [mlir][python] Add bindings for mlirDenseElementsAttrGet (PR #91389)
Oleksandr Alex Zinenko
llvmlistbot at llvm.org
Fri May 17 05:27:20 PDT 2024
ftynse wrote:
> > Just curious, is the idea that you would do something like?
> > ```
> > attrs = [FloatAttr.get(BF16Type.get(), 1.0), FloatAttr.get(BF16Type.get(), 2.0)]
> > ```
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > ?
>
> Yes, exactly, and then you could have `DenseElementsAttr.get(attrs)`.
Why someone would want this? Creating attributes is rather expensive. Should we rather accept python `int` and `float` lists plus a type?
https://github.com/llvm/llvm-project/pull/91389
More information about the Mlir-commits
mailing list