projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
062dd40
)
Also elide large array attribute in OpGraph Dump
author
Jing Pu
<jingpu@google.com>
Mon, 18 Nov 2019 19:27:08 +0000
(11:27 -0800)
committer
A. Unique TensorFlower
<gardener@tensorflow.org>
Mon, 18 Nov 2019 19:27:43 +0000
(11:27 -0800)
PiperOrigin-RevId:
281114034
mlir/lib/Transforms/ViewOpGraph.cpp
patch
|
blob
|
history
diff --git
a/mlir/lib/Transforms/ViewOpGraph.cpp
b/mlir/lib/Transforms/ViewOpGraph.cpp
index
f080ccd
..
503a82b
100644
(file)
--- a/
mlir/lib/Transforms/ViewOpGraph.cpp
+++ b/
mlir/lib/Transforms/ViewOpGraph.cpp
@@
-96,6
+96,12
@@
std::string DOTGraphTraits<mlir::Block *>::getNodeLabel(mlir::Operation *op,
continue;
}
+ auto array = attr.second.dyn_cast<mlir::ArrayAttr>();
+ if (array && static_cast<int64_t>(array.size()) > elideIfLarger) {
+ os << "[...]";
+ continue;
+ }
+
// Print all other attributes.
attr.second.print(os);
}