Skip to content

Commit 6b5b73e

Browse files
authored
Updating the condition for noRCCL build (pytorch#9)
* Updating the condition for noRCCL build * Updated changes as per comments
1 parent 02688de commit 6b5b73e

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

manywheel/build_common.sh

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,23 @@ else
162162
echo "BUILD_DEBUG_INFO was not set, skipping debug info"
163163
fi
164164

165+
if [[ "$DISABLE_RCCL" = 1 ]]; then
166+
echo "Disabling NCCL/RCCL in pyTorch"
167+
USE_RCCL=0
168+
USE_NCCL=0
169+
USE_KINETO=0
170+
else
171+
USE_RCCL=1
172+
USE_NCCL=1
173+
USE_KINETO=1
174+
fi
175+
165176
echo "Calling setup.py bdist at $(date)"
166177
time CMAKE_ARGS=${CMAKE_ARGS[@]} \
167-
EXTRA_CAFFE2_CMAKE_FLAGS=${EXTRA_CAFFE2_CMAKE_FLAGS[@]} \
168-
BUILD_LIBTORCH_CPU_WITH_DEBUG=$BUILD_DEBUG_INFO \
169-
python setup.py bdist_wheel -d /tmp/$WHEELHOUSE_DIR
178+
EXTRA_CAFFE2_CMAKE_FLAGS=${EXTRA_CAFFE2_CMAKE_FLAGS[@]} \
179+
BUILD_LIBTORCH_CPU_WITH_DEBUG=$BUILD_DEBUG_INFO \
180+
USE_NCCL=${USE_NCCL} USE_RCCL=${USE_RCCL} USE_KINETO=${USE_KINETO} \
181+
python setup.py bdist_wheel -d /tmp/$WHEELHOUSE_DIR
170182
echo "Finished setup.py bdist at $(date)"
171183

172184
# Build libtorch packages

0 commit comments

Comments
 (0)