-
-
Notifications
You must be signed in to change notification settings - Fork 120
do not replace LazyBufferCache when promoting f #1188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
do not replace LazyBufferCache when promoting f #1188
Conversation
|
Why would an LBF be promoted? |
|
It shouldn't be, but when I am running the example in SciML/OrdinaryDiffEq.jl#2719, promotion is attempted and this was a way of safe-guarding against this. I can look for a more elegant solution. |
|
It should be using DiffCache now? |
|
Yes, with the newest version of SciML/SciMLBase.jl#1097 that should be the case. We just need the no-op ( |
|
This is still needed to make SciML/SciMLBase.jl#1106 work (see the test failure of splitodeproblem_cache.jl - without the change here the DiffCache just gets removed when promote_f is called). |
…ote_f This partially reverts PR SciML#1188 to fix convergence issues in OrdinaryDiffEq.jl split ODE methods. Instead of returning the SplitFunction unchanged (which can leave uninitialized cache memory), we now copy the cache to ensure proper initialization. The change: - Returns the original function if there's no cache - If there is a cache, remakes the function with a copy of the cache - This ensures the cache is properly initialized without replacing LazyBufferCache with zero(u0) This fixes the convergence test failures in OrdinaryDiffEq.jl (AlgConvergence_III and others) while preserving the intent of PR SciML#1188 to not replace LazyBufferCache unnecessarily. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
…copy Partial revert of PR #1188: Copy cache for SplitFunction in promote_f
Addresses SciML/OrdinaryDiffEq.jl#2719
Needs: SciML/PreallocationTools.jl#131 and SciML/SciMLBase.jl#1097