Add a flag to the AsmPrinter for eliding large ElementsAttrs.
authorRiver Riddle <riverriddle@google.com>
Tue, 8 Oct 2019 00:18:54 +0000 (17:18 -0700)
committerA. Unique TensorFlower <gardener@tensorflow.org>
Tue, 8 Oct 2019 00:19:20 +0000 (17:19 -0700)
commita8a73f0640b483ff47140b642ef8ce3d9735a174
tree2fae9b7f75ba826cb368fb77d2a467ffc66b0bd7
parent17606a108b9464da4f960e11b132c9e968f31adb
Add a flag to the AsmPrinter for eliding large ElementsAttrs.

Some modules may have extremely large ElementsAttrs, which makes debugging involving IR dumping extremely slow and painful. This change adds a flag that will elide ElementsAttrs with a "large"(as defined by the user) number of elements by printing "..." instead of the element data.

PiperOrigin-RevId: 273413100
mlir/include/mlir/IR/OperationSupport.h
mlir/lib/IR/AsmPrinter.cpp
mlir/test/IR/pretty-attributes.mlir [new file with mode: 0644]