| 48 | } // namespace |
| 49 | |
| 50 | extern "C" int main(int argc, char** argv) { |
| 51 | // TODO: For testing |
| 52 | // Please download saved_model.pbtxt from oss. |
| 53 | // then copy the saved_model.pbtxt to /tmp/saved_model.pbtxt |
| 54 | // at last, compile and run it! |
| 55 | std::string saved_model_dir( |
| 56 | "/tmp/saved_model.pbtxt"); |
| 57 | SavedModel saved_model; |
| 58 | if (!tensorflow::protobuf::TextFormat::ParseFromString(ReadFileIntoString(saved_model_dir), &saved_model)) { |
| 59 | LOG(FATAL) << "Can not parse saved model from text."; |
| 60 | } |
| 61 | std::string tag("serve"); |
| 62 | ClusteredGraphInfo cgi = ClusteringGraphDef(tag, saved_model); |
| 63 | |
| 64 | //LOG(INFO) << cgi.tf_saved_model.DebugString() << "\n"; |
| 65 | //LOG(INFO) << cgi.iree_saved_model.DebugString() << "\n"; |
| 66 | |
| 67 | return 0; |
| 68 | } |
| 69 | |
| 70 | |
| 71 | } // namespace processor |
nothing calls this directly
no test coverage detected