From 83bc6af346733465c976f478777361999c06fee6 Mon Sep 17 00:00:00 2001 From: Joshua Lang Date: Thu, 26 Sep 2024 13:46:51 -0700 Subject: [PATCH] Update no_nccl_support config_setting. PiperOrigin-RevId: 679279480 --- xla/tsl/BUILD | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/xla/tsl/BUILD b/xla/tsl/BUILD index 18f54ec37eb9f8..401cf088936d31 100644 --- a/xla/tsl/BUILD +++ b/xla/tsl/BUILD @@ -3,7 +3,7 @@ load("@bazel_skylib//lib:selects.bzl", "selects") load("@bazel_skylib//rules:common_settings.bzl", "bool_flag", "bool_setting") load("@tsl//tsl/platform:rules_cc.bzl", "cc_library") load("//xla/tsl:package_groups.bzl", "tsl_package_groups") -load("//xla/tsl:tsl.bzl", "if_google", "if_oss") +load("//xla/tsl:tsl.bzl", "if_google", "if_oss", "internal_visibility") load( "//xla/tsl:tsl.default.bzl", "tsl_extra_config_settings", @@ -500,11 +500,20 @@ config_setting( ) config_setting( - name = "no_nccl_support", + name = "using_no_nccl_support_define", define_values = dict( - if_google({"GOOGLE_CUDA_COMPILER": "clang"}), no_nccl_support = "true", ), + visibility = internal_visibility(["//visibility:private"]), +) + +selects.config_setting_group( + name = "no_nccl_support", + match_all = [ + ":using_no_nccl_support_define", + ] + if_google([ + "@local_config_cuda//cuda:using_config_cuda", + ]), visibility = ["//visibility:public"], )