[mlir] DenseStringElementsAttr added to default attribute types
Summary: Implemented a DenseStringsElements attr for handling arrays / tensors of strings. This includes the necessary logic for parsing and printing the attribute from MLIR's text format. To store the attribute we perform a single allocation that includes all wrapped string data tightly packed. This means no padding characters and no null terminators (as they could be present in the string). This buffer includes a first chunk of data that represents an array of StringRefs, that contain address pointers into the string data, with the length of each string wrapped. At this point there is no Sparse representation however strings are not typically represented sparsely. Differential Revision: https://reviews.llvm.org/D78600
Loading
Please register or sign in to comment