performance regression on Ring SP
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 55/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- python, pytorch
調査の方向性
Start with diffsynth_engine/layers/attention/backends/sdpa.py around lines 99–113 and trace how Ring SP selects the SDPA backend. Reproduce the comparison with the provided Qwen Image 2512, GPU, and kernel benchmarks, then verify that the affected Ring SP/CP paths no longer incur the slower kernel without changing other backends.
索引モデルが issue の本文から書いたものです。
説明
Description
In v1 branch, deploying DiffSynth engine with 2 GPUs without NVLink and inferencing model Qwen Image 2512, ring SP2 is much slower than Ulysses SP2.
However, the total communication volume is identical for both strategies when using 2 GPUs while ring CP can overlap same comunication time spend with computation. Which means CP would be faster theoretically.
Reason Explanations
In v1 branch, when use ring sp (or cp) with sdpa, the attention backend would be chose as _scaled_dot_product_efficient_attention and this kernel is far slower than _scaled_dot_product_flash_attention. Other backends would not be influenced.
Detailed comparison
On 4 RTX Pro 5000 Blackwell, for one 1024x1024 picture with 5 steps, the benchmarks table can be concluded as below.
| kernels | Efficient/kernel | Torch Flash/kernel | FA4/kernel | FA4 vs Flash | Torch Flash/step | FA4/step |
|---|---|---|---|---|---|---|
| cp2cfg | 733.068 us | 287.672 us | 279.057 us | -2.99% | 276.576 ms | 275.910 ms |
| cp4 | 197.949 us | 78.009 us | 75.263 us | -3.52% | 442.760 ms | 425.265 ms |
As we can see, the Torch Flash kernel is much faster than Efficient kernel.
- 主要言語
- Python
- スター
- 432
- フォーク
- 51
- 平均マージ
- 3日 5時間
- マージ済み PR(30日)
- 1
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
modelscope/DiffSynth-Engine のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
modelscope/DiffSynth-Engine#238 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
modelscope/DiffSynth-Engine#235 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
modelscope/DiffSynth-Engine#224 · コメント 2 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 32/100
modelscope/DiffSynth-Engine#223 · コメント 2 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 55/100
modelscope/DiffSynth-Engine#221 ·
modelscope/DiffSynth-Engine の issue をすべて見る
似ている issue
-
area: harness bug status: needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Human-Agent-Society/reef#625 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 80/100
learningequality/kolibri#15351 · コメント 2 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
Name consistency オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
eellak/triplestore#65 · コメント 1 件 ·