aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/profiler/profiler.cc
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/core/profiler/profiler.cc')
-rw-r--r--tensorflow/core/profiler/profiler.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/tensorflow/core/profiler/profiler.cc b/tensorflow/core/profiler/profiler.cc
index 2cc212d589..808e3c853b 100644
--- a/tensorflow/core/profiler/profiler.cc
+++ b/tensorflow/core/profiler/profiler.cc
@@ -206,8 +206,12 @@ int Run(int argc, char** argv) {
"graph_path,op_log_path,run_meta_path\n");
std::unique_ptr<GraphDef> graph(new GraphDef());
if (!FLAGS_graph_path.empty()) {
- TF_CHECK_OK(
- ReadProtoFile(Env::Default(), FLAGS_graph_path, graph.get(), false));
+ s = ReadProtoFile(Env::Default(), FLAGS_graph_path, graph.get(), false);
+ if (!s.ok()) {
+ fprintf(stderr, "Failed to read graph_path: %s\n",
+ s.ToString().c_str());
+ return 1;
+ }
}
std::unique_ptr<OpLogProto> op_log(new OpLogProto());