blob: 7920c1b4c06016a00847cd87b3f28b5f455f88f8 [file] [log] [blame]
#!/bin/bash
# This patch is required to fix intermittent link errors when building
# NCCL. See https://github.com/pytorch/pytorch/issues/83790
TORCH_DIR=$1
# Only apply patch if "git status" is empty to avoid failing when the
# patch has already been applied
if [[ `git status --porcelain` == "" ]]; then
git apply "${TORCH_DIR}/cmake/External/nccl.patch"
fi