CPU: test_finite_step_after_overflow fp16 cases fail with 'Type fp16 is not supported on your device'
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 84/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
調査の方向性
unit/v1/zero/test_zero2_offload_multi_backward.pyから始めて、既存のbf16サポート確認とCPUAdamのスキップを含め、TestZero2OffloadOverflowRecovery::test_finite_step_after_overflowを読んでください。issueで説明されている対応するfp16サポート確認を追加し、次にCPUAdamを利用できるCPU runnerで2つの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時間
- マージ済み PR(30日)
- 85
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 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 日以内に返信