Skip to content

Commit 17dcb32

Browse files
committed
Add check for XCCL enable
1 parent 56e7dda commit 17dcb32

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/_linux_ut.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,11 @@ jobs:
404404
sudo echo "0"|sudo tee /proc/sys/kernel/yama/ptrace_scope
405405
mkdir -p ut_log/xpu_distributed
406406
cd ../pytorch/third_party/torch-xpu-ops/test/xpu
407-
python -c "import torch;print(torch.distributed.is_xccl_available())"
407+
XCCL_EANBLE=$(python -c "import torch;print(torch.distributed.is_xccl_available())")
408+
if [[ "${XCCL_ENABLE}}" == 'False' ]]; then
409+
echo -e "[ERROR] XCCL is not enabled"
410+
exit 1
411+
fi
408412
timeout 10000 python run_distributed.py 2>${{ github.workspace }}/ut_log/xpu_distributed/xpu_distributed_test_error.log | tee ${{ github.workspace }}/ut_log/xpu_distributed/xpu_distributed_test.log
409413
cd ${{ github.workspace }}
410414
sudo cp ptrace_scope.bk /proc/sys/kernel/yama/ptrace_scope

0 commit comments

Comments
 (0)