GPUVern7 Float32 dense output is ~60 ulps off at mid-step for a constant RHS (visible at tstops)
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 62/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- julia
- 領域
- backend, testing-qa
調査の方向性
Start by running the provided CPU reproducer and inspect the GPUVern7 interpolant and integ(t) path. Compare the current interpolant with the pre-97e5ac9 source and the tstop tests from PR #544. Done means exact endpoint behavior is preserved, mid-step Float32 error is reduced, and the tstop tests assert an appropriate tolerance.
索引モデルが issue の本文から書いたものです。
説明
In Float32, GPUVern7's dense output loses about 60 ulps at mid-step even for a constant right-hand side, where the interpolant should be exact up to rounding. It shows up whenever an adaptive solve stops at a tstop inside a step, because the state there comes from integ(t).
Reproducer (CPU backend, no GPU needed):
using DiffEqGPU, SciMLBase, StaticArrays, KernelAbstractions
for alg in (GPUTsit5(), GPUVern7(), GPUVern9()), stops in (nothing, Float32[0.875])
prob = ODEProblem{false}((u, p, t) -> SVector(1f0, 1f0), SVector(1f0, 1f0), (0.75f0, 1f0))
kw = stops === nothing ? (;) : (; tstops = stops)
sol = solve(EnsembleProblem(prob), alg, EnsembleGPUKernel(CPU(), 0.0); trajectories = 2,
adaptive = true, dt = prevfloat(0.25f0), abstol = 1f-9, reltol = 1f-6,
save_everystep = false, kw...)
u = sol.u[1].u[end][1]
println(nameof(typeof(alg)), " tstops=", stops, " u_end=", u, " ulps=", round(Int, (u - 1.25f0) / eps(1.25f0)))
end
On master b3d6a17 (Julia 1.12.7), the exact answer is 1.25:
| algorithm | no tstop | tstop at 0.875 |
|---|---|---|
| GPUTsit5 | 1.25 (0 ulps) | 1.25 (0 ulps) |
| GPUVern7 | 1.25 (0 ulps) | 1.2500077 (65 ulps) |
| GPUVern9 | 1.25 (0 ulps) | 1.2499995 (−4 ulps) |
The review of https://github.com/SciML/DiffEqGPU.jl/pull/544 reports that substituting the Vern7 interpolant from before https://github.com/SciML/DiffEqGPU.jl/commit/97e5ac9bd03ce7f075432ac9c784031ccc917aa2 ("Restructure Vern7 interpolant with (1-Θ) factors for exact endpoints") into the same environment brought this case from 65 ulps down to 2. That was a source substitution, not a bisect, and I have not reproduced it independently. That commit made the endpoints exact (see https://github.com/SciML/DiffEqGPU.jl/issues/412), so a fix needs to keep exact endpoints while restoring mid-step accuracy.
Found while working on https://github.com/SciML/DiffEqGPU.jl/pull/544. That PR's tstop tests only check that the callback fired and that the state is finite for Vern7/Vern9, rather than fitting a tolerance to this error. They should be tightened once this is fixed.
🤖 Generated with Claude Code (model: claude-opus-5-5[1m])
- 主要言語
- Julia
- スター
- 331
- フォーク
- 43
- 平均マージ
- 1日 20時間
- マージ済み PR(30日)
- 10
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
SciML/DiffEqGPU.jl のほかの issue
-
Adaptive kernel steppers: t += dt rounding decouples time from integrated length at large t対応中かも @ChrisRackauckas-Claude が 42 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
SciML/DiffEqGPU.jl#567 ·
メンテナーはふだん 2 日以内に返信
-
Adaptive kernel: ContinuousCallback just before a tstop suppresses the tstop's DiscreteCallbackオープン
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
SciML/DiffEqGPU.jl#558 ·
メンテナーはふだん 2 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
SciML/DiffEqGPU.jl#546 ·
メンテナーはふだん 2 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
SciML/DiffEqGPU.jl#540 ·
メンテナーはふだん 2 日以内に返信
-
Adaptive GPUTsit5 accepts an initial step past tf and reports an incorrect final state対応中かも @Saswatsusmoy が 61 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
SciML/DiffEqGPU.jl#535 ·
メンテナーはふだん 2 日以内に返信
SciML/DiffEqGPU.jl の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
MagneticResonanceImaging/MRIReco.jl#366 ·
メンテナーはふだん 3 日以内に返信
-
`AdamW` gives `NaN` for zero-gradient entries of `Float16` parameters (epsilon underflows to 0)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
FluxML/Optimisers.jl#253 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
JuliaGraphs/GraphNeuralNetworks.jl#736 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信