IWYU in profiler/convert
PiperOrigin-RevId: 310997293 Change-Id: I3ef1f017680f440b573e641a629787447c69038a
This commit is contained in:
parent
3b46518b3a
commit
d4a9a8a649
@ -17,15 +17,18 @@ cc_library(
|
||||
"//tensorflow/core/profiler/protobuf:op_metrics_proto_cc",
|
||||
"//tensorflow/core/profiler/protobuf:xplane_proto_cc",
|
||||
"//tensorflow/core/profiler/utils:cost_utils",
|
||||
"//tensorflow/core/profiler/utils:event_span",
|
||||
"//tensorflow/core/profiler/utils:op_metrics_db_utils",
|
||||
"//tensorflow/core/profiler/utils:op_utils",
|
||||
"//tensorflow/core/profiler/utils:tf_op_utils",
|
||||
"//tensorflow/core/profiler/utils:tf_xplane_visitor",
|
||||
"//tensorflow/core/profiler/utils:timespan",
|
||||
"//tensorflow/core/profiler/utils:trace_utils",
|
||||
"//tensorflow/core/profiler/utils:xplane_schema",
|
||||
"//tensorflow/core/profiler/utils:xplane_visitor",
|
||||
"@com_google_absl//absl/algorithm:container",
|
||||
"@com_google_absl//absl/container:flat_hash_map",
|
||||
"@com_google_absl//absl/strings",
|
||||
"@com_google_absl//absl/types:optional",
|
||||
],
|
||||
)
|
||||
|
||||
@ -35,9 +38,11 @@ tf_cc_test(
|
||||
srcs = ["xplane_to_op_metrics_db_test.cc"],
|
||||
deps = [
|
||||
":xplane_to_op_metrics_db",
|
||||
"//tensorflow/core:lib",
|
||||
"//tensorflow/core:test",
|
||||
"//tensorflow/core:test_main",
|
||||
"//tensorflow/core/profiler/protobuf:op_metrics_proto_cc",
|
||||
"//tensorflow/core/profiler/protobuf:xplane_proto_cc",
|
||||
"//tensorflow/core/profiler/utils:op_metrics_db_utils",
|
||||
"//tensorflow/core/profiler/utils:time_utils",
|
||||
"//tensorflow/core/profiler/utils:xplane_builder",
|
||||
@ -86,12 +91,12 @@ cc_library(
|
||||
":op_stats_to_input_pipeline_analysis",
|
||||
"//tensorflow/core:lib",
|
||||
"//tensorflow/core:lib_internal",
|
||||
"//tensorflow/core/platform:logging",
|
||||
"//tensorflow/core/profiler/protobuf:hardware_types_proto_cc",
|
||||
"//tensorflow/core/profiler/protobuf:input_pipeline_proto_cc",
|
||||
"//tensorflow/core/profiler/protobuf:op_metrics_proto_cc",
|
||||
"//tensorflow/core/profiler/protobuf:op_stats_proto_cc",
|
||||
"//tensorflow/core/profiler/protobuf:overview_page_proto_cc",
|
||||
"//tensorflow/core/profiler/protobuf:steps_db_proto_cc",
|
||||
"//tensorflow/core/profiler/protobuf:tf_function_proto_cc",
|
||||
"//tensorflow/core/profiler/utils:errors",
|
||||
"//tensorflow/core/profiler/utils:html_utils",
|
||||
@ -125,7 +130,6 @@ cc_library(
|
||||
"//tensorflow/core/profiler/utils:tf_op_utils",
|
||||
"//tensorflow/core/profiler/utils:time_utils",
|
||||
"//tensorflow/core/util:stats_calculator_portable",
|
||||
"@com_google_absl//absl/algorithm:container",
|
||||
"@com_google_absl//absl/container:flat_hash_map",
|
||||
"@com_google_absl//absl/strings",
|
||||
"@com_google_absl//absl/strings:str_format",
|
||||
@ -138,13 +142,12 @@ cc_library(
|
||||
hdrs = ["op_stats_to_tf_stats.h"],
|
||||
deps = [
|
||||
":op_metrics_to_record",
|
||||
"//tensorflow/core:lib",
|
||||
"//tensorflow/core/profiler/protobuf:op_metrics_proto_cc",
|
||||
"//tensorflow/core/profiler/protobuf:op_stats_proto_cc",
|
||||
"//tensorflow/core/profiler/protobuf:tf_stats_proto_cc",
|
||||
"//tensorflow/core/profiler/utils:op_metrics_db_utils",
|
||||
"//tensorflow/core/profiler/utils:tf_op_utils",
|
||||
"//tensorflow/core/profiler/utils:time_utils",
|
||||
"@com_google_absl//absl/container:flat_hash_set",
|
||||
],
|
||||
)
|
||||
|
||||
@ -155,13 +158,18 @@ tf_cc_test(
|
||||
deps = [
|
||||
":op_stats_to_tf_stats",
|
||||
":xplane_to_op_stats",
|
||||
"//tensorflow/core:lib",
|
||||
"//tensorflow/core:test",
|
||||
"//tensorflow/core:test_main",
|
||||
"//tensorflow/core/profiler/protobuf:op_metrics_proto_cc",
|
||||
"//tensorflow/core/profiler/protobuf:op_stats_proto_cc",
|
||||
"//tensorflow/core/profiler/protobuf:tf_stats_proto_cc",
|
||||
"//tensorflow/core/profiler/protobuf:xplane_proto_cc",
|
||||
"//tensorflow/core/profiler/utils:op_metrics_db_utils",
|
||||
"//tensorflow/core/profiler/utils:time_utils",
|
||||
"//tensorflow/core/profiler/utils:xplane_builder",
|
||||
"//tensorflow/core/profiler/utils:xplane_schema",
|
||||
"@com_google_absl//absl/strings",
|
||||
],
|
||||
)
|
||||
|
||||
@ -174,6 +182,9 @@ cc_library(
|
||||
"//tensorflow/core:lib_internal",
|
||||
"//tensorflow/core/profiler/protobuf:steps_db_proto_cc",
|
||||
"//tensorflow/core/profiler/utils:event_span",
|
||||
"//tensorflow/core/profiler/utils:timespan",
|
||||
"@com_google_absl//absl/algorithm:container",
|
||||
"@com_google_absl//absl/container:flat_hash_map",
|
||||
],
|
||||
)
|
||||
|
||||
@ -208,6 +219,7 @@ cc_library(
|
||||
srcs = ["xplane_to_op_stats.cc"],
|
||||
hdrs = ["xplane_to_op_stats.h"],
|
||||
deps = [
|
||||
":op_metrics_db_combiner",
|
||||
":step_events_to_steps_db",
|
||||
":xplane_to_kernel_stats_db",
|
||||
":xplane_to_op_metrics_db",
|
||||
@ -216,15 +228,20 @@ cc_library(
|
||||
"//tensorflow/core:lib",
|
||||
"//tensorflow/core/profiler/protobuf:hardware_types_proto_cc",
|
||||
"//tensorflow/core/profiler/protobuf:kernel_stats_proto_cc",
|
||||
"//tensorflow/core/profiler/protobuf:op_metrics_proto_cc",
|
||||
"//tensorflow/core/profiler/protobuf:op_stats_proto_cc",
|
||||
"//tensorflow/core/profiler/protobuf:steps_db_proto_cc",
|
||||
"//tensorflow/core/profiler/protobuf:tf_function_proto_cc",
|
||||
"//tensorflow/core/profiler/protobuf:xplane_proto_cc",
|
||||
"//tensorflow/core/profiler/utils:event_span",
|
||||
"//tensorflow/core/profiler/utils:hardware_type_utils",
|
||||
"//tensorflow/core/profiler/utils:kernel_stats_utils",
|
||||
"//tensorflow/core/profiler/utils:tf_op_utils",
|
||||
"//tensorflow/core/profiler/utils:tf_xplane_visitor",
|
||||
"//tensorflow/core/profiler/utils:xplane_schema",
|
||||
"//tensorflow/core/profiler/utils:xplane_utils",
|
||||
"//tensorflow/core/profiler/utils:xplane_visitor",
|
||||
"@com_google_absl//absl/container:flat_hash_map",
|
||||
],
|
||||
)
|
||||
|
||||
@ -242,11 +259,15 @@ tf_cc_test(
|
||||
"//tensorflow/core:test_main",
|
||||
"//tensorflow/core:testlib",
|
||||
"//tensorflow/core/profiler/protobuf:op_metrics_proto_cc",
|
||||
"//tensorflow/core/profiler/protobuf:op_stats_proto_cc",
|
||||
"//tensorflow/core/profiler/protobuf:steps_db_proto_cc",
|
||||
"//tensorflow/core/profiler/protobuf:tf_function_proto_cc",
|
||||
"//tensorflow/core/profiler/protobuf:xplane_proto_cc",
|
||||
"//tensorflow/core/profiler/utils:group_events",
|
||||
"//tensorflow/core/profiler/utils:xplane_builder",
|
||||
"//tensorflow/core/profiler/utils:xplane_schema",
|
||||
"//tensorflow/core/profiler/utils:xplane_utils",
|
||||
"@com_google_absl//absl/strings",
|
||||
],
|
||||
)
|
||||
|
||||
@ -271,6 +292,7 @@ cc_library(
|
||||
"//tensorflow/core/profiler/protobuf:op_stats_proto_cc",
|
||||
"//tensorflow/core/profiler/protobuf:overview_page_proto_cc",
|
||||
"//tensorflow/core/profiler/protobuf:tf_stats_proto_cc",
|
||||
"//tensorflow/core/profiler/protobuf:trace_events_proto_cc",
|
||||
"//tensorflow/core/profiler/protobuf:xplane_proto_cc",
|
||||
"//tensorflow/core/profiler/rpc/client:save_profile",
|
||||
"//tensorflow/core/profiler/utils:xplane_schema",
|
||||
@ -286,12 +308,14 @@ tf_cc_test(
|
||||
srcs = ["xplane_to_profile_response_test.cc"],
|
||||
deps = [
|
||||
":xplane_to_profile_response",
|
||||
"//tensorflow/core:lib",
|
||||
"//tensorflow/core:test",
|
||||
"//tensorflow/core:test_main",
|
||||
"//tensorflow/core/profiler:profiler_service_proto_cc",
|
||||
"//tensorflow/core/profiler/protobuf:input_pipeline_proto_cc",
|
||||
"//tensorflow/core/profiler/protobuf:overview_page_proto_cc",
|
||||
"//tensorflow/core/profiler/protobuf:tf_stats_proto_cc",
|
||||
"//tensorflow/core/profiler/protobuf:xplane_proto_cc",
|
||||
"//tensorflow/core/profiler/utils:group_events",
|
||||
"//tensorflow/core/profiler/utils:xplane_builder",
|
||||
"//tensorflow/core/profiler/utils:xplane_schema",
|
||||
@ -305,14 +329,16 @@ cc_library(
|
||||
hdrs = ["xplane_to_step_events.h"],
|
||||
deps = [
|
||||
"//tensorflow/core:lib",
|
||||
"//tensorflow/core:protos_all_cc",
|
||||
"//tensorflow/core/profiler/protobuf:steps_db_proto_cc",
|
||||
"//tensorflow/core/profiler/protobuf:xplane_proto_cc",
|
||||
"//tensorflow/core/profiler/utils:event_span",
|
||||
"//tensorflow/core/profiler/utils:tf_xplane_visitor",
|
||||
"//tensorflow/core/profiler/utils:timespan",
|
||||
"//tensorflow/core/profiler/utils:trace_utils",
|
||||
"//tensorflow/core/profiler/utils:xplane_schema",
|
||||
"//tensorflow/core/profiler/utils:xplane_visitor",
|
||||
"@com_google_absl//absl/container:flat_hash_map",
|
||||
"@com_google_absl//absl/strings",
|
||||
"@com_google_absl//absl/types:optional",
|
||||
],
|
||||
)
|
||||
|
||||
@ -322,12 +348,16 @@ tf_cc_test(
|
||||
srcs = ["xplane_to_step_events_test.cc"],
|
||||
deps = [
|
||||
":xplane_to_step_events",
|
||||
"//tensorflow/core:lib",
|
||||
"//tensorflow/core:test",
|
||||
"//tensorflow/core:test_main",
|
||||
"//tensorflow/core/profiler/protobuf:xplane_proto_cc",
|
||||
"//tensorflow/core/profiler/utils:event_span",
|
||||
"//tensorflow/core/profiler/utils:group_events",
|
||||
"//tensorflow/core/profiler/utils:xplane_builder",
|
||||
"//tensorflow/core/profiler/utils:xplane_schema",
|
||||
"//tensorflow/core/profiler/utils:xplane_utils",
|
||||
"@com_google_absl//absl/container:flat_hash_map",
|
||||
],
|
||||
)
|
||||
|
||||
@ -341,7 +371,9 @@ cc_library(
|
||||
"//tensorflow/core/profiler/protobuf:xplane_proto_cc",
|
||||
"//tensorflow/core/profiler/utils:tf_xplane_visitor",
|
||||
"//tensorflow/core/profiler/utils:xplane_schema",
|
||||
"//tensorflow/core/profiler/utils:xplane_visitor",
|
||||
"@com_google_absl//absl/strings",
|
||||
"@com_google_absl//absl/types:optional",
|
||||
],
|
||||
)
|
||||
|
||||
@ -357,6 +389,8 @@ tf_cc_test(
|
||||
"//tensorflow/core:test",
|
||||
"//tensorflow/core:test_main",
|
||||
"//tensorflow/core:testlib",
|
||||
"//tensorflow/core/profiler/protobuf:trace_events_proto_cc",
|
||||
"//tensorflow/core/profiler/protobuf:xplane_proto_cc",
|
||||
"//tensorflow/core/profiler/utils:xplane_builder",
|
||||
"//tensorflow/core/profiler/utils:xplane_schema",
|
||||
"//tensorflow/core/profiler/utils:xplane_utils",
|
||||
@ -372,14 +406,14 @@ cc_library(
|
||||
"//tensorflow/core:lib_internal",
|
||||
"//tensorflow/core/profiler/protobuf:kernel_stats_proto_cc",
|
||||
"//tensorflow/core/profiler/protobuf:xplane_proto_cc",
|
||||
"//tensorflow/core/profiler/utils:event_span",
|
||||
"//tensorflow/core/profiler/utils:kernel_stats_utils",
|
||||
"//tensorflow/core/profiler/utils:tf_op_utils",
|
||||
"//tensorflow/core/profiler/utils:tf_xplane_visitor",
|
||||
"//tensorflow/core/profiler/utils:trace_utils",
|
||||
"//tensorflow/core/profiler/utils:xplane_schema",
|
||||
"//tensorflow/core/profiler/utils:xplane_utils",
|
||||
"//tensorflow/core/profiler/utils:xplane_visitor",
|
||||
"@com_google_absl//absl/strings",
|
||||
"@com_google_absl//absl/types:optional",
|
||||
],
|
||||
)
|
||||
|
||||
@ -396,11 +430,10 @@ cc_library(
|
||||
"//tensorflow/core/profiler/utils:tf_xplane_visitor",
|
||||
"//tensorflow/core/profiler/utils:timespan",
|
||||
"//tensorflow/core/profiler/utils:xplane_schema",
|
||||
"//tensorflow/core/profiler/utils:xplane_utils",
|
||||
"//tensorflow/core/profiler/utils:xplane_visitor",
|
||||
"@com_google_absl//absl/algorithm:container",
|
||||
"@com_google_absl//absl/container:flat_hash_map",
|
||||
"@com_google_absl//absl/strings",
|
||||
"@com_google_absl//absl/types:optional",
|
||||
],
|
||||
)
|
||||
|
||||
@ -417,10 +450,13 @@ tf_cc_test(
|
||||
"//tensorflow/core:test_main",
|
||||
"//tensorflow/core:testlib",
|
||||
"//tensorflow/core/profiler/protobuf:tf_function_proto_cc",
|
||||
"//tensorflow/core/profiler/protobuf:xplane_proto_cc",
|
||||
"//tensorflow/core/profiler/utils:tf_xplane_visitor",
|
||||
"//tensorflow/core/profiler/utils:xplane_builder",
|
||||
"//tensorflow/core/profiler/utils:xplane_schema",
|
||||
"//tensorflow/core/profiler/utils:xplane_utils",
|
||||
"//tensorflow/core/profiler/utils:xplane_visitor",
|
||||
"@com_google_absl//absl/strings",
|
||||
],
|
||||
)
|
||||
|
||||
@ -432,15 +468,18 @@ cc_library(
|
||||
"//tensorflow/core:framework",
|
||||
"//tensorflow/core:lib",
|
||||
"//tensorflow/core:lib_internal",
|
||||
"//tensorflow/core/framework:protos_all_cc",
|
||||
"//tensorflow/core/platform:protobuf",
|
||||
"//tensorflow/core/profiler/protobuf:memory_profile_proto_cc",
|
||||
"//tensorflow/core/profiler/protobuf:xplane_proto_cc",
|
||||
"//tensorflow/core/profiler/utils:tf_xplane_visitor",
|
||||
"//tensorflow/core/profiler/utils:xplane_schema",
|
||||
"//tensorflow/core/profiler/utils:xplane_utils",
|
||||
"//tensorflow/core/profiler/utils:xplane_visitor",
|
||||
"@com_google_absl//absl/algorithm:container",
|
||||
"@com_google_absl//absl/container:flat_hash_map",
|
||||
"@com_google_absl//absl/strings",
|
||||
"@com_google_absl//absl/strings:str_format",
|
||||
"@com_google_absl//absl/types:optional",
|
||||
],
|
||||
)
|
||||
|
||||
@ -450,10 +489,14 @@ tf_cc_test(
|
||||
srcs = ["xplane_to_memory_profile_test.cc"],
|
||||
deps = [
|
||||
":xplane_to_memory_profile",
|
||||
"//tensorflow/core:lib",
|
||||
"//tensorflow/core:test",
|
||||
"//tensorflow/core:test_main",
|
||||
"//tensorflow/core/profiler/protobuf:memory_profile_proto_cc",
|
||||
"//tensorflow/core/profiler/protobuf:xplane_proto_cc",
|
||||
"//tensorflow/core/profiler/utils:xplane_builder",
|
||||
"//tensorflow/core/profiler/utils:xplane_schema",
|
||||
"//tensorflow/core/profiler/utils:xplane_utils",
|
||||
"@com_google_absl//absl/strings",
|
||||
],
|
||||
)
|
||||
|
@ -16,6 +16,7 @@ limitations under the License.
|
||||
#include "tensorflow/core/profiler/convert/op_metrics_db_combiner.h"
|
||||
|
||||
#include "tensorflow/core/platform/logging.h"
|
||||
#include "tensorflow/core/profiler/protobuf/op_metrics.pb.h"
|
||||
|
||||
namespace tensorflow {
|
||||
namespace profiler {
|
||||
|
@ -15,7 +15,9 @@ limitations under the License.
|
||||
|
||||
#include "tensorflow/core/profiler/convert/op_metrics_to_record.h"
|
||||
|
||||
#include <iterator>
|
||||
#include <tuple>
|
||||
#include <vector>
|
||||
|
||||
#include "absl/algorithm/container.h"
|
||||
#include "tensorflow/core/profiler/protobuf/op_metrics.pb.h"
|
||||
|
@ -15,11 +15,12 @@ limitations under the License.
|
||||
|
||||
#include "tensorflow/core/profiler/convert/op_stats_to_input_pipeline_analysis.h"
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "google/protobuf/any.pb.h"
|
||||
#include "absl/algorithm/container.h"
|
||||
#include "absl/container/flat_hash_map.h"
|
||||
#include "absl/strings/match.h"
|
||||
#include "absl/strings/str_cat.h"
|
||||
@ -27,7 +28,6 @@ limitations under the License.
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "tensorflow/core/lib/gtl/map_util.h"
|
||||
#include "tensorflow/core/platform/logging.h"
|
||||
#include "tensorflow/core/platform/protobuf.h"
|
||||
#include "tensorflow/core/platform/types.h"
|
||||
#include "tensorflow/core/profiler/convert/op_metrics_to_record.h"
|
||||
#include "tensorflow/core/profiler/convert/step_events_to_steps_db.h"
|
||||
@ -104,7 +104,7 @@ StepSummary GetStepSummaryForSampleStats(const Stat<double>& sample_stats) {
|
||||
avg = sdv = min = max = 0.0;
|
||||
} else {
|
||||
avg = sample_stats.avg();
|
||||
sdv = std::sqrt(sample_stats.sample_variance());
|
||||
sdv = sqrt(sample_stats.sample_variance());
|
||||
min = sample_stats.min();
|
||||
max = sample_stats.max();
|
||||
}
|
||||
@ -244,7 +244,7 @@ enum class InputOpCategory {
|
||||
kPreprocessing // data preprocessing.
|
||||
};
|
||||
|
||||
string InputOpCategoryString(InputOpCategory category) {
|
||||
std::string InputOpCategoryString(InputOpCategory category) {
|
||||
switch (category) {
|
||||
case InputOpCategory::kEnqueue:
|
||||
return "Enqueue";
|
||||
@ -359,9 +359,9 @@ double RatioOfHostToDeviceTimeToStepTime(
|
||||
}
|
||||
|
||||
void KernelLaunchAnalysis(bool tfdata_used, double kernel_launch_percent,
|
||||
string* kernel_launch_classification,
|
||||
string* kernel_launch_statement) {
|
||||
string percent_str = absl::StrFormat("%.1lf", kernel_launch_percent);
|
||||
std::string* kernel_launch_classification,
|
||||
std::string* kernel_launch_statement) {
|
||||
std::string percent_str = absl::StrFormat("%.1lf", kernel_launch_percent);
|
||||
if (kernel_launch_percent >= kHighlyKernelLaunchBoundThresholdInPercent) {
|
||||
*kernel_launch_classification = "high";
|
||||
*kernel_launch_statement = absl::StrCat(
|
||||
@ -386,14 +386,14 @@ void KernelLaunchAnalysis(bool tfdata_used, double kernel_launch_percent,
|
||||
}
|
||||
|
||||
void AllOtherAnalysis(bool all_other_reported, double all_other_percent,
|
||||
string* all_other_classification,
|
||||
string* all_other_statement) {
|
||||
std::string* all_other_classification,
|
||||
std::string* all_other_statement) {
|
||||
if (all_other_reported) {
|
||||
*all_other_classification = "no";
|
||||
*all_other_statement = "";
|
||||
return;
|
||||
}
|
||||
string percent_str = absl::StrFormat("%.1lf", all_other_percent);
|
||||
std::string percent_str = absl::StrFormat("%.1lf", all_other_percent);
|
||||
if (all_other_percent >= kHighlyAllOtherBoundThresholdInPercent) {
|
||||
*all_other_classification = "high";
|
||||
*all_other_statement =
|
||||
@ -585,9 +585,10 @@ InputPipelineAnalysisResult ConvertOpStatsToInputPipelineAnalysis(
|
||||
}
|
||||
|
||||
bool InputAnalysis(double input_percent, double all_other_percent,
|
||||
string* input_classification, string* input_statement) {
|
||||
std::string* input_classification,
|
||||
std::string* input_statement) {
|
||||
absl::string_view non_input_time = "other time";
|
||||
string infeed_percent_str = absl::StrFormat("%.1lf", input_percent);
|
||||
std::string infeed_percent_str = absl::StrFormat("%.1lf", input_percent);
|
||||
if (input_percent >= kHighlyInfeedBoundThresholdInPercent) {
|
||||
*input_classification = "host";
|
||||
*input_statement = absl::StrCat(
|
||||
@ -607,7 +608,8 @@ bool InputAnalysis(double input_percent, double all_other_percent,
|
||||
// Input analysis says it is not input-bound, but "All-Other" time
|
||||
// is significant. It could still be input-bound (or Python overhead).
|
||||
*input_classification = "both";
|
||||
string all_other_percent_str = absl::StrFormat("%.1lf", all_other_percent);
|
||||
std::string all_other_percent_str =
|
||||
absl::StrFormat("%.1lf", all_other_percent);
|
||||
*input_statement = absl::StrCat(
|
||||
"Your program is POTENTIALLY input-bound because ",
|
||||
all_other_percent_str,
|
||||
@ -627,8 +629,8 @@ bool InputAnalysis(double input_percent, double all_other_percent,
|
||||
}
|
||||
}
|
||||
|
||||
void OutputAnalysis(double output_percent, string* output_classification,
|
||||
string* output_statement) {
|
||||
void OutputAnalysis(double output_percent, std::string* output_classification,
|
||||
std::string* output_statement) {
|
||||
string tc_outfeed_percent_str = absl::StrFormat("%.1lf", output_percent);
|
||||
if (output_percent >= kHighlyOutfeedBoundThresholdInPercent) {
|
||||
*output_classification = "host";
|
||||
@ -700,19 +702,19 @@ BottleneckAnalysis ComputeBottleneckAnalysis(
|
||||
double kernel_launch_percent =
|
||||
100.0 * total_host_prepare_ms / total_step_time_ms;
|
||||
double all_other_percent = 100.0 * total_unknown_ms / total_step_time_ms;
|
||||
string input_classification;
|
||||
string input_statement;
|
||||
std::string input_classification;
|
||||
std::string input_statement;
|
||||
bool all_other_reported =
|
||||
InputAnalysis(input_percent, all_other_percent, &input_classification,
|
||||
&input_statement);
|
||||
|
||||
string kernel_launch_classification;
|
||||
string kernel_launch_statement;
|
||||
std::string kernel_launch_classification;
|
||||
std::string kernel_launch_statement;
|
||||
KernelLaunchAnalysis(TfDataInUse(input_time_breakdown), kernel_launch_percent,
|
||||
&kernel_launch_classification, &kernel_launch_statement);
|
||||
|
||||
string all_other_classification;
|
||||
string all_other_statement;
|
||||
std::string all_other_classification;
|
||||
std::string all_other_statement;
|
||||
AllOtherAnalysis(all_other_reported, all_other_percent,
|
||||
&all_other_classification, &all_other_statement);
|
||||
|
||||
@ -726,9 +728,9 @@ BottleneckAnalysis ComputeBottleneckAnalysis(
|
||||
return analysis;
|
||||
}
|
||||
|
||||
string GetSummaryNextStep(absl::string_view input_classification,
|
||||
const InputTimeBreakdown& breakdown) {
|
||||
string summary_next_step;
|
||||
std::string GetSummaryNextStep(absl::string_view input_classification,
|
||||
const InputTimeBreakdown& breakdown) {
|
||||
std::string summary_next_step;
|
||||
if (input_classification == "host" || input_classification == "both") {
|
||||
if (!TfDataInUse(breakdown)) {
|
||||
summary_next_step = absl::StrCat(
|
||||
|
@ -16,12 +16,15 @@ limitations under the License.
|
||||
#ifndef TENSORFLOW_CORE_PROFILER_CONVERT_OP_STATS_TO_INPUT_PIPELINE_ANALYSIS_H_
|
||||
#define TENSORFLOW_CORE_PROFILER_CONVERT_OP_STATS_TO_INPUT_PIPELINE_ANALYSIS_H_
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "google/protobuf/any.pb.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "tensorflow/core/platform/protobuf.h"
|
||||
#include "tensorflow/core/platform/types.h"
|
||||
#include "tensorflow/core/profiler/protobuf/hardware_types.pb.h"
|
||||
#include "tensorflow/core/profiler/protobuf/input_pipeline.pb.h"
|
||||
#include "tensorflow/core/profiler/protobuf/op_metrics.pb.h"
|
||||
#include "tensorflow/core/profiler/protobuf/op_stats.pb.h"
|
||||
#include "tensorflow/core/profiler/protobuf/steps_db.pb.h"
|
||||
|
||||
@ -50,16 +53,18 @@ InputPipelineAnalysisResult ConvertOpStatsToInputPipelineAnalysis(
|
||||
// Returns true if explanation for "All Others" time is also included in
|
||||
// input_statement.
|
||||
bool InputAnalysis(double input_percent, double all_other_percent,
|
||||
string* input_classification, string* input_statement);
|
||||
std::string* input_classification,
|
||||
std::string* input_statement);
|
||||
|
||||
void OutputAnalysis(double output_percent, string* output_classification,
|
||||
string* output_statement);
|
||||
void OutputAnalysis(double output_percent, std::string* output_classification,
|
||||
std::string* output_statement);
|
||||
|
||||
string GetSummaryNextStep(absl::string_view input_classification,
|
||||
const InputTimeBreakdown& breakdown);
|
||||
|
||||
void AddErrorMessages(const OpStats& op_stats,
|
||||
InputPipelineAnalysisResult* result);
|
||||
|
||||
} // namespace profiler
|
||||
} // namespace tensorflow
|
||||
|
||||
|
@ -15,13 +15,11 @@ limitations under the License.
|
||||
|
||||
#include "tensorflow/core/profiler/convert/op_stats_to_overview_page.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <utility>
|
||||
#include <string>
|
||||
|
||||
#include "google/protobuf/any.pb.h"
|
||||
#include "absl/strings/str_cat.h"
|
||||
#include "absl/strings/str_format.h"
|
||||
#include "tensorflow/core/platform/logging.h"
|
||||
#include "tensorflow/core/platform/protobuf.h"
|
||||
#include "tensorflow/core/platform/types.h"
|
||||
#include "tensorflow/core/profiler/convert/op_metrics_to_record.h"
|
||||
#include "tensorflow/core/profiler/convert/op_stats_to_input_pipeline_analysis.h"
|
||||
@ -30,6 +28,7 @@ limitations under the License.
|
||||
#include "tensorflow/core/profiler/protobuf/op_metrics.pb.h"
|
||||
#include "tensorflow/core/profiler/protobuf/op_stats.pb.h"
|
||||
#include "tensorflow/core/profiler/protobuf/overview_page.pb.h"
|
||||
#include "tensorflow/core/profiler/protobuf/steps_db.pb.h"
|
||||
#include "tensorflow/core/profiler/protobuf/tf_function.pb.h"
|
||||
#include "tensorflow/core/profiler/utils/errors.h"
|
||||
#include "tensorflow/core/profiler/utils/html_utils.h"
|
||||
@ -51,20 +50,18 @@ struct TfFunctionInfo {
|
||||
double expensive_call_percent;
|
||||
};
|
||||
|
||||
OverviewPageTip MakeOverviewPageTip(const string& text) {
|
||||
OverviewPageTip MakeOverviewPageTip(std::string text) {
|
||||
OverviewPageTip tip;
|
||||
tip.set_link(text);
|
||||
tip.set_link(std::move(text));
|
||||
return tip;
|
||||
}
|
||||
|
||||
// Makes a recommendation for looking up a document.
|
||||
// doc_url is expected to be already be escaped suitably for use in an HTML
|
||||
// attribute.
|
||||
OverviewPageTip MakeOverviewPageTipDocLink(const string& doc_url,
|
||||
const string& text) {
|
||||
OverviewPageTip tip;
|
||||
tip.set_link(AnchorElement(doc_url, text));
|
||||
return tip;
|
||||
OverviewPageTip MakeOverviewPageTipDocLink(absl::string_view doc_url,
|
||||
absl::string_view text) {
|
||||
return MakeOverviewPageTip(AnchorElement(doc_url, text));
|
||||
}
|
||||
|
||||
void ComputeHostTips(OverviewPageRecommendation* re) {
|
||||
@ -78,12 +75,13 @@ void ComputeHostTips(OverviewPageRecommendation* re) {
|
||||
|
||||
void ComputeDeviceTips(HardwareType hardware_type,
|
||||
OverviewPageRecommendation* re) {
|
||||
const string& device_name = HardwareType_Name(hardware_type);
|
||||
string timeline_name =
|
||||
(hardware_type == tensorflow::profiler::TPU) ? "TPU core" : device_name;
|
||||
string op_stats_toolname = (hardware_type == tensorflow::profiler::TPU)
|
||||
? "op_profile"
|
||||
: "tensorflow_stats";
|
||||
absl::string_view device_name = HardwareType_Name(hardware_type);
|
||||
absl::string_view timeline_name = device_name;
|
||||
absl::string_view op_stats_toolname = "tensorflow_stats";
|
||||
if (hardware_type == tensorflow::profiler::TPU) {
|
||||
timeline_name = "TPU core";
|
||||
op_stats_toolname = "op_profile";
|
||||
}
|
||||
*re->add_device_tips() = MakeOverviewPageTip(
|
||||
absl::StrCat(op_stats_toolname,
|
||||
" (identify the time-consuming operations "
|
||||
@ -124,16 +122,16 @@ std::string GeneratePrecisionStatement(const PrecisionStats& precision_stats) {
|
||||
|
||||
} // namespace
|
||||
|
||||
void SetCommonRecommendation(const string& input_classification,
|
||||
const string& input_statement,
|
||||
const string& output_statement,
|
||||
void SetCommonRecommendation(absl::string_view input_classification,
|
||||
absl::string_view input_statement,
|
||||
absl::string_view output_statement,
|
||||
HardwareType hardware_type,
|
||||
const string& tf_function_statement_html,
|
||||
absl::string_view tf_function_statement_html,
|
||||
OverviewPageRecommendation* re) {
|
||||
re->set_bottleneck(input_classification);
|
||||
re->set_statement(input_statement);
|
||||
re->set_output_statement(output_statement);
|
||||
re->set_tf_function_statement_html(tf_function_statement_html);
|
||||
re->set_bottleneck(std::string(input_classification));
|
||||
re->set_statement(std::string(input_statement));
|
||||
re->set_output_statement(std::string(output_statement));
|
||||
re->set_tf_function_statement_html(std::string(tf_function_statement_html));
|
||||
ComputeHostTips(re);
|
||||
ComputeDeviceTips(hardware_type, re);
|
||||
ComputeDocumentationTips(re);
|
||||
|
@ -17,9 +17,7 @@ limitations under the License.
|
||||
#define TENSORFLOW_CORE_PROFILER_CONVERT_OP_STATS_TO_OVERVIEW_PAGE_H_
|
||||
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "tensorflow/core/platform/protobuf.h"
|
||||
#include "tensorflow/core/platform/types.h"
|
||||
#include "tensorflow/core/profiler/convert/op_stats_to_input_pipeline_analysis.h"
|
||||
#include "tensorflow/core/profiler/protobuf/hardware_types.pb.h"
|
||||
#include "tensorflow/core/profiler/protobuf/input_pipeline.pb.h"
|
||||
#include "tensorflow/core/profiler/protobuf/op_metrics.pb.h"
|
||||
@ -34,11 +32,11 @@ namespace profiler {
|
||||
// the tf-functions profiled.
|
||||
const double kTfFunctionReportThresholdInPercent = 20;
|
||||
|
||||
void SetCommonRecommendation(const string& input_classification,
|
||||
const string& input_statement,
|
||||
const string& output_statement,
|
||||
void SetCommonRecommendation(absl::string_view input_classification,
|
||||
absl::string_view input_statement,
|
||||
absl::string_view output_statement,
|
||||
HardwareType hardware_type,
|
||||
const string& tf_function_statement_html,
|
||||
absl::string_view tf_function_statement_html,
|
||||
OverviewPageRecommendation* re);
|
||||
|
||||
OverviewPageRecommendation ComputeGenericRecommendation(
|
||||
|
@ -15,13 +15,12 @@ limitations under the License.
|
||||
|
||||
#include "tensorflow/core/profiler/convert/op_stats_to_tf_stats.h"
|
||||
|
||||
#include "absl/container/flat_hash_set.h"
|
||||
#include "tensorflow/core/platform/types.h"
|
||||
#include "tensorflow/core/profiler/convert/op_metrics_to_record.h"
|
||||
#include "tensorflow/core/profiler/protobuf/op_metrics.pb.h"
|
||||
#include "tensorflow/core/profiler/protobuf/op_stats.pb.h"
|
||||
#include "tensorflow/core/profiler/protobuf/tf_stats.pb.h"
|
||||
#include "tensorflow/core/profiler/utils/op_metrics_db_utils.h"
|
||||
#include "tensorflow/core/profiler/utils/tf_op_utils.h"
|
||||
#include "tensorflow/core/profiler/utils/time_utils.h"
|
||||
|
||||
namespace tensorflow {
|
||||
|
@ -15,10 +15,14 @@ limitations under the License.
|
||||
|
||||
#include "tensorflow/core/profiler/convert/op_stats_to_tf_stats.h"
|
||||
|
||||
#include "absl/strings/str_cat.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "tensorflow/core/platform/test.h"
|
||||
#include "tensorflow/core/platform/types.h"
|
||||
#include "tensorflow/core/profiler/convert/xplane_to_op_stats.h"
|
||||
#include "tensorflow/core/profiler/protobuf/op_metrics.pb.h"
|
||||
#include "tensorflow/core/profiler/utils/op_metrics_db_utils.h"
|
||||
#include "tensorflow/core/profiler/protobuf/op_stats.pb.h"
|
||||
#include "tensorflow/core/profiler/protobuf/tf_stats.pb.h"
|
||||
#include "tensorflow/core/profiler/protobuf/xplane.pb.h"
|
||||
#include "tensorflow/core/profiler/utils/time_utils.h"
|
||||
#include "tensorflow/core/profiler/utils/xplane_builder.h"
|
||||
#include "tensorflow/core/profiler/utils/xplane_schema.h"
|
||||
@ -75,8 +79,8 @@ TEST(OpStatsToTfStats, GpuTfStats) {
|
||||
kKernel3DurationNs, /*on_device=*/true, kKernel3,
|
||||
&device_plane, &stream2);
|
||||
|
||||
const OpStats& op_stats = ConvertXSpaceToOpStats(space);
|
||||
const TfStatsDatabase& tf_stats = ConvertOpStatsToTfStats(op_stats);
|
||||
const OpStats op_stats = ConvertXSpaceToOpStats(space);
|
||||
const TfStatsDatabase tf_stats = ConvertOpStatsToTfStats(op_stats);
|
||||
|
||||
// TfOp1, TfOp2, Idle
|
||||
EXPECT_EQ(3, tf_stats.with_idle().tf_stats_record_size());
|
||||
|
@ -15,10 +15,18 @@ limitations under the License.
|
||||
#include "tensorflow/core/profiler/convert/step_events_to_steps_db.h"
|
||||
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "google/protobuf/any.pb.h"
|
||||
#include "absl/algorithm/container.h"
|
||||
#include "absl/container/flat_hash_map.h"
|
||||
#include "tensorflow/core/lib/gtl/map_util.h"
|
||||
#include "tensorflow/core/platform/logging.h"
|
||||
#include "tensorflow/core/platform/types.h"
|
||||
#include "tensorflow/core/profiler/protobuf/steps_db.pb.h"
|
||||
#include "tensorflow/core/profiler/utils/event_span.h"
|
||||
#include "tensorflow/core/profiler/utils/timespan.h"
|
||||
|
||||
namespace tensorflow {
|
||||
namespace profiler {
|
||||
|
@ -16,6 +16,7 @@ limitations under the License.
|
||||
#ifndef TENSORFLOW_CORE_PROFILER_CONVERT_STEP_EVENTS_TO_STEPS_DB_H_
|
||||
#define TENSORFLOW_CORE_PROFILER_CONVERT_STEP_EVENTS_TO_STEPS_DB_H_
|
||||
|
||||
#include "tensorflow/core/platform/types.h"
|
||||
#include "tensorflow/core/profiler/protobuf/steps_db.pb.h"
|
||||
#include "tensorflow/core/profiler/utils/event_span.h"
|
||||
|
||||
|
@ -15,9 +15,14 @@ limitations under the License.
|
||||
|
||||
#include "tensorflow/core/profiler/convert/trace_events_to_json.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <map>
|
||||
#include <utility>
|
||||
|
||||
#include "absl/strings/str_cat.h"
|
||||
#include "absl/strings/str_format.h"
|
||||
#include "include/json/json.h"
|
||||
#include "tensorflow/core/platform/types.h"
|
||||
#include "tensorflow/core/profiler/protobuf/trace_events.pb.h"
|
||||
|
||||
namespace tensorflow {
|
||||
|
@ -15,16 +15,20 @@ limitations under the License.
|
||||
|
||||
#include "tensorflow/core/profiler/convert/xplane_to_kernel_stats_db.h"
|
||||
|
||||
#include <functional>
|
||||
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "absl/types/optional.h"
|
||||
#include "tensorflow/core/platform/logging.h"
|
||||
#include "tensorflow/core/platform/types.h"
|
||||
#include "tensorflow/core/profiler/protobuf/kernel_stats.pb.h"
|
||||
#include "tensorflow/core/profiler/utils/event_span.h"
|
||||
#include "tensorflow/core/profiler/protobuf/xplane.pb.h"
|
||||
#include "tensorflow/core/profiler/utils/kernel_stats_utils.h"
|
||||
#include "tensorflow/core/profiler/utils/tf_op_utils.h"
|
||||
#include "tensorflow/core/profiler/utils/tf_xplane_visitor.h"
|
||||
#include "tensorflow/core/profiler/utils/trace_utils.h"
|
||||
#include "tensorflow/core/profiler/utils/xplane_schema.h"
|
||||
#include "tensorflow/core/profiler/utils/xplane_utils.h"
|
||||
#include "tensorflow/core/profiler/utils/xplane_visitor.h"
|
||||
|
||||
namespace tensorflow {
|
||||
namespace profiler {
|
||||
|
@ -17,9 +17,7 @@ limitations under the License.
|
||||
#define TENSORFLOW_CORE_PROFILER_CONVERT_XPLANE_TO_KERNEL_STATS_DB_H_
|
||||
|
||||
#include <functional>
|
||||
#include <vector>
|
||||
|
||||
#include "tensorflow/core/platform/types.h"
|
||||
#include "tensorflow/core/profiler/protobuf/kernel_stats.pb.h"
|
||||
#include "tensorflow/core/profiler/protobuf/xplane.pb.h"
|
||||
#include "tensorflow/core/profiler/utils/xplane_visitor.h"
|
||||
@ -31,6 +29,7 @@ KernelStatsDb ConvertDeviceTraceXPlaneToKernelStatsDb(
|
||||
const XPlane& device_trace,
|
||||
const std::function<void(const XEventVisitor&, KernelReport*)>&
|
||||
on_kernel_fn);
|
||||
|
||||
} // namespace profiler
|
||||
} // namespace tensorflow
|
||||
|
||||
|
@ -15,21 +15,28 @@ limitations under the License.
|
||||
|
||||
#include "tensorflow/core/profiler/convert/xplane_to_memory_profile.h"
|
||||
|
||||
#include <cstddef>
|
||||
#include <algorithm>
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "absl/algorithm/container.h"
|
||||
#include "absl/container/flat_hash_map.h"
|
||||
#include "absl/strings/str_format.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "absl/types/optional.h"
|
||||
#include "tensorflow/core/framework/types.h"
|
||||
#include "tensorflow/core/framework/types.pb.h"
|
||||
#include "tensorflow/core/platform/logging.h"
|
||||
#include "tensorflow/core/platform/protobuf.h"
|
||||
#include "tensorflow/core/platform/types.h"
|
||||
#include "tensorflow/core/profiler/protobuf/memory_profile.pb.h"
|
||||
#include "tensorflow/core/profiler/protobuf/xplane.pb.h"
|
||||
#include "tensorflow/core/profiler/utils/tf_xplane_visitor.h"
|
||||
#include "tensorflow/core/profiler/utils/xplane_schema.h"
|
||||
#include "tensorflow/core/profiler/utils/xplane_utils.h"
|
||||
#include "tensorflow/core/profiler/utils/xplane_visitor.h"
|
||||
|
||||
namespace tensorflow {
|
||||
namespace profiler {
|
||||
|
@ -15,7 +15,11 @@ limitations under the License.
|
||||
|
||||
#include "tensorflow/core/profiler/convert/xplane_to_memory_profile.h"
|
||||
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "tensorflow/core/platform/test.h"
|
||||
#include "tensorflow/core/platform/types.h"
|
||||
#include "tensorflow/core/profiler/protobuf/memory_profile.pb.h"
|
||||
#include "tensorflow/core/profiler/protobuf/xplane.pb.h"
|
||||
#include "tensorflow/core/profiler/utils/xplane_builder.h"
|
||||
#include "tensorflow/core/profiler/utils/xplane_schema.h"
|
||||
#include "tensorflow/core/profiler/utils/xplane_utils.h"
|
||||
|
@ -15,21 +15,31 @@ limitations under the License.
|
||||
|
||||
#include "tensorflow/core/profiler/convert/xplane_to_op_metrics_db.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "absl/algorithm/container.h"
|
||||
#include "absl/container/flat_hash_map.h"
|
||||
#include "absl/strings/str_cat.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "absl/types/optional.h"
|
||||
#include "tensorflow/core/lib/gtl/map_util.h"
|
||||
#include "tensorflow/core/platform/logging.h"
|
||||
#include "tensorflow/core/platform/types.h"
|
||||
#include "tensorflow/core/profiler/convert/op_metrics_db_combiner.h"
|
||||
#include "tensorflow/core/profiler/convert/op_stack.h"
|
||||
#include "tensorflow/core/profiler/protobuf/op_metrics.pb.h"
|
||||
#include "tensorflow/core/profiler/protobuf/xplane.pb.h"
|
||||
#include "tensorflow/core/profiler/utils/cost_utils.h"
|
||||
#include "tensorflow/core/profiler/utils/op_metrics_db_utils.h"
|
||||
#include "tensorflow/core/profiler/utils/op_utils.h"
|
||||
#include "tensorflow/core/profiler/utils/tf_op_utils.h"
|
||||
#include "tensorflow/core/profiler/utils/tf_xplane_visitor.h"
|
||||
#include "tensorflow/core/profiler/utils/timespan.h"
|
||||
#include "tensorflow/core/profiler/utils/trace_utils.h"
|
||||
#include "tensorflow/core/profiler/utils/xplane_schema.h"
|
||||
#include "tensorflow/core/profiler/utils/xplane_visitor.h"
|
||||
|
||||
namespace tensorflow {
|
||||
namespace profiler {
|
||||
|
@ -21,10 +21,9 @@ limitations under the License.
|
||||
#include "tensorflow/core/profiler/convert/op_metrics_db_combiner.h"
|
||||
#include "tensorflow/core/profiler/protobuf/op_metrics.pb.h"
|
||||
#include "tensorflow/core/profiler/protobuf/xplane.pb.h"
|
||||
#include "tensorflow/core/profiler/utils/event_span.h"
|
||||
#include "tensorflow/core/profiler/utils/op_utils.h"
|
||||
#include "tensorflow/core/profiler/utils/tf_op_utils.h"
|
||||
#include "tensorflow/core/profiler/utils/tf_xplane_visitor.h"
|
||||
#include "tensorflow/core/profiler/utils/xplane_visitor.h"
|
||||
|
||||
namespace tensorflow {
|
||||
namespace profiler {
|
||||
|
@ -15,9 +15,12 @@ limitations under the License.
|
||||
|
||||
#include "tensorflow/core/profiler/convert/xplane_to_op_metrics_db.h"
|
||||
|
||||
#include "absl/strings/str_cat.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "tensorflow/core/platform/test.h"
|
||||
#include "tensorflow/core/platform/types.h"
|
||||
#include "tensorflow/core/profiler/protobuf/op_metrics.pb.h"
|
||||
#include "tensorflow/core/profiler/protobuf/xplane.pb.h"
|
||||
#include "tensorflow/core/profiler/utils/op_metrics_db_utils.h"
|
||||
#include "tensorflow/core/profiler/utils/time_utils.h"
|
||||
#include "tensorflow/core/profiler/utils/xplane_builder.h"
|
||||
|
@ -15,7 +15,11 @@ limitations under the License.
|
||||
|
||||
#include "tensorflow/core/profiler/convert/xplane_to_op_stats.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "absl/container/flat_hash_map.h"
|
||||
#include "tensorflow/core/platform/types.h"
|
||||
#include "tensorflow/core/profiler/convert/op_metrics_db_combiner.h"
|
||||
#include "tensorflow/core/profiler/convert/step_events_to_steps_db.h"
|
||||
#include "tensorflow/core/profiler/convert/xplane_to_kernel_stats_db.h"
|
||||
#include "tensorflow/core/profiler/convert/xplane_to_op_metrics_db.h"
|
||||
@ -23,12 +27,19 @@ limitations under the License.
|
||||
#include "tensorflow/core/profiler/convert/xplane_to_tf_functions.h"
|
||||
#include "tensorflow/core/profiler/protobuf/hardware_types.pb.h"
|
||||
#include "tensorflow/core/profiler/protobuf/kernel_stats.pb.h"
|
||||
#include "tensorflow/core/profiler/protobuf/op_metrics.pb.h"
|
||||
#include "tensorflow/core/profiler/protobuf/op_stats.pb.h"
|
||||
#include "tensorflow/core/profiler/protobuf/steps_db.pb.h"
|
||||
#include "tensorflow/core/profiler/protobuf/tf_function.pb.h"
|
||||
#include "tensorflow/core/profiler/protobuf/xplane.pb.h"
|
||||
#include "tensorflow/core/profiler/utils/event_span.h"
|
||||
#include "tensorflow/core/profiler/utils/hardware_type_utils.h"
|
||||
#include "tensorflow/core/profiler/utils/kernel_stats_utils.h"
|
||||
#include "tensorflow/core/profiler/utils/tf_op_utils.h"
|
||||
#include "tensorflow/core/profiler/utils/tf_xplane_visitor.h"
|
||||
#include "tensorflow/core/profiler/utils/xplane_schema.h"
|
||||
#include "tensorflow/core/profiler/utils/xplane_utils.h"
|
||||
#include "tensorflow/core/profiler/utils/xplane_visitor.h"
|
||||
|
||||
namespace tensorflow {
|
||||
namespace profiler {
|
||||
|
@ -15,10 +15,14 @@ limitations under the License.
|
||||
|
||||
#include "tensorflow/core/profiler/convert/xplane_to_op_stats.h"
|
||||
|
||||
#include "absl/strings/str_cat.h"
|
||||
#include "tensorflow/core/platform/test.h"
|
||||
#include "tensorflow/core/profiler/convert/xplane_to_tf_functions.h"
|
||||
#include "tensorflow/core/platform/types.h"
|
||||
#include "tensorflow/core/profiler/protobuf/op_metrics.pb.h"
|
||||
#include "tensorflow/core/profiler/protobuf/op_stats.pb.h"
|
||||
#include "tensorflow/core/profiler/protobuf/steps_db.pb.h"
|
||||
#include "tensorflow/core/profiler/protobuf/tf_function.pb.h"
|
||||
#include "tensorflow/core/profiler/protobuf/xplane.pb.h"
|
||||
#include "tensorflow/core/profiler/utils/group_events.h"
|
||||
#include "tensorflow/core/profiler/utils/xplane_builder.h"
|
||||
#include "tensorflow/core/profiler/utils/xplane_schema.h"
|
||||
|
@ -15,7 +15,10 @@ limitations under the License.
|
||||
#include "tensorflow/core/profiler/convert/xplane_to_profile_response.h"
|
||||
|
||||
#include "absl/container/flat_hash_set.h"
|
||||
#include "absl/strings/str_cat.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "tensorflow/core/platform/errors.h"
|
||||
#include "tensorflow/core/platform/status.h"
|
||||
#include "tensorflow/core/platform/types.h"
|
||||
#include "tensorflow/core/profiler/convert/op_stats_to_input_pipeline_analysis.h"
|
||||
#include "tensorflow/core/profiler/convert/op_stats_to_overview_page.h"
|
||||
@ -32,6 +35,7 @@ limitations under the License.
|
||||
#include "tensorflow/core/profiler/protobuf/op_stats.pb.h"
|
||||
#include "tensorflow/core/profiler/protobuf/overview_page.pb.h"
|
||||
#include "tensorflow/core/profiler/protobuf/tf_stats.pb.h"
|
||||
#include "tensorflow/core/profiler/protobuf/trace_events.pb.h"
|
||||
#include "tensorflow/core/profiler/protobuf/xplane.pb.h"
|
||||
#include "tensorflow/core/profiler/rpc/client/save_profile.h"
|
||||
#include "tensorflow/core/profiler/utils/xplane_schema.h"
|
||||
|
@ -15,8 +15,6 @@ limitations under the License.
|
||||
#ifndef TENSORFLOW_CORE_PROFILER_CONVERT_XPLANE_TO_PROFILE_RESPONSE_H_
|
||||
#define TENSORFLOW_CORE_PROFILER_CONVERT_XPLANE_TO_PROFILE_RESPONSE_H_
|
||||
|
||||
#include "absl/container/flat_hash_set.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "tensorflow/core/platform/status.h"
|
||||
#include "tensorflow/core/profiler/profiler_service.pb.h"
|
||||
#include "tensorflow/core/profiler/protobuf/xplane.pb.h"
|
||||
|
@ -14,13 +14,14 @@ limitations under the License.
|
||||
==============================================================================*/
|
||||
#include "tensorflow/core/profiler/convert/xplane_to_profile_response.h"
|
||||
|
||||
#include "tensorflow/core/platform/status.h"
|
||||
#include "tensorflow/core/platform/test.h"
|
||||
#include "tensorflow/core/profiler/profiler_service.pb.h"
|
||||
#include "tensorflow/core/profiler/protobuf/input_pipeline.pb.h"
|
||||
#include "tensorflow/core/profiler/protobuf/overview_page.pb.h"
|
||||
#include "tensorflow/core/profiler/protobuf/tf_stats.pb.h"
|
||||
#include "tensorflow/core/profiler/protobuf/xplane.pb.h"
|
||||
#include "tensorflow/core/profiler/utils/xplane_builder.h"
|
||||
#include "tensorflow/core/profiler/utils/xplane_schema.h"
|
||||
|
||||
namespace tensorflow {
|
||||
namespace profiler {
|
||||
|
@ -15,10 +15,18 @@ limitations under the License.
|
||||
|
||||
#include "tensorflow/core/profiler/convert/xplane_to_step_events.h"
|
||||
|
||||
#include "absl/container/flat_hash_map.h"
|
||||
#include "absl/strings/match.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "absl/types/optional.h"
|
||||
#include "tensorflow/core/platform/types.h"
|
||||
#include "tensorflow/core/profiler/protobuf/xplane.pb.h"
|
||||
#include "tensorflow/core/profiler/utils/event_span.h"
|
||||
#include "tensorflow/core/profiler/utils/tf_xplane_visitor.h"
|
||||
#include "tensorflow/core/profiler/utils/timespan.h"
|
||||
#include "tensorflow/core/profiler/utils/trace_utils.h"
|
||||
#include "tensorflow/core/profiler/utils/xplane_schema.h"
|
||||
#include "tensorflow/core/profiler/utils/xplane_visitor.h"
|
||||
|
||||
namespace tensorflow {
|
||||
namespace profiler {
|
||||
|
@ -18,7 +18,7 @@ limitations under the License.
|
||||
|
||||
#include "tensorflow/core/profiler/protobuf/xplane.pb.h"
|
||||
#include "tensorflow/core/profiler/utils/event_span.h"
|
||||
#include "tensorflow/core/profiler/utils/tf_xplane_visitor.h"
|
||||
#include "tensorflow/core/profiler/utils/xplane_visitor.h"
|
||||
|
||||
namespace tensorflow {
|
||||
namespace profiler {
|
||||
|
@ -15,7 +15,13 @@ limitations under the License.
|
||||
|
||||
#include "tensorflow/core/profiler/convert/xplane_to_step_events.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "absl/container/flat_hash_map.h"
|
||||
#include "tensorflow/core/platform/test.h"
|
||||
#include "tensorflow/core/platform/types.h"
|
||||
#include "tensorflow/core/profiler/protobuf/xplane.pb.h"
|
||||
#include "tensorflow/core/profiler/utils/event_span.h"
|
||||
#include "tensorflow/core/profiler/utils/group_events.h"
|
||||
#include "tensorflow/core/profiler/utils/xplane_builder.h"
|
||||
#include "tensorflow/core/profiler/utils/xplane_schema.h"
|
||||
|
@ -15,11 +15,16 @@ limitations under the License.
|
||||
|
||||
#include "tensorflow/core/profiler/convert/xplane_to_tf_functions.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <stack>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "absl/algorithm/container.h"
|
||||
#include "absl/container/flat_hash_map.h"
|
||||
#include "absl/strings/str_cat.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "absl/types/optional.h"
|
||||
#include "tensorflow/core/lib/gtl/map_util.h"
|
||||
#include "tensorflow/core/platform/logging.h"
|
||||
#include "tensorflow/core/platform/protobuf.h"
|
||||
@ -29,7 +34,6 @@ limitations under the License.
|
||||
#include "tensorflow/core/profiler/utils/tf_xplane_visitor.h"
|
||||
#include "tensorflow/core/profiler/utils/timespan.h"
|
||||
#include "tensorflow/core/profiler/utils/xplane_schema.h"
|
||||
#include "tensorflow/core/profiler/utils/xplane_utils.h"
|
||||
#include "tensorflow/core/profiler/utils/xplane_visitor.h"
|
||||
|
||||
namespace tensorflow {
|
||||
|
@ -16,8 +16,9 @@ limitations under the License.
|
||||
#ifndef TENSORFLOW_CORE_PROFILER_CONVERT_XPLANE_TO_TF_FUNCTIONS_H_
|
||||
#define TENSORFLOW_CORE_PROFILER_CONVERT_XPLANE_TO_TF_FUNCTIONS_H_
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "tensorflow/core/profiler/protobuf/tf_function.pb.h"
|
||||
#include "tensorflow/core/profiler/protobuf/xplane.pb.h"
|
||||
#include "tensorflow/core/profiler/utils/xplane_visitor.h"
|
||||
|
||||
namespace tensorflow {
|
||||
|
@ -15,12 +15,17 @@ limitations under the License.
|
||||
|
||||
#include "tensorflow/core/profiler/convert/xplane_to_tf_functions.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "tensorflow/core/platform/test.h"
|
||||
#include "tensorflow/core/profiler/protobuf/tf_function.pb.h"
|
||||
#include "tensorflow/core/profiler/protobuf/xplane.pb.h"
|
||||
#include "tensorflow/core/profiler/utils/tf_xplane_visitor.h"
|
||||
#include "tensorflow/core/profiler/utils/xplane_builder.h"
|
||||
#include "tensorflow/core/profiler/utils/xplane_schema.h"
|
||||
#include "tensorflow/core/profiler/utils/xplane_utils.h"
|
||||
#include "tensorflow/core/profiler/utils/xplane_visitor.h"
|
||||
|
||||
namespace tensorflow {
|
||||
namespace profiler {
|
||||
|
@ -15,8 +15,21 @@ limitations under the License.
|
||||
|
||||
#include "tensorflow/core/profiler/convert/xplane_to_trace_events.h"
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <iterator>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "absl/types/optional.h"
|
||||
#include "tensorflow/core/platform/types.h"
|
||||
#include "tensorflow/core/profiler/protobuf/trace_events.pb.h"
|
||||
#include "tensorflow/core/profiler/protobuf/xplane.pb.h"
|
||||
#include "tensorflow/core/profiler/utils/tf_xplane_visitor.h"
|
||||
#include "tensorflow/core/profiler/utils/xplane_schema.h"
|
||||
#include "tensorflow/core/profiler/utils/xplane_visitor.h"
|
||||
|
||||
namespace tensorflow {
|
||||
namespace profiler {
|
||||
|
@ -16,7 +16,8 @@ limitations under the License.
|
||||
#ifndef TENSORFLOW_CORE_PROFILER_CONVERT_XPLANE_TO_TRACE_EVENTS_H_
|
||||
#define TENSORFLOW_CORE_PROFILER_CONVERT_XPLANE_TO_TRACE_EVENTS_H_
|
||||
|
||||
#include "absl/strings/str_split.h"
|
||||
#include <string>
|
||||
|
||||
#include "tensorflow/core/platform/types.h"
|
||||
#include "tensorflow/core/profiler/protobuf/trace_events.pb.h"
|
||||
#include "tensorflow/core/profiler/protobuf/xplane.pb.h"
|
||||
|
@ -16,8 +16,9 @@ limitations under the License.
|
||||
#include "tensorflow/core/profiler/convert/xplane_to_trace_events.h"
|
||||
|
||||
#include "tensorflow/core/platform/test.h"
|
||||
#include "tensorflow/core/profiler/protobuf/trace_events.pb.h"
|
||||
#include "tensorflow/core/profiler/protobuf/xplane.pb.h"
|
||||
#include "tensorflow/core/profiler/utils/xplane_builder.h"
|
||||
#include "tensorflow/core/profiler/utils/xplane_schema.h"
|
||||
|
||||
namespace tensorflow {
|
||||
namespace profiler {
|
||||
|
Loading…
x
Reference in New Issue
Block a user