From b6d3937b7485407b2ab39096910df58649fe2bbe Mon Sep 17 00:00:00 2001 From: zengxian Date: Tue, 26 May 2026 11:10:42 +0800 Subject: [PATCH] add echo 0 > /proc/sys/kernel/yama/ptrace_scope for distributed test --- .github/actions/linux-uttest/action.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/actions/linux-uttest/action.yml b/.github/actions/linux-uttest/action.yml index b93a678edf..3409f70a28 100644 --- a/.github/actions/linux-uttest/action.yml +++ b/.github/actions/linux-uttest/action.yml @@ -143,6 +143,13 @@ runs: if: ${{ inputs.ut_name == 'xpu_distributed' }} run: | xpu-smi topology -m + original_ptrace_scope=$(cat /proc/sys/kernel/yama/ptrace_scope) + echo "0" |sudo tee /proc/sys/kernel/yama/ptrace_scope + restore_ptrace_scope() { + echo "${original_ptrace_scope}" | sudo tee /proc/sys/kernel/yama/ptrace_scope >/dev/null || true + cat /proc/sys/kernel/yama/ptrace_scope || true + } + trap restore_ptrace_scope EXIT mkdir -p ut_log/xpu_distributed cd pytorch/third_party/torch-xpu-ops/test/xpu XCCL_ENABLE=$(python -c "import torch;print(torch.distributed.is_xccl_available())")