aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/nccl/system.BUILD.tpl
diff options
context:
space:
mode:
authorGravatar avijit-nervana <avijit.chakraborty@intel.com>2018-09-07 18:54:26 -0700
committerGravatar avijit-nervana <avijit.chakraborty@intel.com>2018-09-07 18:54:26 -0700
commitd9a738d5fff96ecb6db62d67e049ab12202dcb42 (patch)
tree292539c9ca4036ea55ae4763d3029f32829c9722 /third_party/nccl/system.BUILD.tpl
parent18b80bbd4b8db8bd35afad7264258c1c5c269226 (diff)
parent3e1b06ee93d7a638db1fdd5f733d66064c1acf59 (diff)
Merge branch 'master' into avijit/add-cpu-backend
Diffstat (limited to 'third_party/nccl/system.BUILD.tpl')
-rw-r--r--third_party/nccl/system.BUILD.tpl26
1 files changed, 26 insertions, 0 deletions
diff --git a/third_party/nccl/system.BUILD.tpl b/third_party/nccl/system.BUILD.tpl
new file mode 100644
index 0000000000..7ca835dedf
--- /dev/null
+++ b/third_party/nccl/system.BUILD.tpl
@@ -0,0 +1,26 @@
+filegroup(
+ name = "LICENSE",
+ visibility = ["//visibility:public"],
+)
+
+cc_library(
+ name = "nccl",
+ srcs = ["libnccl.so.%{version}"],
+ hdrs = ["nccl.h"],
+ include_prefix = "third_party/nccl",
+ deps = [
+ "@local_config_cuda//cuda:cuda_headers",
+ ],
+ visibility = ["//visibility:public"],
+)
+
+genrule(
+ name = "nccl-files",
+ outs = [
+ "libnccl.so.%{version}",
+ "nccl.h",
+ ],
+ cmd = """cp "%{install_path}/include/nccl.h" "$(@D)/nccl.h" &&
+ cp "%{install_path}/lib/libnccl.so.%{version}" "$(@D)/libnccl.so.%{version}" """,
+)
+