Internal change

PiperOrigin-RevId: 335914063
Change-Id: Ic2c1417d1b0a35f65b09bea46078b0e50ca71c0d
This commit is contained in:
Jose Baiocchi 2020-10-07 11:31:59 -07:00 committed by TensorFlower Gardener
parent f21878afe2
commit 6f8ee54073
11 changed files with 102 additions and 21 deletions

View File

@ -12,3 +12,6 @@ def if_profiler_oss(if_true, if_false = []):
"//tensorflow/core/profiler/builds:profiler_build_oss": if_true,
"//conditions:default": if_false,
})
def tf_profiler_copts():
return if_profiler_oss(["-Wc++14-compat"])

View File

@ -1,5 +1,6 @@
load("//tensorflow/core/platform:rules_cc.bzl", "cc_library")
load("//tensorflow:tensorflow.bzl", "tf_cc_test")
load("//tensorflow/core/profiler/builds:build_config.bzl", "tf_profiler_copts")
package(
default_visibility = ["//tensorflow/core/profiler:internal"],
@ -10,6 +11,7 @@ cc_library(
name = "xplane_to_op_metrics_db",
srcs = ["xplane_to_op_metrics_db.cc"],
hdrs = ["xplane_to_op_metrics_db.h"],
copts = tf_profiler_copts(),
deps = [
":op_metrics_db_combiner",
":op_stack",
@ -57,6 +59,7 @@ cc_library(
name = "op_metrics_db_combiner",
srcs = ["op_metrics_db_combiner.cc"],
hdrs = ["op_metrics_db_combiner.h"],
copts = tf_profiler_copts(),
deps = [
"//tensorflow/core:lib",
"//tensorflow/core/platform:protobuf",
@ -70,6 +73,7 @@ cc_library(
name = "op_metrics_to_record",
srcs = ["op_metrics_to_record.cc"],
hdrs = ["op_metrics_to_record.h"],
copts = tf_profiler_copts(),
deps = [
"//tensorflow/core/profiler/protobuf:op_metrics_proto_cc",
"//tensorflow/core/profiler/utils:math_utils",
@ -81,6 +85,7 @@ cc_library(
cc_library(
name = "op_stack",
hdrs = ["op_stack.h"],
copts = tf_profiler_copts(),
deps = [
"//tensorflow/core:lib",
],
@ -90,6 +95,7 @@ cc_library(
name = "op_stats_to_overview_page",
srcs = ["op_stats_to_overview_page.cc"],
hdrs = ["op_stats_to_overview_page.h"],
copts = tf_profiler_copts(),
deps = [
":op_metrics_to_record",
":op_stats_to_input_pipeline_analysis",
@ -113,7 +119,6 @@ cc_library(
"//tensorflow/core/profiler/utils:tf_op_utils",
"//tensorflow/core/profiler/utils:time_utils",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:str_format",
],
)
@ -121,6 +126,7 @@ cc_library(
name = "op_stats_to_pod_stats",
srcs = ["op_stats_to_pod_stats.cc"],
hdrs = ["op_stats_to_pod_stats.h"],
copts = tf_profiler_copts(),
deps = [
"//tensorflow/core:lib",
"//tensorflow/core/profiler/protobuf:op_stats_proto_cc",
@ -156,6 +162,7 @@ cc_library(
name = "op_stats_to_pod_viewer",
srcs = ["op_stats_to_pod_viewer.cc"],
hdrs = ["op_stats_to_pod_viewer.h"],
copts = tf_profiler_copts(),
deps = [
":op_stats_to_pod_stats",
"//tensorflow/core:lib",
@ -194,6 +201,7 @@ cc_library(
name = "op_stats_to_input_pipeline_analysis",
srcs = ["op_stats_to_input_pipeline_analysis.cc"],
hdrs = ["op_stats_to_input_pipeline_analysis.h"],
copts = tf_profiler_copts(),
deps = [
":op_metrics_to_record",
":step_events_to_steps_db",
@ -223,6 +231,7 @@ cc_library(
name = "op_stats_to_tf_stats",
srcs = ["op_stats_to_tf_stats.cc"],
hdrs = ["op_stats_to_tf_stats.h"],
copts = tf_profiler_copts(),
deps = [
":op_metrics_to_record",
"//tensorflow/core:lib",
@ -263,6 +272,7 @@ cc_library(
name = "step_events_to_steps_db",
srcs = ["step_events_to_steps_db.cc"],
hdrs = ["step_events_to_steps_db.h"],
copts = tf_profiler_copts(),
deps = [
"//tensorflow/core:lib",
"//tensorflow/core:lib_internal",
@ -278,6 +288,7 @@ cc_library(
name = "trace_events_to_json",
srcs = ["trace_events_to_json.cc"],
hdrs = ["trace_events_to_json.h"],
copts = tf_profiler_copts(),
deps = [
"//tensorflow/core:lib",
"//tensorflow/core/platform:protobuf",
@ -307,6 +318,7 @@ cc_library(
name = "xplane_to_op_stats",
srcs = ["xplane_to_op_stats.cc"],
hdrs = ["xplane_to_op_stats.h"],
copts = tf_profiler_copts(),
deps = [
":op_metrics_db_combiner",
":op_stats_combiner",
@ -369,6 +381,7 @@ cc_library(
name = "xplane_to_profile_response",
srcs = ["xplane_to_profile_response.cc"],
hdrs = ["xplane_to_profile_response.h"],
copts = tf_profiler_copts(),
deps = [
":op_stats_to_input_pipeline_analysis",
":op_stats_to_overview_page",
@ -421,6 +434,7 @@ cc_library(
name = "xplane_to_step_events",
srcs = ["xplane_to_step_events.cc"],
hdrs = ["xplane_to_step_events.h"],
copts = tf_profiler_copts(),
deps = [
"//tensorflow/core:lib",
"//tensorflow/core/profiler/protobuf:steps_db_proto_cc",
@ -460,6 +474,7 @@ cc_library(
name = "xplane_to_trace_events",
srcs = ["xplane_to_trace_events.cc"],
hdrs = ["xplane_to_trace_events.h"],
copts = tf_profiler_copts(),
deps = [
"//tensorflow/core:lib",
"//tensorflow/core/profiler/protobuf:trace_events_proto_cc",
@ -495,6 +510,7 @@ cc_library(
name = "xplane_to_kernel_stats_db",
srcs = ["xplane_to_kernel_stats_db.cc"],
hdrs = ["xplane_to_kernel_stats_db.h"],
copts = tf_profiler_copts(),
deps = [
"//tensorflow/core:lib",
"//tensorflow/core:lib_internal",
@ -537,6 +553,7 @@ cc_library(
name = "xplane_to_tf_functions",
srcs = ["xplane_to_tf_functions.cc"],
hdrs = ["xplane_to_tf_functions.h"],
copts = tf_profiler_copts(),
deps = [
"//tensorflow/core:lib",
"//tensorflow/core:lib_internal",
@ -581,6 +598,7 @@ cc_library(
name = "xplane_to_memory_profile",
srcs = ["xplane_to_memory_profile.cc"],
hdrs = ["xplane_to_memory_profile.h"],
copts = tf_profiler_copts(),
deps = [
"//tensorflow/core:framework",
"//tensorflow/core:lib",
@ -624,6 +642,7 @@ cc_library(
name = "op_stats_combiner",
srcs = ["op_stats_combiner.cc"],
hdrs = ["op_stats_combiner.h"],
copts = tf_profiler_copts(),
deps = [
":op_metrics_db_combiner",
":xplane_to_tf_functions",
@ -644,6 +663,7 @@ cc_library(
name = "post_process_single_host_xplane",
srcs = ["post_process_single_host_xplane.cc"],
hdrs = ["post_process_single_host_xplane.h"],
copts = tf_profiler_copts(),
visibility = ["//tensorflow/core/profiler:internal"],
deps = [
"//tensorflow/core:lib",
@ -659,6 +679,7 @@ cc_library(
name = "xplane_to_tools_data",
srcs = ["xplane_to_tools_data.cc"],
hdrs = ["xplane_to_tools_data.h"],
copts = tf_profiler_copts(),
deps = [
":op_stats_to_input_pipeline_analysis",
":op_stats_to_overview_page",
@ -681,6 +702,7 @@ cc_library(
name = "xplane_to_tf_data_stats",
srcs = ["xplane_to_tf_data_stats.cc"],
hdrs = ["xplane_to_tf_data_stats.h"],
copts = tf_profiler_copts(),
deps = [
"//tensorflow/core:lib_internal",
"//tensorflow/core/platform:protobuf",

View File

@ -1,6 +1,7 @@
load("//tensorflow/core/platform:build_config_root.bzl", "if_static")
load("//tensorflow/core/platform:rules_cc.bzl", "cc_library")
load("//tensorflow:tensorflow.bzl", "tf_cc_test")
load("//tensorflow/core/profiler/builds:build_config.bzl", "tf_profiler_copts")
package(
default_visibility = ["//tensorflow:internal"],
@ -11,6 +12,7 @@ cc_library(
name = "host_tracer_utils",
srcs = ["host_tracer_utils.cc"],
hdrs = ["host_tracer_utils.h"],
copts = tf_profiler_copts(),
visibility = ["//tensorflow/core/profiler:friends"],
deps = [
":traceme_recorder",
@ -28,6 +30,7 @@ cc_library(
cc_library(
name = "host_tracer",
srcs = ["host_tracer.cc"],
copts = tf_profiler_copts(),
deps = [
":host_tracer_utils",
":traceme_recorder",
@ -69,6 +72,7 @@ tf_cc_test(
cc_library(
name = "traceme_recorder",
hdrs = ["traceme_recorder.h"],
copts = tf_profiler_copts(),
visibility = ["//tensorflow/core/profiler:internal"],
deps = [
"@com_google_absl//absl/container:flat_hash_map",
@ -84,6 +88,7 @@ cc_library(
"traceme_recorder.cc",
"traceme_recorder.h",
],
copts = tf_profiler_copts(),
visibility = [
"//tensorflow/core/profiler:__pkg__",
"//tensorflow/python:__pkg__",
@ -110,6 +115,7 @@ tf_cc_test(
cc_library(
name = "annotation_stack",
hdrs = ["annotation_stack.h"],
copts = tf_profiler_copts(),
visibility = ["//tensorflow/core/profiler:internal"],
deps = [
"@com_google_absl//absl/strings",
@ -125,6 +131,7 @@ cc_library(
"annotation_stack.cc",
"annotation_stack.h",
],
copts = tf_profiler_copts(),
visibility = [
"//tensorflow/core/profiler:__pkg__",
"//tensorflow/python:__pkg__",
@ -139,7 +146,7 @@ cc_library(
cc_library(
name = "python_tracer",
srcs = ["python_tracer.cc"],
copts = ["-fexceptions"],
copts = tf_profiler_copts() + ["-fexceptions"],
features = ["-use_header_modules"],
deps = [
"//tensorflow/core:lib",
@ -156,6 +163,7 @@ cc_library(
cc_library(
name = "metadata_collector",
srcs = ["metadata_collector.cc"],
copts = tf_profiler_copts(),
deps = [
"//tensorflow/compiler/xla/service:hlo_proto_cc",
"//tensorflow/compiler/xla/service/gpu:gpu_debug_info_manager",

View File

@ -18,7 +18,19 @@ limitations under the License.
#include <utility>
#include <vector>
#if defined(__clang__) && __cplusplus >= 201703L // clang C++17
#define TF_PROFILER_DISABLE_CXX17_WARNINGS \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Wc++98-c++11-c++14-compat\"")
#define TF_PROFILER_ENABLE_CXX17_WARNINGS _Pragma("clang diagnostic pop")
#else
#define TF_PROFILER_DISABLE_CXX17_WARNINGS
#define TF_PROFILER_ENABLE_CXX17_WARNINGS
#endif
TF_PROFILER_DISABLE_CXX17_WARNINGS
#include "tensorflow/compiler/xla/service/gpu/gpu_debug_info_manager.h"
TF_PROFILER_ENABLE_CXX17_WARNINGS
#include "tensorflow/compiler/xla/service/hlo.pb.h"
#include "tensorflow/core/platform/macros.h"
#include "tensorflow/core/platform/status.h"

View File

@ -19,6 +19,7 @@ load(
"//tensorflow/stream_executor:build_defs.bzl",
"tf_additional_cupti_deps",
)
load("//tensorflow/core/profiler/builds:build_config.bzl", "tf_profiler_copts")
package(
default_visibility = ["//tensorflow:internal"],
@ -28,7 +29,7 @@ package(
tf_cuda_library(
name = "device_tracer",
srcs = tf_additional_device_tracer_srcs(),
copts = tf_copts(),
copts = tf_profiler_copts() + tf_copts(),
cuda_deps = [
"//tensorflow/core/profiler/internal/gpu:cupti_tracer",
"//tensorflow/core/profiler/internal/gpu:cupti_wrapper",
@ -94,7 +95,7 @@ tf_cc_test_gpu(
tf_cuda_library(
name = "cupti_interface",
hdrs = if_cuda_is_configured_compat(["cupti_interface.h"]),
copts = tf_copts(),
copts = tf_profiler_copts() + tf_copts(),
visibility = ["//visibility:public"],
deps = [
"//tensorflow/core:lib",
@ -112,7 +113,7 @@ tf_cuda_library(
name = "cupti_wrapper",
srcs = if_cuda_is_configured_compat(["cupti_wrapper.cc"]),
hdrs = if_cuda_is_configured_compat(["cupti_wrapper.h"]),
copts = tf_copts(),
copts = tf_profiler_copts() + tf_copts(),
linkstatic = 1,
visibility = ["//visibility:public"],
deps = [
@ -124,7 +125,7 @@ tf_cuda_library(
name = "cupti_tracer",
srcs = if_cuda_is_configured_compat(["cupti_tracer.cc"]),
hdrs = if_cuda_is_configured_compat(["cupti_tracer.h"]),
copts = tf_copts(),
copts = tf_profiler_copts() + tf_copts(),
visibility = ["//visibility:public"],
deps = [
":cupti_interface",
@ -142,7 +143,7 @@ tf_cuda_library(
tf_cuda_library(
name = "cupti_utils",
srcs = if_cuda_is_configured_compat(["cupti_utils.cc"]),
copts = tf_copts(),
copts = tf_profiler_copts() + tf_copts(),
cuda_deps = [
":cupti_interface",
":cupti_wrapper",

View File

@ -1,12 +1,9 @@
load("//tensorflow/core/platform:rules_cc.bzl", "cc_library")
load("//tensorflow/core/platform:build_config_root.bzl", "if_static")
load("//tensorflow:tensorflow.bzl", "if_not_android", "tf_cc_test", "tf_cuda_library")
# buildifier: disable=same-origin-load
load("//tensorflow:tensorflow.bzl", "filegroup")
# buildifier: disable=same-origin-load
load("//tensorflow:tensorflow.bzl", "tf_pybind_cc_library_wrapper")
load("//tensorflow:tensorflow.bzl", "filegroup") # buildifier: disable=same-origin-load
load("//tensorflow:tensorflow.bzl", "tf_pybind_cc_library_wrapper") # buildifier: disable=same-origin-load
load("//tensorflow/core/profiler/builds:build_config.bzl", "tf_profiler_copts")
package(
default_visibility = [
@ -46,6 +43,7 @@ cc_library(
"profiler_session.cc",
"profiler_session.h",
],
copts = tf_profiler_copts(),
visibility = [
"//tensorflow/core/profiler:__pkg__",
"//tensorflow/python:__pkg__",
@ -100,6 +98,7 @@ cc_library(
name = "local_profiler_impl",
srcs = ["local_profiler.cc"],
hdrs = ["local_profiler.h"],
copts = tf_profiler_copts(),
visibility = ["//tensorflow/core/profiler:internal"],
deps = [
":profiler_interface",
@ -138,6 +137,7 @@ cc_library(
"profiler_factory.cc",
"profiler_factory.h",
],
copts = tf_profiler_copts(),
visibility = [
"//tensorflow/core/profiler:__pkg__",
],
@ -152,6 +152,7 @@ cc_library(
cc_library(
name = "profiler_interface",
hdrs = ["profiler_interface.h"],
copts = tf_profiler_copts(),
deps = [
"//tensorflow/core:lib",
"//tensorflow/core:protos_all_cc",
@ -278,6 +279,7 @@ cc_library(
name = "profiler_lock",
srcs = ["profiler_lock.cc"],
hdrs = ["profiler_lock.h"],
copts = tf_profiler_copts(),
visibility = ["//tensorflow/core/profiler:internal"],
)

View File

@ -2,12 +2,10 @@ load("//tensorflow/core/platform:rules_cc.bzl", "cc_library")
load("//tensorflow:tensorflow.bzl", "tf_external_workspace_visible") # buildifier: disable=same-origin-load
load("//tensorflow:tensorflow.bzl", "tf_grpc_cc_dependency") # buildifier: disable=same-origin-load
load("//tensorflow:tensorflow.bzl", "tf_pybind_cc_library_wrapper") # buildifier: disable=same-origin-load
load("//tensorflow/core/profiler/builds:build_config.bzl", "tf_profiler_alias")
load("//tensorflow/core/profiler/builds:build_config.bzl", "tf_profiler_alias", "tf_profiler_copts")
package(
default_visibility = [
"//tensorflow/core/profiler:internal",
],
default_visibility = ["//tensorflow/core/profiler:internal"],
licenses = ["notice"], # Apache 2.0
)
@ -31,6 +29,7 @@ cc_library(
name = "profiler_service_impl",
srcs = ["profiler_service_impl.cc"],
hdrs = ["profiler_service_impl.h"],
copts = tf_profiler_copts(),
features = ["-layering_check"],
visibility = tf_external_workspace_visible(
[
@ -53,6 +52,7 @@ cc_library(
name = "profiler_server_impl",
srcs = ["profiler_server.cc"],
hdrs = ["profiler_server.h"],
copts = tf_profiler_copts(),
visibility = [
"//tensorflow/compiler/xla/python:__pkg__",
"//tensorflow/core/profiler:internal",

View File

@ -2,6 +2,7 @@ load("//tensorflow/core/platform:rules_cc.bzl", "cc_library")
load("//tensorflow:tensorflow.bzl", "tf_grpc_cc_dependency")
load("//tensorflow:tensorflow.bzl", "tf_pybind_cc_library_wrapper") # buildifier: disable=same-origin-load
load("//tensorflow:tensorflow.bzl", "tf_cc_test")
load("//tensorflow/core/profiler/builds:build_config.bzl", "tf_profiler_copts")
# For platform specific build config
load(
@ -18,6 +19,7 @@ cc_library(
name = "capture_profile",
srcs = ["capture_profile.cc"],
hdrs = ["capture_profile.h"],
copts = tf_profiler_copts(),
visibility = [
"//tensorflow/python/profiler/internal:__pkg__",
],
@ -38,6 +40,7 @@ cc_library(
name = "save_profile",
srcs = ["save_profile.cc"],
hdrs = ["save_profile.h"],
copts = tf_profiler_copts(),
visibility = ["//tensorflow/core/profiler:internal"],
deps = [
"//tensorflow/core:framework",
@ -54,6 +57,7 @@ cc_library(
name = "profiler_client_impl",
srcs = ["profiler_client.cc"],
hdrs = ["profiler_client.h"],
copts = tf_profiler_copts(),
visibility = ["//tensorflow/python:__pkg__"],
deps = [
"//tensorflow/core:lib",
@ -109,6 +113,7 @@ cc_library(
name = "remote_profiler_session_manager",
srcs = ["remote_profiler_session_manager.cc"],
hdrs = ["remote_profiler_session_manager.h"],
copts = tf_profiler_copts(),
visibility = ["//tensorflow/core/profiler:internal"],
deps = [
":profiler_client_impl",

View File

@ -1,10 +1,9 @@
load("//tensorflow/core/platform:rules_cc.bzl", "cc_library")
load("//tensorflow:tensorflow.bzl", "tf_grpc_cc_dependency")
load("//tensorflow/core/profiler/builds:build_config.bzl", "tf_profiler_copts")
package(
default_visibility = [
"//tensorflow/core/profiler:internal",
],
default_visibility = ["//tensorflow/core/profiler:internal"],
licenses = ["notice"], # Apache 2.0
)
@ -14,6 +13,7 @@ cc_library(
"grpc.cc",
"//tensorflow/core/profiler/rpc:grpc.h",
],
copts = tf_profiler_copts(),
deps = [
tf_grpc_cc_dependency(),
],

View File

@ -1,5 +1,6 @@
load("//tensorflow/core/platform:rules_cc.bzl", "cc_library")
load("//tensorflow:tensorflow.bzl", "tf_cc_test")
load("//tensorflow/core/profiler/builds:build_config.bzl", "tf_profiler_copts")
package(
default_visibility = ["//tensorflow/core/profiler:internal"],
@ -17,6 +18,7 @@ cc_library(
name = "diagnostics",
srcs = ["diagnostics.cc"],
hdrs = ["diagnostics.h"],
copts = tf_profiler_copts(),
deps = [
"//tensorflow/core:lib",
"//tensorflow/core/profiler/protobuf:diagnostics_proto_cc",
@ -31,6 +33,7 @@ cc_library(
name = "event_span",
srcs = ["event_span.cc"],
hdrs = ["event_span.h"],
copts = tf_profiler_copts(),
deps = [
":timespan",
"//tensorflow/core:lib",
@ -47,6 +50,7 @@ cc_library(
name = "hardware_type_utils",
srcs = ["hardware_type_utils.cc"],
hdrs = ["hardware_type_utils.h"],
copts = tf_profiler_copts(),
deps = [
"//tensorflow/core:lib",
"//tensorflow/core/profiler/protobuf:hardware_types_proto_cc",
@ -79,6 +83,7 @@ cc_library(
name = "op_metrics_db_utils",
srcs = ["op_metrics_db_utils.cc"],
hdrs = ["op_metrics_db_utils.h"],
copts = tf_profiler_copts(),
deps = [
":math_utils",
":tf_op_utils",
@ -104,6 +109,7 @@ cc_library(
name = "op_utils",
srcs = ["op_utils.cc"],
hdrs = ["op_utils.h"],
copts = tf_profiler_copts(),
deps = [
":op_metrics_db_utils",
":tf_op_utils",
@ -119,6 +125,7 @@ cc_library(
name = "tf_op_utils",
srcs = ["tf_op_utils.cc"],
hdrs = ["tf_op_utils.h"],
copts = tf_profiler_copts(),
deps = [
"//tensorflow/core:lib",
"//tensorflow/core:regexp_internal",
@ -141,6 +148,7 @@ tf_cc_test(
cc_library(
name = "timespan",
hdrs = ["timespan.h"],
copts = tf_profiler_copts(),
deps = [
":time_utils",
"//tensorflow/core:lib",
@ -161,6 +169,7 @@ tf_cc_test(
cc_library(
name = "time_utils",
hdrs = ["time_utils.h"],
copts = tf_profiler_copts(),
deps = [
"//tensorflow/core:lib",
],
@ -169,6 +178,7 @@ cc_library(
cc_library(
name = "trace_utils",
hdrs = ["trace_utils.h"],
copts = tf_profiler_copts(),
deps = [
"//tensorflow/core:lib",
],
@ -178,6 +188,7 @@ cc_library(
name = "xplane_builder",
srcs = ["xplane_builder.cc"],
hdrs = ["xplane_builder.h"],
copts = tf_profiler_copts(),
visibility = [":friends"],
deps = [
":time_utils",
@ -206,6 +217,7 @@ cc_library(
name = "xplane_schema",
srcs = ["xplane_schema.cc"],
hdrs = ["xplane_schema.h"],
copts = tf_profiler_copts(),
visibility = [":friends"],
deps = [
"//tensorflow/core:lib",
@ -220,6 +232,7 @@ cc_library(
name = "xplane_utils",
srcs = ["xplane_utils.cc"],
hdrs = ["xplane_utils.h"],
copts = tf_profiler_copts(),
visibility = [":friends"],
deps = [
":timespan",
@ -256,6 +269,7 @@ cc_library(
testonly = True,
srcs = ["xplane_test_utils.cc"],
hdrs = ["xplane_test_utils.h"],
copts = tf_profiler_copts(),
visibility = [":friends"],
deps = [
":xplane_builder",
@ -273,6 +287,7 @@ cc_library(
name = "xplane_visitor",
srcs = ["xplane_visitor.cc"],
hdrs = ["xplane_visitor.h"],
copts = tf_profiler_copts(),
visibility = [":friends"],
deps = [
":time_utils",
@ -289,6 +304,7 @@ cc_library(
cc_library(
name = "tf_xplane_visitor",
hdrs = ["tf_xplane_visitor.h"],
copts = tf_profiler_copts(),
visibility = [":friends"],
deps = [
":xplane_schema",
@ -301,6 +317,7 @@ cc_library(
name = "group_events",
srcs = ["group_events.cc"],
hdrs = ["group_events.h"],
copts = tf_profiler_copts(),
visibility = [":friends"],
deps = [
":tf_op_utils",
@ -346,6 +363,7 @@ cc_library(
name = "cost_utils",
srcs = ["cost_utils.cc"],
hdrs = ["cost_utils.h"],
copts = tf_profiler_copts(),
deps = [
":tf_op_utils",
":xplane_schema",
@ -367,6 +385,7 @@ cc_library(
name = "derived_timeline",
srcs = ["derived_timeline.cc"],
hdrs = ["derived_timeline.h"],
copts = tf_profiler_copts(),
deps = [
":group_events",
":tf_op_utils",
@ -412,6 +431,7 @@ cc_library(
name = "kernel_stats_utils",
srcs = ["kernel_stats_utils.cc"],
hdrs = ["kernel_stats_utils.h"],
copts = tf_profiler_copts(),
deps = [
"//tensorflow/core:lib",
"//tensorflow/core/profiler/protobuf:kernel_stats_proto_cc",
@ -436,6 +456,7 @@ cc_library(
name = "tfstreamz_utils",
srcs = ["tfstreamz_utils.cc"],
hdrs = ["tfstreamz_utils.h"],
copts = tf_profiler_copts(),
deps = [
":xplane_builder",
"//tensorflow/core:lib",
@ -452,6 +473,7 @@ cc_library(
name = "step_intersection",
srcs = ["step_intersection.cc"],
hdrs = ["step_intersection.h"],
copts = tf_profiler_copts(),
deps = [
":timespan",
"//tensorflow/core:lib",
@ -477,6 +499,7 @@ tf_cc_test(
cc_library(
name = "file_system_utils",
hdrs = ["file_system_utils.h"],
copts = tf_profiler_copts(),
deps = [
"//tensorflow/core/platform",
"@com_google_absl//absl/strings",
@ -487,6 +510,7 @@ cc_library(
name = "parse_annotation",
srcs = ["parse_annotation.cc"],
hdrs = ["parse_annotation.h"],
copts = tf_profiler_copts(),
visibility = ["//tensorflow/core/profiler:friends"],
deps = [
"@com_google_absl//absl/strings",

View File

@ -7,6 +7,7 @@ load("//tensorflow:tensorflow.bzl", "get_compatible_with_cloud")
# buildifier: disable=same-origin-load
load("//tensorflow:tensorflow.bzl", "tf_python_pybind_extension")
load("//tensorflow:tensorflow.bzl", "py_test")
load("//tensorflow/core/profiler/builds:build_config.bzl", "tf_profiler_copts")
package(
default_visibility = ["//tensorflow/python/profiler:__subpackages__"],
@ -85,6 +86,7 @@ cuda_py_test(
tf_python_pybind_extension(
name = "_pywrap_traceme",
srcs = ["traceme_wrapper.cc"],
copts = tf_profiler_copts(),
module_name = "_pywrap_traceme",
visibility = [
"//perftools/accelerators/xprof/xprofilez/integration_tests:__pkg__",
@ -99,6 +101,7 @@ tf_python_pybind_extension(
cc_library(
name = "traceme_wrapper",
hdrs = ["traceme_wrapper.h"],
copts = tf_profiler_copts(),
features = ["-layering_check"],
visibility = [
"//tensorflow/compiler/xla/python:__pkg__",
@ -115,6 +118,7 @@ cc_library(
tf_python_pybind_extension(
name = "_pywrap_profiler",
srcs = ["profiler_wrapper.cc"],
copts = tf_profiler_copts(),
features = ["-layering_check"],
module_name = "_pywrap_profiler",
visibility = [
@ -142,7 +146,7 @@ cc_library(
srcs = ["python_hooks.cc"],
hdrs = ["python_hooks.h"],
compatible_with = get_compatible_with_cloud(),
copts = ["-fexceptions"],
copts = tf_profiler_copts() + ["-fexceptions"],
features = ["-use_header_modules"], # Incompatible with -fexceptions.
visibility = ["//visibility:public"],
deps = [