Skip to content

Commit 9c0acce

Browse files
Do not include CUDA deps for tpu diags external build.
PiperOrigin-RevId: 809023167
1 parent c7936bd commit 9c0acce

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

tsl/profiler/lib/BUILD

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ load(
99
)
1010
load(
1111
"@xla//xla/tsl/profiler/builds:build_config.bzl",
12+
"nvtx_pie_external_deps",
1213
"tf_profiler_copts",
1314
"tf_profiler_pybind_cc_library_wrapper",
1415
)
16+
load("//third_party/bazel_skylib/lib:dicts.bzl", "dicts")
1517

1618
# copybara:uncomment package(default_applicable_licenses = ["//tensorflow:license"])
1719

@@ -292,7 +294,7 @@ cc_library(
292294
)
293295

294296
cc_library(
295-
name = "nvtx_utils_libtpu",
297+
name = "nvtx_utils_external",
296298
srcs = ["nvtx_utils_stub.cc"],
297299
hdrs = ["nvtx_utils.h"],
298300
visibility = ["//visibility:public"],
@@ -308,11 +310,13 @@ cc_library(
308310
name = "nvtx_utils",
309311
hdrs = ["nvtx_utils.h"],
310312
visibility = ["//visibility:public"],
311-
deps = select({
312-
# Remove this once we clean up all the CUDA specific deps.
313-
"libtpu_on_gce": [":nvtx_utils_libtpu"],
314-
"//conditions:default": [":nvtx_utils_impl"],
315-
}),
313+
deps = select(dicts.add(
314+
nvtx_pie_external_deps(),
315+
{
316+
":libtpu_on_gce": [":nvtx_utils_external"],
317+
"//conditions:default": [":nvtx_utils_impl"],
318+
},
319+
)),
316320
)
317321

318322
cc_library(

0 commit comments

Comments
 (0)