Avoid listing all modified Enter/RefEnter nodes on INFO, use VLOG(1) instead.
Leave a single, simple, message on INFO. PiperOrigin-RevId: 173121726
This commit is contained in:
parent
434695921d
commit
2845bfcd64
@ -221,21 +221,26 @@ Status DebugNodeInserter::InsertNodes(
|
|||||||
}
|
}
|
||||||
|
|
||||||
void DebugNodeInserter::DeparallelizeWhileLoops(Graph* graph, Device* device) {
|
void DebugNodeInserter::DeparallelizeWhileLoops(Graph* graph, Device* device) {
|
||||||
|
bool deparallelized_a_loop = false;
|
||||||
for (Node* node : graph->nodes()) {
|
for (Node* node : graph->nodes()) {
|
||||||
if (node->IsEnter()) {
|
if (node->IsEnter()) {
|
||||||
const AttrValue* parallel_iterations =
|
const AttrValue* parallel_iterations =
|
||||||
node->attrs().Find("parallel_iterations");
|
node->attrs().Find("parallel_iterations");
|
||||||
if (parallel_iterations && parallel_iterations->i() > 1) {
|
if (parallel_iterations && parallel_iterations->i() > 1) {
|
||||||
LOG(INFO) << "For debugging, tfdbg is changing the "
|
deparallelized_a_loop = true;
|
||||||
<< "parallel_iterations attribute of the Enter/RefEnter "
|
VLOG(1) << "Changing the parallel_iterations attribute of the "
|
||||||
<< "node \"" << node->name() << "\" on device \""
|
<< "Enter/RefEnter node \"" << node->name() << "\" on device \""
|
||||||
<< device->name() << "\" from " << parallel_iterations->i()
|
<< device->name() << "\" from " << parallel_iterations->i()
|
||||||
<< " to 1. (This does not affect subsequent non-debug "
|
<< " to 1.";
|
||||||
<< "runs.)";
|
|
||||||
node->AddAttr<int64>("parallel_iterations", 1);
|
node->AddAttr<int64>("parallel_iterations", 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (deparallelized_a_loop) {
|
||||||
|
LOG(INFO) << "For debugging, tfdbg has set the parallel_iterations "
|
||||||
|
<< "attribute of all scheduled Enter/RefEnter nodes to 1. (This "
|
||||||
|
<< "does not affect subsequent non-debug runs.)";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
|
Loading…
Reference in New Issue
Block a user