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

test_cpu_threadpool: the 100x dispatch ratio is calibrated on 20 cores and flakes on 4-vCPU CI runners

Abierto
#3,130 1 comentario 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
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
58/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
cpp
Área
testing-qa

Línea de trabajo

Comienza en tests/vt/test_cpu_threadpool.cpp, en el caso oversubscribed dispatch does not cost a scheduler timeslice, y lee el comentario de calibración junto a Threadpool::Run. Reproduce la proporción de dispatch en un runner de 4 vCPU y, a continuación, elige y valida un ajuste de calibración que siga siendo sensible al defecto de timeslice del scheduler registrado. Ejecuta el trabajo de pruebas de CPU y confirma que el caso pasa en runners pequeños sin ocultar ese defecto.

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

Descripción

Row: QUANT-GGUF-CPU-THREADPOOL

tests/vt/test_cpu_threadpool.cpp, case oversubscribed dispatch does not cost a scheduler timeslice, asserts ratio < 100.0 on ratio = median_dispatch_us(cores + 1) / median_dispatch_us(cores / 2).

Observed on CI (4-vCPU hosted runner)

build-test-cpu job 102683560829 (PR #3095, run 34416865779), tests/vt/test_cpu_threadpool.cpp:610:

MESSAGE: empty-op dispatch: 2 threads 0.421 us, 5 threads 42.75 us, ratio 101.544
ERROR: CHECK( ratio < 100.0 ) is NOT correct!

The arms are 2 and 5 threads, which proves the runner reported hardware_concurrency() == 4.

Why this reads as a calibration gap rather than a detected defect

  • The recorded defect signature in this test's own comment is an over arm of 2999-5996 us at 21 threads against 18-20 us fixed. Here the over arm is 42.75 us, roughly 70x below that signature, so the waiter was not spinning through a scheduler timeslice.
  • The comment's calibration ("Verified both ways on 20 cores") and its margin ("~30x below the defect and ~28x above the fixed behaviour") come from a 20-core box with arms 10 and 21. On a 4-vCPU runner the arms are 2 and 5 and the denominator measured 0.421 us, about 4x below the 1.68 us the same comment calibrates against, so the ratio is dominated by denominator noise.
  • std::thread::hardware_concurrency() is not reduced by CPU affinity on this glibc: taskset -c 0-3 <binary> still selects 24/49-thread arms, so the 4-vCPU geometry cannot be reproduced locally by pinning cores.
  • main's own build-test-cpu job 103074166342 passes the same test on the same runner class, so the check is marginal there rather than deterministically red.

Suggested fix (owner's call; changing an assertion needs its own spec)

Floor the denominator, for example over_us < std::max(100.0 * fits_us, <absolute floor>), or scale the threshold with cores, or skip the case below 8 cores. Any of these must keep the case able to fail for the defect it was written for.

Found while triaging an unrelated red check on PR #3095: that diff changes attention and embedding gating in src/vt/ops.cpp and never calls the measured path, which is Threadpool::Run with an empty body.

Lenguaje dominante
C++
Estrellas
423
Forks
53
Merge medio
1 d 7 h
PR fusionados (30 d)
382

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 mudler/vllm.cpp

Todos los issues de mudler/vllm.cpp

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.