[Mlir-commits] [mlir] add IntegerLikeTypeInterface to enable out-of-tree uses of built-in attributes that otherwise force integer types (PR #137061)
River Riddle
llvmlistbot at llvm.org
Sun Apr 27 12:29:23 PDT 2025
River707 wrote:
> OK, so goal is to enable printing/parsing generation with more diverse types (all the other changes just in service of this). Here it seems like TensorLiteralParser::getAttr is the problem as its hardcoded to support int, float or string. So a type interface "DenseElementsAttrContainable" (or some better name), would seem to be another option. This would enable specializing parsing & printing for the contained types. This I think also helps beyond integer types - which I think all needs custom printer/parsers currently.
DenseElementsAttr only supports a specific set of types though, adding an interface would be on a path to opening up that attribute to be more generic (which I'm not sure we'd actually want to do - you can always define your own ElementsAttr).
https://github.com/llvm/llvm-project/pull/137061
More information about the Mlir-commits
mailing list