Skip to content

Commit fdc4394

Browse files
danieldkpytorchmergebot
authored andcommitted
Do not fetch NCCL when system NCCL is used (pytorch#149607)
We are compiling PyTorch in a sandbox without networking. Unconditionally fetching breaks the build and is not needed when a system NCCL is used. Pull Request resolved: pytorch#149607 Approved by: https://github.com/malfet
1 parent c9ebf51 commit fdc4394

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/build_pytorch_libs.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ def build_pytorch(
119119
cmake: CMake,
120120
) -> None:
121121
my_env = _create_build_env()
122-
checkout_nccl()
122+
if os.getenv("USE_SYSTEM_NCCL", "0") == "0":
123+
checkout_nccl()
123124
build_test = not check_negative_env_flag("BUILD_TEST")
124125
cmake.generate(
125126
version, cmake_python_library, build_python, build_test, my_env, rerun_cmake

0 commit comments

Comments
 (0)