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

Function SubgraphName

tensorflow/compiler/mlir/lite/flatbuffer_import.cc:955–963  ·  view source on GitHub ↗

TFLite subgraphs do not necessarily have names, though MLIR functions must have them, so we generate a name for subgraphs that are missing one here. Note: in TFLite, the first subgraph is the entry point, and in MLIR that represents TFLite, this entry point must be called "main" TODO(b/131175224,b/132239787) Support multiple entry points

Source from the content-addressed store, hash-verified

953// represents TFLite, this entry point must be called "main"
954// TODO(b/131175224,b/132239787) Support multiple entry points
955std::string SubgraphName(unsigned index, const tflite::SubGraphT& subgraph) {
956 if (index == 0) {
957 return "main";
958 }
959 if (subgraph.name.empty()) {
960 return llvm::formatv("fn_{0}", index).str();
961 }
962 return subgraph.name;
963}
964} // namespace
965
966OwningModuleRef tflite::FlatBufferToMlir(

Callers 1

FlatBufferToMlirMethod · 0.85

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected