[Mlir-commits] [mlir] [mlir][python] Add bindings for mlirDenseElementsAttrGet (PR #91389)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Fri May 17 09:30:54 PDT 2024


pranavm-nvidia wrote:

> ftynse is talking about the many element gets (the `FloatAttr.get`s you have in your example) not the single `mlirDenseElementsAttrGet`.

Right, but doesn't this API still require us to construct the constituent elements individually? To pass the `elements` argument, we would still need several calls to, e.g. `FloatAttr::get` right?
```c
MLIR_CAPI_EXPORTED MlirAttribute mlirDenseElementsAttrGet(
    MlirType shapedType, intptr_t numElements, MlirAttribute const *elements);
```

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


More information about the Mlir-commits mailing list