Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[dist] XPU distributed backend selection (XCCL / oneCCL) is unverified — needs XPU hardware

未关闭
#3,777 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
28/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
python, pytorch

调研方向

Start with get_default_dist_backend() and tests/test_distributed_device_setup.py, which the issue identifies as the implementation and test entry points. The issue requires an exact-head, two-rank torchrun on Intel XPU hardware, checking device binding, all_reduce, DDP forward and backward, and end-of-epoch cache release. Done means the XPU backend selection and test are updated, with the PyTorch, oneAPI, and device versions recorded.

由索引模型根据 Issue 内容生成。

描述

Context

#3771 binds distributed training to the active accelerator instead of assuming CUDA. Writing that change surfaced a second, independent defect on XPU.

get_default_dist_backend() returns "nccl" for every non-NPU device. Since get_accelerator_device_type() does select XPU, an XPU run reaches init_process_group(backend="nccl") and cannot start at all on a build without NCCL — the same class of failure #3771 fixes for Ascend NPU.

Why this is not in #3771

The correct backend for XPU is XCCL (oneCCL; the legacy name on older builds is "ccl"), so the fix is small:

_ACCELERATOR_DIST_BACKENDS = {"npu": ("hccl",), "xpu": ("xccl", "ccl")}

but it advertises a runtime path that nobody here can exercise. We have no Intel XPU hardware in our environment, so under the repository's hardware-validation requirement the XPU arm was the only path #3771 changed without real-device evidence. #3771 therefore keeps the historical "nccl" value for XPU — i.e. exactly the pre-PR behaviour, unchanged — and the selection is tracked here for whoever has the hardware.

What a fix needs

  1. Add the XPU entry above (keep "ccl" only for builds that positively confirm it through torch.distributed.is_ccl_available()).
  2. Run an exact-head 2-rank torchrun on Intel XPU with XCCL, showing per-rank xpu:0 / xpu:1 binding, an all_reduce, DDP forward/backward, the end-of-epoch cache release, plus the exact PyTorch / oneAPI / device versions.
  3. Update tests/test_distributed_device_setup.py accordingly — the current test pins the narrowed behaviour (XPU stays "nccl" even when a build reports is_xccl_available()), so it needs to be flipped.

Related

  • #3771 — the Ascend NPU path, verified end to end on 910B2 hardware.
  • Failure mode this follows up on: init_process_group(backend="nccl") -> RuntimeError: Distributed package doesn't have NCCL built in.
主要语言
Python
星标
20.8k
派生
2.1k
平均合并
1 天 46 分钟
30 天内合并 PR
36

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

modelscope/FunASR 的其他 Issue

查看 modelscope/FunASR 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。