Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

performance regression on Ring SP

Abierto
#266 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
55/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
python, pytorch

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

https://github.com/modelscope/DiffSynth-Engine/blob/c23ece5030101974d1691538e4515d6a2f1e013a/diffsynth_engine/layers/attention/backends/sdpa.py#L99-L113

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.

Lenguaje dominante
Python
Estrellas
432
Forks
51
Merge medio
3 d 5 h
PR fusionados (30 d)
1

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de modelscope/DiffSynth-Engine

Todos los issues de modelscope/DiffSynth-Engine

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.