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

Method RecordSize

tensorflow/core/graph/costmodel.cc:180–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

178}
179
180void CostModel::RecordSize(const Node* node, int slot, Bytes bytes) {
181 const int id = Id(node);
182 if (id < 0) return;
183 CHECK_LT(id, slot_bytes_.size());
184 auto perslot = &slot_bytes_[id];
185 CHECK_LT(slot, perslot->size());
186 auto v = &(*perslot)[slot];
187 if (*v >= 0) {
188 *v += bytes;
189 } else {
190 *v = bytes;
191 }
192}
193
194Bytes CostModel::TotalBytes(const Node* node, int slot) const {
195 const int id = Id(node);

Callers 2

AddNodesToCostModelFunction · 0.80
AssignSizesFunction · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected