Repository navigation
Share the grid arrays when copying a NoiseGrid - #337
Merged
ChrisRackauckas merged 1 commit intoSep 26, 2026
Merged
Conversation
Merged
ChrisRackauckas
referenced
this pull request
Sep 26, 2026
Agent-Harness: Claude Code Agent-Model: claude-opus-5-5[1m] Agent-Session: local Claude Code session 3cd6500a-1f81-46b5-ac0b-c466e15b6a53 on Chris's Mac (session ID, no URL) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.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.
Copying a
NoiseGridno longer duplicates itst,WandZarrays. StochasticDiffEqCore copiesprob.noisein__initand copies the result back at the end of__solve, so every solve on a stored grid paid for the whole grid twice: a 16-stepRandomEMsolve on a 2^16-point grid took 520 us and now takes 7.9 us, and 2.9 ms against 9.9 us with vector-valued points.A solve only reads the grid:
reinit!, the interpolation and the step functions write the step state alone. So the newcopy!shares the arrays and copiescurW,dW,curZ,dZandcur_time. SciMLSensitivity's checkpointing builds its forward-noise grid from slices ofsol.Wand never writes into one. The visible change is that editing a grid's arrays by hand after copying it now shows up in the copy.AI Disclosure: Claude assisted with this change.