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

Maksim Levental llvmlistbot at llvm.org
Fri May 17 15:08:36 PDT 2024


makslevental wrote:

> would I just do something like this in the bindings

Looks about right but the only issue here is the memory/ownership: what to do with the alloc after the call returns?

> Or is there already infrastructure to convert Python numbers?

Don't think so (unless I missed someting over the last few months).

> Also, is there any value in allowing existing attributes to be packed into a `DenseElementsAttr`? 

Yea I don't know :shrug: doesn't hurt to have more functionality but maybe C APIs should be concise/minimal? I'll let @ftynse make the call since he has more experience.


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


More information about the Mlir-commits mailing list