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

Function AddControlFlowInfo

tensorflow/core/graph/graph_partition.cc:689–700  ·  view source on GitHub ↗

Add the control flow info of a new node added during partitioning. The new node has the same control flow info as src.

Source from the content-addressed store, hash-verified

687// Add the control flow info of a new node added during partitioning.
688// The new node has the same control flow info as src.
689void AddControlFlowInfo(const Node* node, const Node* src,
690 std::vector<ControlFlowInfo>* cf_info) {
691 int id = node->id();
692 if (static_cast<size_t>(id) >= cf_info->size()) {
693 cf_info->resize(id + 1);
694 }
695 const ControlFlowInfo& src_info = (*cf_info)[src->id()];
696 ControlFlowInfo* info = &(*cf_info)[id];
697 info->frame = src_info.frame;
698 info->parent_frame = src_info.parent_frame;
699 info->frame_name = src_info.frame_name;
700}
701
702// Constructs a control loop. Returns a struct containing the newly created
703// enter, merge, and switch nodes. The enter and merge nodes are used in the

Callers 2

AddControlLoopFunction · 0.85
AddControlFlowFunction · 0.85

Calls 3

idMethod · 0.45
sizeMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected