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

Method CreateCondFuncCallNode

tensorflow/core/common_runtime/lower_while_op.cc:254–270  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

252}
253
254Status LowerWhileHelper::CreateCondFuncCallNode() {
255 for (Node* merge_node : merge_nodes_) {
256 cond_call_builder_.Input(NodeOut(merge_node, 0));
257 }
258 cond_call_builder_.Device(while_op_->requested_device());
259 TF_RETURN_IF_ERROR(cond_call_builder_.Finalize(graph_, &cond_call_node_));
260 // Add a control edge to make sure the Const nodes in the cond function
261 // are in the same frame as the rest of the function, otherwise
262 // `BuildControlFlowInfo` throws an error.
263 graph_->AddControlEdge(merge_nodes_[0], cond_call_node_);
264 TF_RETURN_IF_ERROR(NodeBuilder(NewName("LoopCond"), "LoopCond",
265 graph_->op_registry(), &debug_info_)
266 .Input(NodeOut(cond_call_node_, 0))
267 .Device(while_op_->requested_device())
268 .Finalize(graph_, &loop_cond_node_));
269 return Status::OK();
270}
271
272Status LowerWhileHelper::CreateSwitchNodes() {
273 for (int i = 0; i < num_loop_inputs_; i++) {

Callers

nothing calls this directly

Calls 8

NewNameFunction · 0.85
NodeOutClass · 0.50
NodeBuilderClass · 0.50
InputMethod · 0.45
DeviceMethod · 0.45
FinalizeMethod · 0.45
AddControlEdgeMethod · 0.45
op_registryMethod · 0.45

Tested by

no test coverage detected