Skip to content

Commit 63a7932

Browse files
jushgfacebook-github-bot
authored andcommitted
[c10d][nvshmem] add nvshmem build rules and dependency for libtorch_cuda (#159562)
Summary: Add guarded build option for nvshmem-related c10d code with `-c fbcode.caffe2_use_nvshmem` Guarded clause include nvshmem device + host code (static-linked) + these 2 files: - `torch/csrc/distributed/c10d/symm_mem/NVSHMEMSymmetricMemory.cu` - `torch/csrc/distributed/c10d/symm_mem/nvshmem_extension.cu` Differential Revision: D78813568
1 parent f1464a3 commit 63a7932

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

build_variables.bzl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -754,6 +754,11 @@ libtorch_cuda_distributed_extra_sources = [
754754
"torch/csrc/distributed/rpc/tensorpipe_cuda.cpp",
755755
]
756756

757+
libtorch_nvshmem_sources = [
758+
"torch/csrc/distributed/c10d/symm_mem/NVSHMEMSymmetricMemory.cu",
759+
"torch/csrc/distributed/c10d/symm_mem/nvshmem_extension.cu",
760+
]
761+
757762
libtorch_cuda_distributed_sources = libtorch_cuda_distributed_base_sources + libtorch_cuda_distributed_extra_sources
758763

759764
libtorch_cuda_sources = libtorch_cuda_core_sources + libtorch_cuda_distributed_sources + [

0 commit comments

Comments
 (0)