MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / BuildLoweredIfOutput

Method BuildLoweredIfOutput

tensorflow/core/common_runtime/lower_if_op.cc:253–267  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

251}
252
253Status CondBuilder::BuildLoweredIfOutput() {
254 // If outputs are empty, it means that we might have only output control
255 // edges (already connected to the `branch_executed_node`). Furthermore it's
256 // illegal to have an IdentityN with empty inputs.
257 //
258 // We still must keep lowered If node as a valid source of control edges,
259 // because it might be a part of function control output set.
260 NodeBuilder builder = keep_node_fetchable_ && !outputs_.empty()
261 ? NodeBuilder(name_, "IdentityN").Input(outputs_)
262 : NodeBuilder(name_, "NoOp");
263
264 return builder.Device(if_op_->requested_device())
265 .ControlInput(branch_executed_node_)
266 .Finalize(graph_, &lowered_if_output_);
267}
268
269} // namespace
270

Callers

nothing calls this directly

Calls 5

NodeBuilderClass · 0.50
emptyMethod · 0.45
InputMethod · 0.45
FinalizeMethod · 0.45
DeviceMethod · 0.45

Tested by

no test coverage detected