CPU: test_finite_step_after_overflow fp16 cases fail with 'Type fp16 is not supported on your device'
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 84/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
调研方向
从 unit/v1/zero/test_zero2_offload_multi_backward.py 开始,阅读 TestZero2OffloadOverflowRecovery::test_finite_step_after_overflow,包括现有的 bf16 支持检查和 CPUAdam 跳过逻辑。添加 issue 中描述的对应 fp16 支持检查,然后在具备 CPUAdam 的 CPU runner 上运行两个 fp16 参数化测试;它们应当被跳过,而不是在初始化时失败。
由索引模型根据 Issue 内容生成。
描述
Description
TestZero2OffloadOverflowRecovery::test_finite_step_after_overflow (added in #8728) fails on CPU-only runners in the cpu-torch-latest-v1-multirank suite:
unit/v1/zero/test_zero2_offload_multi_backward.py::TestZero2OffloadOverflowRecovery::test_finite_step_after_overflow[False-fp16]
unit/v1/zero/test_zero2_offload_multi_backward.py::TestZero2OffloadOverflowRecovery::test_finite_step_after_overflow[True-fp16]
ValueError: Type fp16 is not supported on your device.
File "deepspeed/runtime/engine.py", line 2017, in _do_sanity_check
raise ValueError("Type fp16 is not supported on your device.")
Root cause
The test parametrizes precision = ["bf16", "fp16"] and skips unsupported bf16 devices, but has no mirror skip for fp16:
if precision == "bf16" and not get_accelerator().is_bf16_supported():
pytest.skip("BF16 is not supported")
On CPU, is_fp16_supported() is false, so the fp16 cases reach deepspeed.initialize() and hit the engine sanity check.
This is not caught by the single-rank cpu-torch-latest workflow because CPUAdam is not pre-built there, so the earlier CPUAdam is required skip takes effect first. The multirank workflow pre-builds CPUAdam, letting the fp16 cases actually run.
Suggested fix
Add the mirror skip:
if precision == "fp16" and not get_accelerator().is_fp16_supported():
pytest.skip("FP16 is not supported")
Environment
Observed on cpu-torch-latest-v1-multirank / unit tests (CPU runners, torch 2.14.0+cpu, Python 3.12), e.g. job https://github.com/deepspeedai/DeepSpeed/actions/runs/42034600447/job/127269577159 . Originally surfaced while validating PR #8944.
- 主要语言
- Python
- 星标
- 43.3k
- 派生
- 5.1k
- 平均合并
- 5 天 10 小时
- 30 天内合并 PR
- 85
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
deepspeedai/DeepSpeed 的其他 Issue
-
[Bug] DeepSpeedEngine.step leaves _running_engine_step=True permanently on exception, corrupting is_gradient_accumulation_boundary()可能已有人在做 @its-amann 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 85/100
deepspeedai/DeepSpeed#9190 · 1 条评论 ·
维护者通常 2 天内回复
-
[Bug] PipelineEngine._exec_reduce_grads and _exec_optimizer_step leave _force_grad_boundary=True permanently after any exception可能已有人在做 @bantianyue 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
deepspeedai/DeepSpeed#9183 ·
维护者通常 2 天内回复
-
fp16 `hysteresis: 0` (or negative) makes DynamicLossScaler never lower the loss scale, so every overflowing step is skipped forever可能已有人在做 @damienen 于 26 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
deepspeedai/DeepSpeed#8982 ·
维护者通常 2 天内回复
-
[BUG] OneCycle applies the minimum momentum to the first Adam update可能已有人在做 @ai-yang 于 30 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
deepspeedai/DeepSpeed#8951 ·
维护者通常 2 天内回复
-
init_inference rejects dtype=torch.int8 on every accelerator可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
deepspeedai/DeepSpeed#8577 ·
维护者通常 2 天内回复
查看 deepspeedai/DeepSpeed 的全部 Issue
相似的 Issue
-
area/auth comp/agent P3 type/bug
难度 2/5 1-3 小时 新手友好度 88/100
NousResearch/hermes-agent#161417 ·
维护者通常 1 天内回复
-
难度 1/5 1-3 小时 新手友好度 75/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 88/100
Dao-AILab/flash-attention#3251 ·
维护者通常 2 天内回复
-
[New Check]: sqlserver_public_network_access_disabled可能已有人在做 @pouria-l 今天认领。 未关闭feature-request status/needs-triage
难度 2/5 1-3 小时 新手友好度 78/100
prowler-cloud/prowler#13607 · 1 条评论 ·
维护者通常 1 天内回复
-
external langchain
难度 1/5 1 小时以内 新手友好度 90/100
langchain-ai/docs#8184 ·
维护者通常 1 天内回复