From cf3b94729e62e4e6d81338e14fdf2c5e28ad5261 Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Thu, 19 Sep 2024 15:06:22 -0700 Subject: [PATCH] Add `nccl_headers` alias to the content of BUILD file in NCCL repository when NCCL stub is not used. PiperOrigin-RevId: 676578558 --- third_party/nccl/hermetic/nccl_configure.bzl | 9 +++++++++ .../tsl/third_party/nccl/hermetic/nccl_configure.bzl | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/third_party/nccl/hermetic/nccl_configure.bzl b/third_party/nccl/hermetic/nccl_configure.bzl index 14469acdfc5..c1e49a6b9f1 100644 --- a/third_party/nccl/hermetic/nccl_configure.bzl +++ b/third_party/nccl/hermetic/nccl_configure.bzl @@ -60,6 +60,15 @@ alias( visibility = ["//visibility:public"], ) +alias( + name = "nccl_headers", + actual = select({ + "@local_config_cuda//cuda:cuda_tools_and_libs": "@cuda_nccl//:headers", + "//conditions:default": "@nccl_archive//:nccl_headers", + }), + visibility = ["//visibility:public"], +) + cc_library( name = "hermetic_nccl_config", hdrs = ["nccl_config.h"], diff --git a/third_party/xla/third_party/tsl/third_party/nccl/hermetic/nccl_configure.bzl b/third_party/xla/third_party/tsl/third_party/nccl/hermetic/nccl_configure.bzl index 14469acdfc5..c1e49a6b9f1 100644 --- a/third_party/xla/third_party/tsl/third_party/nccl/hermetic/nccl_configure.bzl +++ b/third_party/xla/third_party/tsl/third_party/nccl/hermetic/nccl_configure.bzl @@ -60,6 +60,15 @@ alias( visibility = ["//visibility:public"], ) +alias( + name = "nccl_headers", + actual = select({ + "@local_config_cuda//cuda:cuda_tools_and_libs": "@cuda_nccl//:headers", + "//conditions:default": "@nccl_archive//:nccl_headers", + }), + visibility = ["//visibility:public"], +) + cc_library( name = "hermetic_nccl_config", hdrs = ["nccl_config.h"],