SUGGESTION: Run the OpenCL tests under Oclgrind in CI to catch data races and invalid memory accesses in kernels
Los mantenedores suelen responder en 1 día
@SteveBronder ya está trabajando en esto.
Desde el 5/10/2026.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
Línea de trabajo
Start by reading how runTests.py prefixes MPI tests, then inspect the CI setup for where a CPU-only OpenCL test stage belongs. Build test/unit/math/opencl with STAN_OPENCL=true and run its test binaries through Oclgrind with race logging. Done means the stage fails on non-empty logs and can later be made required once the reported races are fixed.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Description
Motivation. CI runs the OpenCL tests on one GPU. A kernel bug that this device happens to tolerate stays invisible. Example: https://github.com/stan-dev/math/issues/3429, where the cholesky_decompose kernel returns a wrong factor on an AMD GPU because its barriers fence local memory only.
Oclgrind is an OpenCL device simulator. It needs no GPU and checks what real devices do not:
- data races between work items, including a barrier with the wrong fence flag (
--data-races), - reads and writes outside a buffer (always on),
- use of uninitialized values (
--uninitialized).
It runs our test binaries unchanged:
oclgrind --data-races --log races.log ./test/unit/math/opencl/cholesky_decompose_test
On develop this reports read-write races in cholesky_decompose, already for the 3×3 case, and nothing once the barriers are fixed. A first local pass also reports races in tridiagonalization_householder.
Suggested steps.
- Add
oclgrindto the CI image. - Add a CPU-only stage that builds
test/unit/math/openclwithSTAN_OPENCL=trueand runs each test binary throughoclgrind --data-races --log <file>.runTests.pyalready prefixes MPI tests withmpirun; the same mechanism can prefixoclgrind. - Fail the stage when a log is not empty.
- Start it as non-blocking and make it required once the existing reports are fixed.
- Lenguaje dominante
- C++
- Estrellas
- 845
- Forks
- 225
- Merge medio
- 3 d 9 h
- PR fusionados (30 d)
- 12
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de stan-dev/math
-
Dificultad 3/5 1-2 días Aptitud para principiantes 54/100
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 54/100
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
-
numerics performance
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
stan-dev/math#3481 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
`eigendecompose_sym`, `eigenvalues_sym` and `eigenvectors_sym` do not compile for complex matrices of `fvar<var>` or `fvar<fvar<double>>`Quizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abiertobug
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
stan-dev/math#3477 · 5 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de stan-dev/math
Issues similares
-
Upstream changes to reviewAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
rhalbersma/xstd-ints#395 ·
Los mantenedores suelen responder en 1 día
-
[Bug] Root filesystem scope (/) incorrectly rejects all descendant pathsPosiblemente ocupada @mugenkyou la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
neutralinojs/neutralino.js#304 · 1 comentario ·
-
FuSa
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
tenstorrent/tt-umd#3851 ·
Los mantenedores suelen responder en 3 días
-
zq prints a raw SQL 'no such table: index_default' error when the index has no default indexAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
mattgodbolt/zindex#67 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100