SUGGESTION: Run the OpenCL tests under Oclgrind in CI to catch data races and invalid memory accesses in kernels
Maintainer thường phản hồi trong vòng 1 ngày
@SteveBronder đang làm issue này rồi.
Từ ngày 5/10/2026.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- C++
- Star
- 845
- Fork
- 225
- Merge trung bình
- 3 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 12
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của stan-dev/math
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 54/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 54/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
-
numerics performance
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
stan-dev/math#3481 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`eigendecompose_sym`, `eigenvalues_sym` and `eigenvectors_sym` do not compile for complex matrices of `fvar<var>` or `fvar<fvar<double>>`Có thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởbug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
stan-dev/math#3477 · 5 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của stan-dev/math
Issue tương tự
-
Upstream changes to reviewĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
rhalbersma/xstd-ints#395 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] Root filesystem scope (/) incorrectly rejects all descendant pathsCó thể đã có người làm @mugenkyou đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
neutralinojs/neutralino.js#304 · 1 bình luận ·
-
FuSa
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
tenstorrent/tt-umd#3851 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
zq prints a raw SQL 'no such table: index_default' error when the index has no default indexĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
mattgodbolt/zindex#67 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100