ROCm gfx950: SdpaCellStepAutotuneTest compiled pick intermittently 1.66x off the best

Abierto
#25,397 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
52/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
python, pytorch

Línea de trabajo

Start with backends/cuda/tests/test_autotune_inputs.py::SdpaCellStepAutotuneTest::test_compiled_pick_is_fastest_at_live_extents and compare its sparse cell mask with the all-visible mask used by the compile-time scenarios. On an MI350, check whether ROCm timing without CUDA graphs or the mask difference causes the PACK_GQA pick to change. Resolve the cause, then re-enable the test in .ci/scripts/test-rocm-aoti.sh.

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

Descripción

module: rocm

backends/cuda/tests/test_autotune_inputs.py::SdpaCellStepAutotuneTest::test_compiled_pick_is_fastest_at_live_extents fails intermittently on ROCm gfx950 (MI350) in unittest-rocm-gfx950-rocm7.2. It failed in 2 of 13 recent main runs: c346379f06 (job 135187221970) and cd12c4d02d (job 135970209067).

Both failures look the same. At live extent 4650, the compile-time pick was BLOCK_M=16, BLOCK_N=64, PACK_GQA=False, 4 warps, 3 stages, which ran in about 119 µs. The fastest config was the same tile with PACK_GQA=True, at about 71.7 µs. That's 1.66× against the test's MAX_REGRET = 1.10.

#25393 deselects the test on ROCm so main goes green; that's where this issue's link comes from. The test may be catching a real ROCm mis-pick: autotune_input_scenarios() runs on ROCm, so a default ROCm export of this masked cell-step SDPA can compile in the slower config.

Not confirmed, and both need an MI350 to check:

  • On ROCm the compile-time pick is timed without CUDA-graph timing, which the CUDA backend turns off there.
  • The compile-time scenarios time an all-visible mask, but this test times a sparse cell mask. If the two PACK_GQA variants nearly tie on the all-visible objective, that alone could make the pick flip.

SdpaKvLenAutotuneTest::test_compiled_pick_is_fastest_at_runtime_kv_lengths makes the same comparison with an all-visible mask and stays enabled.

To close this: find which of these it is, fix the pick or the scenario's mask, and re-enable the test in .ci/scripts/test-rocm-aoti.sh.

Lenguaje dominante
Python
Estrellas
5.2k
Forks
1.3k
Merge medio
1 d 7 h
PR fusionados (30 d)
644

Preparar el entorno

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 pytorch/executorch

Todos los issues de pytorch/executorch

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.