1filegroup( 2 name = "LICENSE", 3 visibility = ["//visibility:public"], 4) 5 6cc_library( 7 name = "nccl", 8 srcs = ["libnccl.so.%{nccl_version}"], 9 hdrs = ["nccl.h"], 10 include_prefix = "third_party/nccl", 11 visibility = ["//visibility:public"], 12 deps = [ 13 "@local_config_cuda//cuda:cuda_headers", 14 ], 15) 16 17genrule( 18 name = "nccl-files", 19 outs = [ 20 "libnccl.so.%{nccl_version}", 21 "nccl.h", 22 ], 23 cmd = """ 24cp "%{nccl_header_dir}/nccl.h" "$(@D)/nccl.h" && 25cp "%{nccl_library_dir}/libnccl.so.%{nccl_version}" \ 26 "$(@D)/libnccl.so.%{nccl_version}" 27""", 28) 29