Repository navigation
Fix Float32 promotion in SRA/SRI OOP stages and SRI() Vector broadcast - #4825
Merged
ChrisRackauckas merged 1 commit intoOct 9, 2026
Merged
ChrisRackauckas merged 1 commit into
ChrisRackauckas merged 1 commit into
Conversation
Replace Float64 `0.5`/`1/6` literals with eltype-generic halves and use `.-` so chi1 works for Vector noise; SOSRA OOP stages stay Float32 and SRI() OOP solves Vector problems. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Cursor Agent <[email protected]> Agent-Harness: Cursor Agent CLI Agent-Model: auto
ChrisRackauckas-Claude
force-pushed
the
sde-float32-literals-sri-oop
branch
from
October 9, 2026 08:48
01922af to
09bcadd
Compare
ChrisRackauckas
marked this pull request as ready for review
October 9, 2026 10:45
This was referenced Oct 13, 2026
ChrisRackauckas
referenced
this pull request
Oct 14, 2026
…inaryDiffEqBDF, OrdinaryDiffEqExplicitRK, OrdinaryDiffEqFIRK, OrdinaryDiffEqFeagin, OrdinaryDiffEqHighOrderRK, OrdinaryDiffEqPDIRK, OrdinaryDiffEqRKN, OrdinaryDiffEqSDIRK, StochasticDiffEqHighOrder, StochasticDiffEqLowOrder, and StochasticDiffEqMilstein for release (#4871) Agent-Harness: Devin CLI 3000.11.3 Agent-Model: Fusion (Claude Opus 5.5 Medium + SWE-2 Medium) Agent-Session: local transcript ~/.local/share/devin/cli/transcripts/flash-hour.json Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Out-of-place SRA2/SOSRA/SRA and SRI ConstantCache stages multiplied by bare
0.5/1/6Float64 literals, so Float32 problems handed Float64uintof/g. SRI() OOP also crashed on anyVectorubecauseW.dW .^ 2 - abs(dt)used non-broadcast subtraction (MethodError on modern Julia). This makes those literals eltype-generic (/ 2oroftype(dt, 1//2)/1//6) and uses.-for chi1.Evidence
Regression test
lib/StochasticDiffEqHighOrder/test/float32_oop_stages_tests.jl(stashed src = master behavior):all(T -> T === Float32, seen)(Float64 stages present); SRI() Vector OOP erroredMethodError: -(::Vector{Float64}, ::Float64)atsri.jl:278. Summary:Pass 3 / Fail 1 / Error 1.Pass 7 / 7). Also passes on Julia 1.10.12.seed=1)u[end]and step counts identical to master.Test-group tails
GROUP=Core(--check-bounds=auto,OPENBLAS_NUM_THREADS=1):GROUP=QA:Runic + typos on touched files: clean.
Not verified
StochasticDiffEqtest suite / Buildkite CI.Reviewer pushback
/ 2vsoftype(dt, 1//2)should be uniform across SRA and SRI.chi2 * g1(non-broadcast*) deserve a follow-up; out of scope here.Please ignore until reviewed by @ChrisRackauckas.
Risk assessment
Independent review: pending
🤖 Generated with Cursor Agent 2026.10.01-14929f9 (model: unknown (Cursor auto)), transcript /home/crackauc/sandbox/goals/performance/jobs/pr-sde-f32-sri/log.txt on amdci2; orchestrated by Claude Code (claude-opus-5-5[1m]) https://claude.ai/code/session_01LPHREnnonfLg1VcE1EJovv
Made with Cursor
Risk assessment
perform_step!of SRA2, ThreeStageSRA (SRA3/SOSRA/SOSRA2), SRA() and SRI() in StochasticDiffEqHighOrder (0.5*xbecomesx/2oroftype(dt, 1//2)*x;1/6becomesoftype(dt, 1//6)), plus.-in SRI()'schi1. Adds a new Core test file. No public API change.downgrade-sublibrariesfor DiffEqBase and OrdinaryDiffEqDifferentiation also fail on master Downgrade Sublibraries run https://github.com/SciML/OrdinaryDiffEq.jl/actions/runs/37889760391 (91d6ffa).SciMLSensitivity.jl/Core1fails at the sameconcrete_solve_derivatives.jl:451as master IntegrationTest run https://github.com/SciML/OrdinaryDiffEq.jl/actions/runs/37889760310.GPU (julia 1)shows the same 3 QNDFdae_tests.jl:481failures as master. Locally (Julia 1.12.7, seed 5), I compared master base and PR for SRA2, SRA3, SOSRA, SOSRA2, SRA(), SRI(), SRIW1 and SOSRI. Cases: Float64 and Float32, vector and scalar state, fixed dt=1/64 and adaptive, plus non-diagonal 3x2 for the SRA family. Every case that solves on master is bitwise identical on the PR (sol.tandsol.u), so Float64 results do not change. SRI() with a Vector state throwsMethodError: -(::Vector, ::Float64)on master and solves on the PR, for Float64 and Float32. The PR's test fails on master src (all(T -> T === Float32, seen), 3 pass / 1 fail) and passes on PR src (4/4 and 3/3)..-change fixes a real crash.lib/StochasticDiffEqHighOrder/test/runtests.jlconflicts with master since SRA1 iip: scale k₁ in-place to drop per-step allocation #4822 merged, and it will also conflict with Fix SRA1 OOP non-diagonal noise (matrix-vector mul vs .*) #4826. Non-blocking: SRA2 OOP with a Vector state still fails (*(::Vector, ::Vector), pre-existing and disclosed), and under Float32 one Float64 operand remains in that path. With a Float32tspanand Float64u,oftype(dt, 1//6)rounds the SRI()chi3coefficient to Float32. The Float32 stage-eltype check covers only SOSRA.🤖 Risk assessment posted by an AI agent (fleet master) — harness: Claude Code 2.1.285 · model: claude-opus-5-5
Conversation: local session 3c311569-dda6-4687-bc9f-65febb212c33 (local transcript)