Skip to content

Commit

Permalink
Merge pull request tensorflow#23808 from samikama:optional_nccl
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 222498675
  • Loading branch information
tensorflower-gardener committed Nov 22, 2018
2 parents 84b50a2 + 5bb1bee commit 54dc404
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
1 change: 1 addition & 0 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1694,6 +1694,7 @@ def main():
config_info_line('nohdfs', 'Disable HDFS support.')
config_info_line('noignite', 'Disable Apacha Ignite support.')
config_info_line('nokafka', 'Disable Apache Kafka support.')
config_info_line('nonccl', 'Disable NVIDIA NCCL support.')


if __name__ == '__main__':
Expand Down
6 changes: 6 additions & 0 deletions tensorflow/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,12 @@ config_setting(
visibility = ["//visibility:public"],
)

config_setting(
name = "no_nccl_support",
define_values = {"no_nccl_support": "true"},
visibility = ["//visibility:public"],
)

# Crosses between platforms and file system libraries not supported on those
# platforms due to limitations in nested select() statements.
config_setting(
Expand Down
9 changes: 5 additions & 4 deletions tensorflow/core/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ load("//tensorflow:tensorflow.bzl", "tf_cc_test_gpu")
load("//tensorflow:tensorflow.bzl", "tf_cc_tests_gpu")
load("//tensorflow:tensorflow.bzl", "tf_cuda_cc_test")
load("//tensorflow:tensorflow.bzl", "tf_version_info_genrule")
load("//tensorflow:tensorflow.bzl", "if_not_tx2_llvm_or_windows_cuda")
load("//tensorflow:tensorflow.bzl", "tf_cuda_only_cc_test")

# For platform specific build config
Expand Down Expand Up @@ -1403,9 +1402,11 @@ cc_library(
"//tensorflow/core/kernels:summary_kernels",
"//tensorflow/core/kernels:training_ops",
"//tensorflow/core/kernels:word2vec_kernels",
] + tf_additional_cloud_kernel_deps() + if_not_tx2_llvm_or_windows_cuda([
"//tensorflow/core/kernels:nccl_kernels",
]) + if_not_windows([
] + tf_additional_cloud_kernel_deps() + select({
"//tensorflow:no_nccl_support": [],
"//tensorflow:windows": [],
"//conditions:default": ["//tensorflow/core/kernels:nccl_kernels"],
}) + if_not_windows([
"//tensorflow/core/kernels:fact_op",
"//tensorflow/core/kernels:array_not_windows",
"//tensorflow/core/kernels:math_not_windows",
Expand Down
1 change: 1 addition & 0 deletions tools/bazel.rc
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ build:nogcp --define=no_gcp_support=true
build:nohdfs --define=no_hdfs_support=true
build:nokafka --define=no_kafka_support=true
build:noignite --define=no_ignite_support=true
build:nonccl --define=no_nccl_support=true

build --define=use_fast_cpp_protos=true
build --define=allow_oversize_protos=true
Expand Down

0 comments on commit 54dc404

Please sign in to comment.