diff --git a/third_party/tsl/third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_rocm.tpl b/third_party/tsl/third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_rocm.tpl index 389ffea421035..e97d13f681217 100755 --- a/third_party/tsl/third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_rocm.tpl +++ b/third_party/tsl/third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_rocm.tpl @@ -24,7 +24,7 @@ import pipes # Template values set by rocm_configure.bzl. CPU_COMPILER = ('%{cpu_compiler}') -USE_CLANG = ('%{compiler}' == 'clang') +USE_CLANG = ('%{compiler_is_clang}' == 'True') HOST_COMPILER_PATH = ('%{host_compiler_path}') HIPCC_PATH = '%{hipcc_path}' diff --git a/third_party/tsl/third_party/gpus/rocm_configure.bzl b/third_party/tsl/third_party/gpus/rocm_configure.bzl index 5e2ba436b3710..935a018772443 100644 --- a/third_party/tsl/third_party/gpus/rocm_configure.bzl +++ b/third_party/tsl/third_party/gpus/rocm_configure.bzl @@ -757,7 +757,7 @@ def _create_local_rocm_repository(repository_ctx): tpl_paths["crosstool:clang/bin/crosstool_wrapper_driver_rocm"], { "%{cpu_compiler}": str(cc), - "%{compiler}": rocm_defines["%{compiler}"], + "%{compiler_is_clang}": "True" if is_rocm_clang else "False", "%{hipcc_path}": str(repository_ctx.path(rocm_config.rocm_toolkit_path + "/bin/hipcc")), "%{hipcc_env}": _hipcc_env(repository_ctx), "%{rocm_path}": str(repository_ctx.path(rocm_config.rocm_toolkit_path)), diff --git a/xla/backends/profiler/gpu/BUILD b/xla/backends/profiler/gpu/BUILD index ee591b48deb8d..77e666d7bc680 100644 --- a/xla/backends/profiler/gpu/BUILD +++ b/xla/backends/profiler/gpu/BUILD @@ -435,7 +435,7 @@ cuda_library( "ptxas-options=-v", ]), local_defines = if_oss(["NVTX_VERSION_3_1=1"]), - tags = ["requires-gpu-nvidia"], + tags = ["cuda-only"], visibility = ["//visibility:public"], ) @@ -445,7 +445,7 @@ xla_test( srcs = ["nvtx_with_cuda_kernels_test.cc"], backends = ["gpu"], copts = tf_profiler_copts() + tsl_copts(), - tags = ["no_mac"], + tags = ["no_mac", "cuda-only"], deps = [ ":nvtx_with_cuda_kernels", "@com_google_googletest//:gtest_main",