Skip to content

Commit 19d27ad

Browse files
Matt-Hurdtensorflower-gardener
authored andcommitted
Add tensorflow/profiler as a dependency for tensorflow
As part of an ongoing effort to decouple our ml profiler code from tensorflow, this PR lays the foundation for moving code into tensorflow/profiler. This PR touches code within tensorflow/tensorflow and openxla/xla. Here is an outline of the changes for each repo. tensorflow/tensorflow: * Grant Visibility to //@org_xprof/xprof/(pywrap) openxla/xla: * Functionally a no-op. Grants visibility to xprof, however all uses are wrapped in `internal_visibility`. PiperOrigin-RevId: 735200458
1 parent 823832f commit 19d27ad

File tree

6 files changed

+15
-3
lines changed

6 files changed

+15
-3
lines changed

tensorflow/core/profiler/convert/BUILD

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ load("//tensorflow/core/profiler/builds:build_config.bzl", "tf_profiler_alias",
44

55
package(
66
# copybara:uncomment default_applicable_licenses = ["//tensorflow:license"],
7-
default_visibility = ["//tensorflow/core/profiler:internal"],
7+
default_visibility = ["//visibility:public"], # TODO(matthurd): Update to profiler:internal after xprof migration.
88
licenses = ["notice"],
99
)
1010

tensorflow/core/profiler/rpc/BUILD

+5-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,10 @@ cc_library(
6363
tf_profiler_pybind_cc_library_wrapper(
6464
name = "profiler_server_for_pybind",
6565
actual = ":profiler_server_impl",
66-
visibility = ["//tensorflow/python/profiler/internal:__pkg__"],
66+
visibility = [
67+
"//tensorflow/python/profiler/internal:__pkg__",
68+
"@org_xprof//xprof/pywrap:__pkg__",
69+
],
6770
)
6871

6972
cc_library(
@@ -77,6 +80,7 @@ cc_library(
7780
"//tensorflow/python/profiler/internal:__pkg__",
7881
"@local_xla//xla:__subpackages__",
7982
"@local_xla//xla/tsl/profiler/rpc/client:__pkg__",
83+
"@org_xprof//xprof/pywrap:__pkg__",
8084
],
8185
deps = [
8286
":profiler_service_impl",

third_party/xla/xla/tsl/framework/BUILD

+1
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ cc_library(
158158
"//tensorflow/core:__subpackages__",
159159
"@local_tsl//tsl:__subpackages__",
160160
"//tensorflow/python/profiler/internal:__pkg__",
161+
"//third_party/xprof:__subpackages__",
161162
]),
162163
deps = [
163164
":numeric_types",

third_party/xla/xla/tsl/lib/monitoring/BUILD

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ package(
2727
"//xla/tsl/distributed_runtime:__subpackages__",
2828
"//tensorflow/compiler/mlir/tf2xla:__subpackages__",
2929
"//tensorflow_serving/model_servers:__subpackages__",
30-
# tensorflow/python/profiler/internal depends on this package
30+
# xprof/pywrap depends on this package
31+
"//third_party/xprof/pywrap:__pkg__",
3132
"//tensorflow/python/profiler/internal:__pkg__",
3233
]),
3334
licenses = ["notice"],

third_party/xla/xla/tsl/profiler/rpc/BUILD

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ cc_library(
2727
"//xla/tsl/profiler/rpc/client:__pkg__",
2828
"//tensorflow_serving/model_servers:__pkg__",
2929
"//tensorflow/python/profiler/internal:__pkg__",
30+
"//third_party/xprof/pywrap:__pkg__",
3031
]),
3132
deps = [
3233
"//xla/tsl/platform:env",
@@ -69,6 +70,7 @@ cc_library(
6970
"//tensorflow/python/profiler/internal:__pkg__",
7071
"//xla/tsl/profiler:internal",
7172
"//xla/tsl/profiler/rpc/client:__pkg__",
73+
"//third_party/xprof/pywrap:__pkg__",
7274
]),
7375
deps = [
7476
":profiler_service_impl",

third_party/xla/xla/tsl/profiler/rpc/client/BUILD

+4
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ cc_library(
2929
"//xla/python:__pkg__",
3030
"//tensorflow/core/profiler/rpc/client:__pkg__",
3131
"//tensorflow/python/profiler/internal:__pkg__",
32+
"//third_party/xprof/pywrap:__pkg__",
3233
]),
3334
deps = [
3435
":profiler_client_for_pybind",
@@ -85,6 +86,7 @@ tf_profiler_pybind_cc_library_wrapper(
8586
visibility = internal_visibility([
8687
"//tensorflow/core/profiler/rpc/client:__pkg__",
8788
"//tensorflow/python/profiler/internal:__pkg__",
89+
"//third_party/xprof/pywrap:__pkg__",
8890
]),
8991
)
9092

@@ -95,6 +97,7 @@ cc_library(
9597
"//xla:__subpackages__",
9698
"//tensorflow/core/profiler/rpc/client:__pkg__",
9799
"//tensorflow/python/profiler/internal:__pkg__",
100+
"//third_party/xprof/pywrap:__pkg__",
98101
]),
99102
deps = [
100103
":profiler_client_impl",
@@ -119,6 +122,7 @@ cc_library(
119122
"//tensorflow/core/profiler/rpc/client:__pkg__",
120123
"//tensorflow/python:__pkg__",
121124
"//tensorflow/python/profiler/internal:__pkg__",
125+
"//third_party/xprof/pywrap:__pkg__",
122126
]),
123127
deps = [
124128
"//xla/tsl/platform:errors",

0 commit comments

Comments
 (0)