SUGGESTION: Run the OpenCL tests under Oclgrind in CI to catch data races and invalid memory accesses in kernels
I maintainer di solito rispondono entro 1 giorno
@SteveBronder ci sta già lavorando.
Dal 5/10/2026.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- C++
- Stelle
- 845
- Fork
- 225
- Merge medio
- 3g 9h
- PR unite (30g)
- 12
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di stan-dev/math
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 54/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 54/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
-
numerics performance
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
stan-dev/math#3481 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
`eigendecompose_sym`, `eigenvalues_sym` and `eigenvectors_sym` do not compile for complex matrices of `fvar<var>` or `fvar<fvar<double>>`Forse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Apertabug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
stan-dev/math#3477 · 5 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di stan-dev/math
Issue simili
-
Upstream changes to reviewAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
rhalbersma/xstd-ints#395 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug] Root filesystem scope (/) incorrectly rejects all descendant pathsForse già presa @mugenkyou l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
neutralinojs/neutralino.js#304 · 1 commento ·
-
FuSa
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
tenstorrent/tt-umd#3851 ·
I maintainer di solito rispondono entro 3 giorni
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
mattgodbolt/zindex#67 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100