aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/profiler
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2018-01-09 17:05:15 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-01-09 17:13:03 -0800
commit118495de6165237a7027f5d8b77db833ac7210f2 (patch)
tree187b32bd553da19278096af2f210741d621a1b84 /tensorflow/core/profiler
parentcf3fb6bc1dfe5862bf03af2a38d0a52463edd77a (diff)
profiler C++ API.
PiperOrigin-RevId: 181397308
Diffstat (limited to 'tensorflow/core/profiler')
-rw-r--r--tensorflow/core/profiler/BUILD13
-rw-r--r--tensorflow/core/profiler/internal/BUILD41
-rw-r--r--tensorflow/core/profiler/internal/print_model_analysis.cc4
-rw-r--r--tensorflow/core/profiler/internal/tfprof_code.h2
-rw-r--r--tensorflow/core/profiler/internal/tfprof_graph.h2
-rw-r--r--tensorflow/core/profiler/internal/tfprof_node.h2
-rw-r--r--tensorflow/core/profiler/internal/tfprof_node_show.h2
-rw-r--r--tensorflow/core/profiler/internal/tfprof_op.h2
-rw-r--r--tensorflow/core/profiler/internal/tfprof_scope.h2
-rw-r--r--tensorflow/core/profiler/internal/tfprof_show.h2
-rw-r--r--tensorflow/core/profiler/internal/tfprof_show_multi.h2
-rw-r--r--tensorflow/core/profiler/internal/tfprof_show_test.cc2
-rw-r--r--tensorflow/core/profiler/internal/tfprof_stats.cc11
-rw-r--r--tensorflow/core/profiler/internal/tfprof_stats.h5
-rw-r--r--tensorflow/core/profiler/internal/tfprof_stats_test.cc2
-rw-r--r--tensorflow/core/profiler/internal/tfprof_tensor_test.cc2
-rw-r--r--tensorflow/core/profiler/internal/tfprof_timeline_test.cc4
-rw-r--r--tensorflow/core/profiler/internal/tfprof_utils.h2
-rw-r--r--tensorflow/core/profiler/profiler.cc6
-rw-r--r--tensorflow/core/profiler/tfprof_options.cc (renamed from tensorflow/core/profiler/internal/tfprof_options.cc)2
-rw-r--r--tensorflow/core/profiler/tfprof_options.h (renamed from tensorflow/core/profiler/internal/tfprof_options.h)0
21 files changed, 58 insertions, 52 deletions
diff --git a/tensorflow/core/profiler/BUILD b/tensorflow/core/profiler/BUILD
index 9c2e7a61de..5fbfc62e74 100644
--- a/tensorflow/core/profiler/BUILD
+++ b/tensorflow/core/profiler/BUILD
@@ -34,7 +34,7 @@ tf_cc_binary(
"//tensorflow/core:framework_internal",
"//tensorflow/core:lib",
"//tensorflow/core:protos_all_cc",
- "//tensorflow/core/profiler/internal:tfprof_options",
+ "//tensorflow/core/profiler:tfprof_options",
"//tensorflow/core/profiler/internal:tfprof_stats",
"//tensorflow/core/profiler/internal:tfprof_utils",
"//tensorflow/core/profiler/internal/advisor:tfprof_advisor",
@@ -42,6 +42,17 @@ tf_cc_binary(
],
)
+cc_library(
+ name = "tfprof_options",
+ srcs = ["tfprof_options.cc"],
+ hdrs = ["tfprof_options.h"],
+ deps = [
+ "//tensorflow/core:framework_headers_lib",
+ "//tensorflow/core:lib",
+ "//tensorflow/core/profiler:protos_all_cc",
+ ],
+)
+
tf_proto_library(
name = "protos_all",
srcs = glob(["**/*.proto"]),
diff --git a/tensorflow/core/profiler/internal/BUILD b/tensorflow/core/profiler/internal/BUILD
index edf6b32cfa..05a798bff8 100644
--- a/tensorflow/core/profiler/internal/BUILD
+++ b/tensorflow/core/profiler/internal/BUILD
@@ -16,7 +16,6 @@ cc_library(
":tfprof_graph",
":tfprof_node",
":tfprof_op",
- ":tfprof_options",
":tfprof_scope",
":tfprof_show",
":tfprof_timeline",
@@ -26,6 +25,7 @@ cc_library(
"//tensorflow/core:protos_all_cc",
"//tensorflow/core:regexp_internal",
"//tensorflow/core/profiler:protos_all_cc",
+ "//tensorflow/core/profiler:tfprof_options",
],
)
@@ -47,12 +47,12 @@ cc_library(
srcs = ["tfprof_node.cc"],
hdrs = ["tfprof_node.h"],
deps = [
- ":tfprof_options",
":tfprof_utils",
"//tensorflow/core:lib",
"//tensorflow/core:protos_all_cc",
"//tensorflow/core:regexp_internal",
"//tensorflow/core/profiler:protos_all_cc",
+ "//tensorflow/core/profiler:tfprof_options",
],
)
@@ -63,7 +63,6 @@ cc_library(
deps = [
":tfprof_constants",
":tfprof_node",
- ":tfprof_options",
":tfprof_show",
":tfprof_tensor",
":tfprof_utils",
@@ -74,6 +73,7 @@ cc_library(
"//tensorflow/core:protos_all_cc",
"//tensorflow/core:regexp_internal",
"//tensorflow/core/profiler:protos_all_cc",
+ "//tensorflow/core/profiler:tfprof_options",
],
)
@@ -84,7 +84,6 @@ cc_library(
deps = [
":tfprof_constants",
":tfprof_node",
- ":tfprof_options",
":tfprof_show_multi",
":tfprof_tensor",
":tfprof_utils",
@@ -94,6 +93,7 @@ cc_library(
"//tensorflow/core:protos_all_cc",
"//tensorflow/core:regexp_internal",
"//tensorflow/core/profiler:protos_all_cc",
+ "//tensorflow/core/profiler:tfprof_options",
],
)
@@ -104,7 +104,6 @@ cc_library(
deps = [
":tfprof_constants",
":tfprof_node",
- ":tfprof_options",
":tfprof_show_multi",
":tfprof_timeline",
":tfprof_utils",
@@ -116,6 +115,7 @@ cc_library(
"//tensorflow/core:protos_all_cc",
"//tensorflow/core:regexp_internal",
"//tensorflow/core/profiler:protos_all_cc",
+ "//tensorflow/core/profiler:tfprof_options",
],
)
@@ -126,7 +126,6 @@ cc_library(
deps = [
":tfprof_constants",
":tfprof_node",
- ":tfprof_options",
":tfprof_show",
":tfprof_tensor",
":tfprof_utils",
@@ -135,6 +134,7 @@ cc_library(
"//tensorflow/core:protos_all_cc",
"//tensorflow/core:regexp_internal",
"//tensorflow/core/profiler:protos_all_cc",
+ "//tensorflow/core/profiler:tfprof_options",
],
)
@@ -145,11 +145,11 @@ cc_library(
deps = [
":tfprof_constants",
":tfprof_node",
- ":tfprof_options",
":tfprof_utils",
"//tensorflow/core:lib",
"//tensorflow/core:protos_all_cc",
"//tensorflow/core/profiler:protos_all_cc",
+ "//tensorflow/core/profiler:tfprof_options",
],
)
@@ -161,7 +161,6 @@ cc_library(
":tfprof_constants",
":tfprof_node",
":tfprof_node_show",
- ":tfprof_options",
":tfprof_tensor",
":tfprof_timeline",
":tfprof_utils",
@@ -170,6 +169,7 @@ cc_library(
"//tensorflow/core:protos_all_cc",
"//tensorflow/core:regexp_internal",
"//tensorflow/core/profiler:protos_all_cc",
+ "//tensorflow/core/profiler:tfprof_options",
],
)
@@ -181,7 +181,6 @@ cc_library(
":tfprof_constants",
":tfprof_node",
":tfprof_node_show",
- ":tfprof_options",
":tfprof_scope",
":tfprof_show",
":tfprof_tensor",
@@ -192,6 +191,7 @@ cc_library(
"//tensorflow/core:protos_all_cc",
"//tensorflow/core:regexp_internal",
"//tensorflow/core/profiler:protos_all_cc",
+ "//tensorflow/core/profiler:tfprof_options",
],
)
@@ -209,7 +209,6 @@ tf_cc_test(
],
deps = [
":tfprof_constants",
- ":tfprof_options",
":tfprof_stats",
":tfprof_tf_testlib",
":tfprof_utils",
@@ -218,6 +217,7 @@ tf_cc_test(
"//tensorflow/core:protos_all_cc",
"//tensorflow/core:test",
"//tensorflow/core/profiler:protos_all_cc",
+ "//tensorflow/core/profiler:tfprof_options",
],
)
@@ -231,7 +231,6 @@ tf_cc_test(
],
deps = [
":tfprof_constants",
- ":tfprof_options",
":tfprof_stats",
":tfprof_tf_testlib",
":tfprof_utils",
@@ -241,6 +240,7 @@ tf_cc_test(
"//tensorflow/core:protos_all_cc",
"//tensorflow/core:test",
"//tensorflow/core/profiler:protos_all_cc",
+ "//tensorflow/core/profiler:tfprof_options",
],
)
@@ -250,21 +250,10 @@ cc_library(
hdrs = ["tfprof_utils.h"],
copts = if_not_windows(["-Wno-sign-compare"]),
deps = [
- ":tfprof_options",
"//tensorflow/core:lib",
"//tensorflow/core:protos_all_cc",
"//tensorflow/core:regexp_internal",
- ],
-)
-
-cc_library(
- name = "tfprof_options",
- srcs = ["tfprof_options.cc"],
- hdrs = ["tfprof_options.h"],
- deps = [
- "//tensorflow/core:framework_headers_lib",
- "//tensorflow/core:lib",
- "//tensorflow/core/profiler:protos_all_cc",
+ "//tensorflow/core/profiler:tfprof_options",
],
)
@@ -279,13 +268,13 @@ cc_library(
srcs = ["print_model_analysis.cc"],
hdrs = ["print_model_analysis.h"],
deps = [
- ":tfprof_options",
":tfprof_stats",
"//tensorflow/c:checkpoint_reader",
"//tensorflow/core:framework",
"//tensorflow/core:lib",
"//tensorflow/core:protos_all_cc",
"//tensorflow/core/profiler:protos_all_cc",
+ "//tensorflow/core/profiler:tfprof_options",
"//tensorflow/core/profiler/internal/advisor:tfprof_advisor",
],
alwayslink = 1,
@@ -305,7 +294,6 @@ tf_cc_test(
],
deps = [
":tfprof_constants",
- ":tfprof_options",
":tfprof_stats",
":tfprof_tf_testlib",
":tfprof_utils",
@@ -314,6 +302,7 @@ tf_cc_test(
"//tensorflow/core:protos_all_cc",
"//tensorflow/core:test",
"//tensorflow/core/profiler:protos_all_cc",
+ "//tensorflow/core/profiler:tfprof_options",
],
)
@@ -340,7 +329,6 @@ tf_cc_test(
"testdata/graph.pbtxt",
],
deps = [
- ":tfprof_options",
":tfprof_stats",
":tfprof_tf_testlib",
":tfprof_utils",
@@ -349,6 +337,7 @@ tf_cc_test(
"//tensorflow/core:protos_all_cc",
"//tensorflow/core:test",
"//tensorflow/core/profiler:protos_all_cc",
+ "//tensorflow/core/profiler:tfprof_options",
],
)
diff --git a/tensorflow/core/profiler/internal/print_model_analysis.cc b/tensorflow/core/profiler/internal/print_model_analysis.cc
index 7a0d590262..4971471604 100644
--- a/tensorflow/core/profiler/internal/print_model_analysis.cc
+++ b/tensorflow/core/profiler/internal/print_model_analysis.cc
@@ -22,13 +22,13 @@ limitations under the License.
#include "tensorflow/c/checkpoint_reader.h"
#include "tensorflow/core/framework/graph.pb.h"
#include "tensorflow/core/lib/core/errors.h"
-#include "tensorflow/core/protobuf/config.pb.h"
#include "tensorflow/core/profiler/internal/advisor/tfprof_advisor.h"
-#include "tensorflow/core/profiler/internal/tfprof_options.h"
#include "tensorflow/core/profiler/internal/tfprof_stats.h"
#include "tensorflow/core/profiler/tfprof_log.pb.h"
+#include "tensorflow/core/profiler/tfprof_options.h"
#include "tensorflow/core/profiler/tfprof_options.pb.h"
#include "tensorflow/core/profiler/tfprof_output.pb.h"
+#include "tensorflow/core/protobuf/config.pb.h"
namespace tensorflow {
namespace tfprof {
diff --git a/tensorflow/core/profiler/internal/tfprof_code.h b/tensorflow/core/profiler/internal/tfprof_code.h
index a118752fce..bcbdc1b48c 100644
--- a/tensorflow/core/profiler/internal/tfprof_code.h
+++ b/tensorflow/core/profiler/internal/tfprof_code.h
@@ -28,12 +28,12 @@ limitations under the License.
#include "tensorflow/core/framework/graph.pb.h"
#include "tensorflow/core/lib/core/errors.h"
#include "tensorflow/core/profiler/internal/tfprof_node.h"
-#include "tensorflow/core/profiler/internal/tfprof_options.h"
#include "tensorflow/core/profiler/internal/tfprof_show_multi.h"
#include "tensorflow/core/profiler/internal/tfprof_timeline.h"
#include "tensorflow/core/profiler/internal/tfprof_utils.h"
#include "tensorflow/core/profiler/profile.pb.h"
#include "tensorflow/core/profiler/tfprof_log.pb.h"
+#include "tensorflow/core/profiler/tfprof_options.h"
#include "tensorflow/core/profiler/tfprof_output.pb.h"
namespace tensorflow {
diff --git a/tensorflow/core/profiler/internal/tfprof_graph.h b/tensorflow/core/profiler/internal/tfprof_graph.h
index 8dac4aee77..f7eef9c835 100644
--- a/tensorflow/core/profiler/internal/tfprof_graph.h
+++ b/tensorflow/core/profiler/internal/tfprof_graph.h
@@ -30,9 +30,9 @@ limitations under the License.
#include "tensorflow/core/framework/graph.pb.h"
#include "tensorflow/core/lib/core/errors.h"
#include "tensorflow/core/profiler/internal/tfprof_node.h"
-#include "tensorflow/core/profiler/internal/tfprof_options.h"
#include "tensorflow/core/profiler/internal/tfprof_show.h"
#include "tensorflow/core/profiler/internal/tfprof_utils.h"
+#include "tensorflow/core/profiler/tfprof_options.h"
#include "tensorflow/core/profiler/tfprof_output.pb.h"
namespace tensorflow {
diff --git a/tensorflow/core/profiler/internal/tfprof_node.h b/tensorflow/core/profiler/internal/tfprof_node.h
index 5bc2ea3c42..255a0987e6 100644
--- a/tensorflow/core/profiler/internal/tfprof_node.h
+++ b/tensorflow/core/profiler/internal/tfprof_node.h
@@ -31,8 +31,8 @@ limitations under the License.
#include "tensorflow/core/lib/strings/str_util.h"
#include "tensorflow/core/lib/strings/strcat.h"
#include "tensorflow/core/platform/regexp.h"
-#include "tensorflow/core/profiler/internal/tfprof_options.h"
#include "tensorflow/core/profiler/tfprof_log.pb.h"
+#include "tensorflow/core/profiler/tfprof_options.h"
namespace tensorflow {
namespace tfprof {
diff --git a/tensorflow/core/profiler/internal/tfprof_node_show.h b/tensorflow/core/profiler/internal/tfprof_node_show.h
index 3788bf3e80..ca6f9bca5e 100644
--- a/tensorflow/core/profiler/internal/tfprof_node_show.h
+++ b/tensorflow/core/profiler/internal/tfprof_node_show.h
@@ -32,8 +32,8 @@ limitations under the License.
#include "tensorflow/core/lib/core/errors.h"
#include "tensorflow/core/profiler/internal/tfprof_constants.h"
#include "tensorflow/core/profiler/internal/tfprof_node.h"
-#include "tensorflow/core/profiler/internal/tfprof_options.h"
#include "tensorflow/core/profiler/internal/tfprof_utils.h"
+#include "tensorflow/core/profiler/tfprof_options.h"
#include "tensorflow/core/profiler/tfprof_output.pb.h"
namespace tensorflow {
diff --git a/tensorflow/core/profiler/internal/tfprof_op.h b/tensorflow/core/profiler/internal/tfprof_op.h
index 55a346c7e8..fcc5e68f47 100644
--- a/tensorflow/core/profiler/internal/tfprof_op.h
+++ b/tensorflow/core/profiler/internal/tfprof_op.h
@@ -29,9 +29,9 @@ limitations under the License.
#include "tensorflow/core/framework/graph.pb.h"
#include "tensorflow/core/lib/core/errors.h"
#include "tensorflow/core/profiler/internal/tfprof_node.h"
-#include "tensorflow/core/profiler/internal/tfprof_options.h"
#include "tensorflow/core/profiler/internal/tfprof_show_multi.h"
#include "tensorflow/core/profiler/internal/tfprof_utils.h"
+#include "tensorflow/core/profiler/tfprof_options.h"
#include "tensorflow/core/profiler/tfprof_output.pb.h"
namespace tensorflow {
diff --git a/tensorflow/core/profiler/internal/tfprof_scope.h b/tensorflow/core/profiler/internal/tfprof_scope.h
index 710991dde6..bb847c0866 100644
--- a/tensorflow/core/profiler/internal/tfprof_scope.h
+++ b/tensorflow/core/profiler/internal/tfprof_scope.h
@@ -29,9 +29,9 @@ limitations under the License.
#include "tensorflow/core/framework/graph.pb.h"
#include "tensorflow/core/lib/core/errors.h"
#include "tensorflow/core/profiler/internal/tfprof_node.h"
-#include "tensorflow/core/profiler/internal/tfprof_options.h"
#include "tensorflow/core/profiler/internal/tfprof_show.h"
#include "tensorflow/core/profiler/internal/tfprof_utils.h"
+#include "tensorflow/core/profiler/tfprof_options.h"
#include "tensorflow/core/profiler/tfprof_output.pb.h"
namespace tensorflow {
diff --git a/tensorflow/core/profiler/internal/tfprof_show.h b/tensorflow/core/profiler/internal/tfprof_show.h
index 08c231bad7..21b21b34de 100644
--- a/tensorflow/core/profiler/internal/tfprof_show.h
+++ b/tensorflow/core/profiler/internal/tfprof_show.h
@@ -29,10 +29,10 @@ limitations under the License.
#include "tensorflow/core/profiler/internal/tfprof_constants.h"
#include "tensorflow/core/profiler/internal/tfprof_node.h"
#include "tensorflow/core/profiler/internal/tfprof_node_show.h"
-#include "tensorflow/core/profiler/internal/tfprof_options.h"
#include "tensorflow/core/profiler/internal/tfprof_tensor.h"
#include "tensorflow/core/profiler/internal/tfprof_timeline.h"
#include "tensorflow/core/profiler/internal/tfprof_utils.h"
+#include "tensorflow/core/profiler/tfprof_options.h"
#include "tensorflow/core/profiler/tfprof_output.pb.h"
namespace tensorflow {
diff --git a/tensorflow/core/profiler/internal/tfprof_show_multi.h b/tensorflow/core/profiler/internal/tfprof_show_multi.h
index a632c66933..f6c18c8029 100644
--- a/tensorflow/core/profiler/internal/tfprof_show_multi.h
+++ b/tensorflow/core/profiler/internal/tfprof_show_multi.h
@@ -29,11 +29,11 @@ limitations under the License.
#include "tensorflow/core/profiler/internal/tfprof_constants.h"
#include "tensorflow/core/profiler/internal/tfprof_node.h"
#include "tensorflow/core/profiler/internal/tfprof_node_show.h"
-#include "tensorflow/core/profiler/internal/tfprof_options.h"
#include "tensorflow/core/profiler/internal/tfprof_show.h"
#include "tensorflow/core/profiler/internal/tfprof_tensor.h"
#include "tensorflow/core/profiler/internal/tfprof_timeline.h"
#include "tensorflow/core/profiler/internal/tfprof_utils.h"
+#include "tensorflow/core/profiler/tfprof_options.h"
#include "tensorflow/core/profiler/tfprof_output.pb.h"
namespace tensorflow {
diff --git a/tensorflow/core/profiler/internal/tfprof_show_test.cc b/tensorflow/core/profiler/internal/tfprof_show_test.cc
index 98773ae19e..5100c8a768 100644
--- a/tensorflow/core/profiler/internal/tfprof_show_test.cc
+++ b/tensorflow/core/profiler/internal/tfprof_show_test.cc
@@ -23,9 +23,9 @@ limitations under the License.
#include "tensorflow/core/platform/env.h"
#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/profiler/internal/tfprof_constants.h"
-#include "tensorflow/core/profiler/internal/tfprof_options.h"
#include "tensorflow/core/profiler/internal/tfprof_utils.h"
#include "tensorflow/core/profiler/tfprof_log.pb.h"
+#include "tensorflow/core/profiler/tfprof_options.h"
#include "tensorflow/core/profiler/tfprof_output.pb.h"
#include "tensorflow/core/protobuf/config.pb.h"
diff --git a/tensorflow/core/profiler/internal/tfprof_stats.cc b/tensorflow/core/profiler/internal/tfprof_stats.cc
index 7943c075e0..b84272ae72 100644
--- a/tensorflow/core/profiler/internal/tfprof_stats.cc
+++ b/tensorflow/core/profiler/internal/tfprof_stats.cc
@@ -282,7 +282,7 @@ void TFStats::AddRunMeta(int64 step, std::unique_ptr<RunMetadata> run_meta) {
}
}
-void TFStats::WriteProfile(const string& filename) {
+void TFStats::SerializeToString(string* content) {
ProfileProto profile;
for (const auto& entry : id_to_string_) {
(*profile.mutable_id_to_string())[entry.first] = entry.second;
@@ -299,8 +299,13 @@ void TFStats::WriteProfile(const string& filename) {
for (int64 s : steps_) {
profile.add_steps(s);
}
- Status s =
- WriteStringToFile(Env::Default(), filename, profile.SerializeAsString());
+ *content = profile.SerializeAsString();
+}
+
+void TFStats::WriteProfile(const string& filename) {
+ string content;
+ SerializeToString(&content);
+ Status s = WriteStringToFile(Env::Default(), filename, content);
if (!s.ok()) {
fprintf(stderr, "%s\n", s.ToString().c_str());
}
diff --git a/tensorflow/core/profiler/internal/tfprof_stats.h b/tensorflow/core/profiler/internal/tfprof_stats.h
index d46d923556..46f9326c55 100644
--- a/tensorflow/core/profiler/internal/tfprof_stats.h
+++ b/tensorflow/core/profiler/internal/tfprof_stats.h
@@ -34,17 +34,17 @@ limitations under the License.
#include "tensorflow/core/framework/step_stats.pb.h"
#include "tensorflow/core/lib/core/errors.h"
#include "tensorflow/core/lib/strings/stringprintf.h"
-#include "tensorflow/core/protobuf/config.pb.h"
#include "tensorflow/core/profiler/internal/tfprof_code.h"
#include "tensorflow/core/profiler/internal/tfprof_graph.h"
#include "tensorflow/core/profiler/internal/tfprof_node.h"
#include "tensorflow/core/profiler/internal/tfprof_op.h"
-#include "tensorflow/core/profiler/internal/tfprof_options.h"
#include "tensorflow/core/profiler/internal/tfprof_scope.h"
#include "tensorflow/core/profiler/internal/tfprof_show.h"
#include "tensorflow/core/profiler/internal/tfprof_utils.h"
#include "tensorflow/core/profiler/tfprof_log.pb.h"
+#include "tensorflow/core/profiler/tfprof_options.h"
#include "tensorflow/core/profiler/tfprof_output.pb.h"
+#include "tensorflow/core/protobuf/config.pb.h"
namespace tensorflow {
namespace tfprof {
@@ -92,6 +92,7 @@ class TFStats {
// and code traces.
void AddOpLogProto(std::unique_ptr<OpLogProto> op_log);
+ void SerializeToString(string* content);
void WriteProfile(const string& filename);
// For test purpose only.
diff --git a/tensorflow/core/profiler/internal/tfprof_stats_test.cc b/tensorflow/core/profiler/internal/tfprof_stats_test.cc
index b86a83cb1b..564278c996 100644
--- a/tensorflow/core/profiler/internal/tfprof_stats_test.cc
+++ b/tensorflow/core/profiler/internal/tfprof_stats_test.cc
@@ -24,9 +24,9 @@ limitations under the License.
#include "tensorflow/core/platform/protobuf.h"
#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/profiler/internal/tfprof_constants.h"
-#include "tensorflow/core/profiler/internal/tfprof_options.h"
#include "tensorflow/core/profiler/internal/tfprof_utils.h"
#include "tensorflow/core/profiler/tfprof_log.pb.h"
+#include "tensorflow/core/profiler/tfprof_options.h"
#include "tensorflow/core/profiler/tfprof_output.pb.h"
#include "tensorflow/core/protobuf/config.pb.h"
diff --git a/tensorflow/core/profiler/internal/tfprof_tensor_test.cc b/tensorflow/core/profiler/internal/tfprof_tensor_test.cc
index c68888e88f..7fa79d23d8 100644
--- a/tensorflow/core/profiler/internal/tfprof_tensor_test.cc
+++ b/tensorflow/core/profiler/internal/tfprof_tensor_test.cc
@@ -18,10 +18,10 @@ limitations under the License.
#include "tensorflow/core/lib/io/path.h"
#include "tensorflow/core/platform/protobuf.h"
#include "tensorflow/core/platform/test.h"
-#include "tensorflow/core/profiler/internal/tfprof_options.h"
#include "tensorflow/core/profiler/internal/tfprof_stats.h"
#include "tensorflow/core/profiler/internal/tfprof_utils.h"
#include "tensorflow/core/profiler/tfprof_log.pb.h"
+#include "tensorflow/core/profiler/tfprof_options.h"
#include "tensorflow/core/profiler/tfprof_output.pb.h"
#include "tensorflow/core/protobuf/config.pb.h"
diff --git a/tensorflow/core/profiler/internal/tfprof_timeline_test.cc b/tensorflow/core/profiler/internal/tfprof_timeline_test.cc
index 6a7ab01029..e8bd326aa2 100644
--- a/tensorflow/core/profiler/internal/tfprof_timeline_test.cc
+++ b/tensorflow/core/profiler/internal/tfprof_timeline_test.cc
@@ -23,12 +23,12 @@ limitations under the License.
#include "tensorflow/core/lib/io/path.h"
#include "tensorflow/core/platform/env.h"
#include "tensorflow/core/platform/test.h"
-#include "tensorflow/core/protobuf/config.pb.h"
#include "tensorflow/core/profiler/internal/tfprof_constants.h"
-#include "tensorflow/core/profiler/internal/tfprof_options.h"
#include "tensorflow/core/profiler/internal/tfprof_utils.h"
#include "tensorflow/core/profiler/tfprof_log.pb.h"
+#include "tensorflow/core/profiler/tfprof_options.h"
#include "tensorflow/core/profiler/tfprof_output.pb.h"
+#include "tensorflow/core/protobuf/config.pb.h"
namespace tensorflow {
namespace tfprof {
diff --git a/tensorflow/core/profiler/internal/tfprof_utils.h b/tensorflow/core/profiler/internal/tfprof_utils.h
index 3407517ce0..985ea97af6 100644
--- a/tensorflow/core/profiler/internal/tfprof_utils.h
+++ b/tensorflow/core/profiler/internal/tfprof_utils.h
@@ -22,8 +22,8 @@ limitations under the License.
#include "tensorflow/core/framework/graph.pb.h"
#include "tensorflow/core/lib/core/errors.h"
#include "tensorflow/core/platform/env.h"
+#include "tensorflow/core/profiler/tfprof_options.h"
#include "tensorflow/core/protobuf/config.pb.h"
-#include "tensorflow/core/profiler/internal/tfprof_options.h"
namespace tensorflow {
namespace tfprof {
diff --git a/tensorflow/core/profiler/profiler.cc b/tensorflow/core/profiler/profiler.cc
index b280242df1..6a965c5b73 100644
--- a/tensorflow/core/profiler/profiler.cc
+++ b/tensorflow/core/profiler/profiler.cc
@@ -31,13 +31,13 @@ limitations under the License.
#include "tensorflow/core/platform/env.h"
#include "tensorflow/core/platform/init_main.h"
#include "tensorflow/core/platform/protobuf.h"
-#include "tensorflow/core/protobuf/config.pb.h"
-#include "tensorflow/core/util/command_line_flags.h"
#include "tensorflow/core/profiler/internal/advisor/tfprof_advisor.h"
-#include "tensorflow/core/profiler/internal/tfprof_options.h"
#include "tensorflow/core/profiler/internal/tfprof_stats.h"
#include "tensorflow/core/profiler/internal/tfprof_utils.h"
#include "tensorflow/core/profiler/tfprof_log.pb.h"
+#include "tensorflow/core/profiler/tfprof_options.h"
+#include "tensorflow/core/protobuf/config.pb.h"
+#include "tensorflow/core/util/command_line_flags.h"
namespace tensorflow {
namespace tfprof {
diff --git a/tensorflow/core/profiler/internal/tfprof_options.cc b/tensorflow/core/profiler/tfprof_options.cc
index 6634272541..9e5ef0a0a3 100644
--- a/tensorflow/core/profiler/internal/tfprof_options.cc
+++ b/tensorflow/core/profiler/tfprof_options.cc
@@ -13,7 +13,7 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
-#include "tensorflow/core/profiler/internal/tfprof_options.h"
+#include "tensorflow/core/profiler/tfprof_options.h"
#include "tensorflow/core/lib/core/errors.h"
#include "tensorflow/core/lib/strings/str_util.h"
diff --git a/tensorflow/core/profiler/internal/tfprof_options.h b/tensorflow/core/profiler/tfprof_options.h
index 463f5b3c3a..463f5b3c3a 100644
--- a/tensorflow/core/profiler/internal/tfprof_options.h
+++ b/tensorflow/core/profiler/tfprof_options.h