github.com/johnnyeven/libtools@v0.0.0-20191126065708-61829c1adf46/third_party/nccl/system.BUILD.tpl (about)

     1  filegroup(
     2      name = "LICENSE",
     3      visibility = ["//visibility:public"],
     4  )
     5  
     6  cc_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  
    17  genrule(
    18      name = "nccl-files",
    19      outs = [
    20          "libnccl.so.%{nccl_version}",
    21          "nccl.h",
    22      ],
    23      cmd = """
    24  cp "%{nccl_header_dir}/nccl.h" "$(@D)/nccl.h" &&
    25  cp "%{nccl_library_dir}/libnccl.so.%{nccl_version}" \
    26    "$(@D)/libnccl.so.%{nccl_version}"
    27  """,
    28  )