[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
This commit is contained in:
Justin Lebar 2017-11-09 19:27:20 -08:00 committed by Andrew Selle
parent 8392a4b8e9
commit 685f604f63

View File

@ -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