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

Function IsDstInputOnHost

tensorflow/core/graph/graph_partition.cc:136–146  ·  view source on GitHub ↗

Return true iff (dst, dst_input) is specified on host memory.

Source from the content-addressed store, hash-verified

134
135// Return true iff (dst, dst_input) is specified on host memory.
136bool IsDstInputOnHost(const Edge* edge, const GraphInfo& info) {
137 const Node* dst = edge->dst();
138 int dst_port = edge->dst_input();
139 if (info.device_types[dst->id()] != DEVICE_CPU) {
140 if (edge->IsControlEdge()) return false;
141 auto dst_it = info.input_types.find({dst->id(), dst_port});
142 DCHECK(dst_it != info.input_types.end());
143 return dst_it->second == HOST_MEMORY;
144 }
145 return true;
146}
147
148void SetInput(NodeDef* dst, int dst_slot,
149 StringPiece src_name, int src_slot) {

Callers 3

DoFuseRecvFunction · 0.85
PartitionFunction · 0.85
PartitionWithTensorFuseFunction · 0.85

Calls 6

dstMethod · 0.45
dst_inputMethod · 0.45
idMethod · 0.45
IsControlEdgeMethod · 0.45
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected