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

Method SetNumOutputs

tensorflow/core/graph/costmodel.cc:153–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151}
152
153void CostModel::SetNumOutputs(const Node* node, int num_outputs) {
154 const int id = Id(node);
155 if (id < 0) return;
156 // Do not resize the number of slots before checking its existing number of
157 // slots.
158 Ensure(id, 0);
159 auto perslot = &slot_bytes_[id];
160 if (!perslot->empty()) {
161 CHECK_EQ(num_outputs, perslot->size())
162 << "Cannot resize slot_bytes, node=" << node->name();
163 }
164 Ensure(id, num_outputs);
165}
166
167void CostModel::RecordCount(const Node* node, int count) {
168 const int id = Id(node);

Callers 1

AddNodesToCostModelFunction · 0.80

Calls 3

nameMethod · 0.65
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected