This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Make it possible to build a DenseResourceElementsAttr from untyped memory.
AcceptedPublic

Authored by stellaraccident on Aug 3 2023, 8:37 PM.

Details

Reviewers
rriddle
jpienaar
Summary

Exposes the existing get(ShapedType, StringRef, AsmResourceBlob) builder publicly (was protected) and adds a CAPI mlirUnmanagedDenseBlobResourceElementsAttrGet.

While such a generic construction interface is a big help when it comes to interop, it is also necessary for creating resources that don't have a standard C type (i.e. f16, the f8s, etc).

Diff Detail

Event Timeline

stellaraccident created this revision.Aug 3 2023, 8:37 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald Transcript
stellaraccident requested review of this revision.Aug 3 2023, 8:37 PM
stellaraccident retitled this revision from WIP: [mlir] Make it possible to build a DenseResourceElementsAttr from untyped memory. to [mlir] Make it possible to build a DenseResourceElementsAttr from untyped memory..
jpienaar accepted this revision.Aug 5 2023, 5:27 PM

LGTM, I dont think we have a name else for it and being able to have an opaque instance for those non-standard types (although for those one could consider the typed one the storage class instance, but fine the accessors become less useful for these cases).

This revision is now accepted and ready to land.Aug 5 2023, 5:27 PM