SUGGESTION: Run the OpenCL tests under Oclgrind in CI to catch data races and invalid memory accesses in kernels
メンテナーはふだん 1 日以内に返信
@SteveBronder がすでに取り組んでいます。
2026年10月5日 から。
評価
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- C++
- スター
- 845
- フォーク
- 225
- 平均マージ
- 3日 9時間
- マージ済み PR(30日)
- 12
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
stan-dev/math のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 54/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 54/100
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
-
numerics performance
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
stan-dev/math#3481 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
`eigendecompose_sym`, `eigenvalues_sym` and `eigenvectors_sym` do not compile for complex matrices of `fvar<var>` or `fvar<fvar<double>>`再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンbug
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
stan-dev/math#3477 · コメント 5 件 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
rhalbersma/xstd-ints#395 ·
メンテナーはふだん 1 日以内に返信
-
[Bug] Root filesystem scope (/) incorrectly rejects all descendant paths対応中かも @mugenkyou が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
neutralinojs/neutralino.js#304 · コメント 1 件 ·
-
FuSa
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
tenstorrent/tt-umd#3851 ·
メンテナーはふだん 3 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
mattgodbolt/zindex#67 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100