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

Function AddNodesToCostModel

tensorflow/core/graph/costmodel.cc:413–422  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

411namespace {
412
413static void AddNodesToCostModel(const Graph& g, CostModel* cost_model) {
414 for (Node* n : g.nodes()) {
415 const int num_outputs = n->num_outputs();
416 cost_model->SetNumOutputs(n, num_outputs);
417 for (int output = 0; output < num_outputs; output++) {
418 // Set up an initial bogus estimate for the node's outputs
419 cost_model->RecordSize(n, output, Bytes(1));
420 }
421 }
422}
423
424static void AssignSizes(const Graph& g, CostModel* cost_model) {
425 for (const Edge* e : g.edges()) {

Callers 1

InitFromGraphMethod · 0.85

Calls 4

SetNumOutputsMethod · 0.80
RecordSizeMethod · 0.80
nodesMethod · 0.45
num_outputsMethod · 0.45

Tested by

no test coverage detected