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

Function main

tensorflow/compiler/xla/tools/interactive_graphviz.cc:715–740  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

713} // namespace xla
714
715int main(int argc, char** argv) {
716 xla::tools::Options opts;
717 opts.browser = "/usr/bin/sensible-browser";
718 bool need_help = false;
719 const std::vector<tensorflow::Flag> flag_list = {
720 tensorflow::Flag("hlo_snapshot", &opts.hlo_snapshot,
721 "HloSnapshot proto to interactively dump to graphviz"),
722 tensorflow::Flag("hlo_proto", &opts.hlo_proto,
723 "XLA hlo proto to interactively dump to graphviz"),
724 tensorflow::Flag("hlo_text", &opts.hlo_text,
725 "XLA hlo proto to interactively dump to graphviz"),
726 tensorflow::Flag("platform", &opts.platform,
727 "Platform to compile for: CPU, CUDA, etc"),
728 tensorflow::Flag("browser", &opts.browser,
729 "Path to web browser used to display produced graphs."),
730 tensorflow::Flag("help", &need_help, "Prints this help message"),
731 };
732 xla::string usage = tensorflow::Flags::Usage(argv[0], flag_list);
733 bool parse_ok = tensorflow::Flags::Parse(&argc, argv, flag_list);
734 tensorflow::port::InitMain(argv[0], &argc, &argv);
735 if (argc != 1 || !parse_ok || need_help) {
736 LOG(QFATAL) << usage;
737 }
738 xla::tools::RealMain(opts);
739 return 0;
740}

Callers

nothing calls this directly

Calls 5

UsageFunction · 0.85
ParseFunction · 0.85
RealMainFunction · 0.70
FlagClass · 0.50
InitMainFunction · 0.50

Tested by

no test coverage detected