Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,15 @@ jobs:
- name: Bazel analyze static cuDNN smoke (${{ matrix.cuda_version }})
working-directory: e2e
run: bazel build //:cudnn_static_smoke --nobuild --platforms //:platform_linux_amd64_cuda_${{ matrix.cuda_version }}
- name: Check NCCL system dependency purity (${{ matrix.cuda_version }})
working-directory: e2e
run: |
nccl_system_deps="$(bazel cquery 'deps(@cuda//nccl:nccl_system)' --output label --platforms //:platform_linux_amd64_cuda_${{ matrix.cuda_version }})"
if ! grep -q 'nccl_interface_library' <<< "${nccl_system_deps}"; then
echo '@cuda//nccl:nccl_system does not reach the NCCL interface library' >&2
exit 1
fi
if grep -q 'nccl_shared_library' <<< "${nccl_system_deps}"; then
echo '@cuda//nccl:nccl_system reaches packaged NCCL shared libraries' >&2
exit 1
fi
2 changes: 2 additions & 0 deletions cuda/redist_proxy_targets.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,10 @@ REPO_PUBLIC_TARGETS = {
],
"cuda_nccl": [
"nccl_shared_library",
"nccl_interface_library",
"nccl_static_library",
"nccl",
"nccl_system",
"nccl_static",
"header_list",
"headers",
Expand Down
9 changes: 9 additions & 0 deletions e2e/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,15 @@ cc_binary(
],
)

cc_binary(
name = "nccl_system_smoke",
srcs = ["nccl_smoke.cc"],
deps = [
":smoke_test_common",
"@cuda//nccl:nccl_system",
],
)

cc_binary(
name = "nccl_static_smoke",
srcs = ["nccl_smoke.cc"],
Expand Down
18 changes: 16 additions & 2 deletions nccl/build_defs/nccl.BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"""BUILD definitions for nccl package"""

load("@rules_cc//cc:cc_library.bzl", "cc_library")
load("@cuda_toolkit//cuda:versions_helper.bzl", "if_version_equal_or_greater_than")
load("@rules_cc//cc:cc_import.bzl", "cc_import")
load("@rules_cc//cc:cc_library.bzl", "cc_library")
load("@{cuda_redist_repo}//:version.bzl", "CUDA_VERSION")
load("@cuda_toolkit//cuda:versions_helper.bzl", "if_version_equal_or_greater_than")
load("//:version.bzl", "LIB_VERSIONS")

cc_import(
Expand All @@ -13,6 +13,14 @@ cc_import(
visibility = ["//visibility:public"],
)

cc_import(
name = "nccl_interface_library",
deps = [":headers"],
interface_library = "lib/libnccl.so",
system_provided = True,
visibility = ["//visibility:public"],
)

cc_import(
name = "nccl_static_library",
deps = [":headers"],
Expand All @@ -29,6 +37,12 @@ cc_library(
visibility = ["//visibility:public"],
)

cc_library(
name = "nccl_system",
deps = [":nccl_interface_library"],
visibility = ["//visibility:public"],
)

cc_library(
name = "nccl_static",
deps = [
Expand Down
Loading