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

Function AssignSizes

tensorflow/core/graph/costmodel.cc:424–436  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

422}
423
424static void AssignSizes(const Graph& g, CostModel* cost_model) {
425 for (const Edge* e : g.edges()) {
426 // Skip if it is a control edge.
427 if (e->IsControlEdge()) {
428 continue;
429 }
430 const Node* src = e->src();
431
432 // TODO(josh11b): Get an estimate from the Op
433 Bytes size(1);
434 cost_model->RecordSize(src, e->src_output(), size);
435 }
436}
437
438// This generates an extremely simple initial guess for the
439// computation cost of each node. For ordinary Ops, its value should quickly

Callers 1

InitFromGraphMethod · 0.85

Calls 5

edgesMethod · 0.80
RecordSizeMethod · 0.80
IsControlEdgeMethod · 0.45
srcMethod · 0.45
src_outputMethod · 0.45

Tested by

no test coverage detected