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

Function GetLog2BufferSize

tensorflow/lite/toco/dump_graphviz.cc:501–511  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

499}
500
501float GetLog2BufferSize(const Model& model, const string& array_id) {
502 auto& array = model.GetArray(array_id);
503 if (array.has_shape()) {
504 int buffer_size = 0;
505 if (IsNonEmpty(array.shape())) {
506 buffer_size = RequiredBufferSizeForShape(array.shape());
507 return std::log2(static_cast<float>(buffer_size));
508 }
509 }
510 return 0.0f;
511}
512
513string GetOpId(int op_index) { return StringF("op%05d", op_index); }
514

Callers 1

DumpOperatorEdgesFunction · 0.85

Calls 4

IsNonEmptyFunction · 0.85
has_shapeMethod · 0.80
shapeMethod · 0.45

Tested by

no test coverage detected