[PATCH] D74922: [mlir][Parser] Update DenseElementsAttr to print in hex when the number of elements is over a certain threshold.

River Riddle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 20 11:52:05 PST 2020


rriddle created this revision.
rriddle added reviewers: mehdi_amini, jpienaar.
Herald added subscribers: llvm-commits, Joonsoo, liufengdb, aartbik, lucyrfox, mgester, arpith-jacob, nicolasvasilache, antiagainst, shauheen, burmako.
Herald added a project: LLVM.

DenseElementsAttr is used to store tensor data, which in some cases can become extremely large(100s of mb). In these cases it is much more efficient to format the data as a string of hex values instead.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D74922

Files:
  mlir/include/mlir/IR/Attributes.h
  mlir/lib/IR/AsmPrinter.cpp
  mlir/lib/IR/Attributes.cpp
  mlir/lib/Parser/Parser.cpp
  mlir/test/IR/dense-elements-hex.mlir
  mlir/test/IR/invalid.mlir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74922.245707.patch
Type: text/x-patch
Size: 16316 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200220/238f16be/attachment.bin>


More information about the llvm-commits mailing list