1package( 2 default_visibility = [ 3 "//tensorflow:__subpackages__", 4 ], 5 licenses = ["notice"], 6) 7 8py_library( 9 name = "profiler", 10 srcs = ["__init__.py"], 11 srcs_version = "PY3", 12 deps = [ 13 ":profiler_analysis_pb2_grpc", 14 "//tensorflow/core/profiler:profiler_analysis_proto_py", 15 "//tensorflow/core/profiler/protobuf:trace_events_proto_py", 16 "//tensorflow/python:util", 17 ], 18) 19 20py_library( 21 name = "profiler_analysis_pb2_grpc", 22 srcs = ["profiler_analysis_pb2_grpc.py"], 23 srcs_version = "PY3", 24 visibility = ["//visibility:public"], 25 deps = ["//tensorflow/core/profiler:profiler_analysis_proto_py"], 26) 27 28py_library( 29 name = "capture_tpu_profile_lib", 30 srcs = [ 31 "capture_tpu_profile.py", 32 "version.py", 33 ], 34 srcs_version = "PY3", 35 deps = [ 36 "//tensorflow/python:client", 37 "//tensorflow/python:errors", 38 "//tensorflow/python:platform", 39 "//tensorflow/python:versions", 40 "//tensorflow/python/distribute/cluster_resolver:cluster_resolver_lib", 41 "//tensorflow/python/profiler:profiler_client", 42 "//tensorflow/python/profiler:profiler_v2", 43 "@absl_py//absl:app", 44 "@absl_py//absl/flags", 45 ], 46) 47 48py_binary( 49 name = "capture_tpu_profile_bin", 50 srcs = ["capture_tpu_profile.py"], 51 main = "capture_tpu_profile.py", 52 python_version = "PY3", 53 deps = [ 54 ":capture_tpu_profile_lib", 55 "@absl_py//absl/flags", 56 ], 57) 58