performance regression on Ring SP
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 55/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- python, pytorch
- Lĩnh vực
- distributed-systems, machine-learning, performance
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 432
- Fork
- 51
- Merge trung bình
- 3 ngày 5 giờ
- Pull request đã merge (30 ngày)
- 1
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của modelscope/DiffSynth-Engine
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
modelscope/DiffSynth-Engine#238 · 1 bình luận ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
modelscope/DiffSynth-Engine#235 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
modelscope/DiffSynth-Engine#224 · 2 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 32/100
modelscope/DiffSynth-Engine#223 · 2 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 55/100
modelscope/DiffSynth-Engine#221 ·
Tất cả issue của modelscope/DiffSynth-Engine
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
stephrobert/dsoxlab#238 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
sublimehq/package_control#1780 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
nwg-piotr/nwg-displays#145 ·