diff options
author | 2017-11-09 19:27:20 -0800 | |
---|---|---|
committer | 2017-11-10 16:14:41 -0800 | |
commit | 685f604f63a30a8162d8762e9d8d22f171dca85e (patch) | |
tree | 5f72e657ec4feff679894cb5662d6c830596879e | |
parent | 8392a4b8e9d6d7ccbfde15dcdda0477c2791b6dc (diff) |
[XLA] Don't deemphasize nodes inside of subcomputations in dumped XLA graphs.
Nodes inside of subcomputations (e.g. fusion computations) are always
printed by the HLO graph dumper. Before this change, the dumper was not
fully aware of this fact, leading it to mark as "deemphasized" (i.e.
draw as gray with a dashed outline) nodes that had no business of being
deemphasized.
PiperOrigin-RevId: 175247474
-rw-r--r-- | tensorflow/compiler/xla/service/hlo_graph_dumper.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tensorflow/compiler/xla/service/hlo_graph_dumper.cc b/tensorflow/compiler/xla/service/hlo_graph_dumper.cc index 67e0238c4a..04b3059fb1 100644 --- a/tensorflow/compiler/xla/service/hlo_graph_dumper.cc +++ b/tensorflow/compiler/xla/service/hlo_graph_dumper.cc @@ -1303,7 +1303,9 @@ NodeFilter MakeNodeFilter(const HloInstruction* root, int64 radius) { auto is_displayed = [&](const HloInstruction* instr) { // Constants are displayed inline with their users; they're never omitted. - return nodes.count(instr) > 0 || instr->opcode() == HloOpcode::kConstant; + // Nodes in subcomputations are always shown. + return nodes.count(instr) > 0 || instr->opcode() == HloOpcode::kConstant || + instr->parent() != root->parent(); }; // Make a second pass over 'nodes' to fix up the NodeFilterResults now that we |