Skip to content

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

Merged
merged 4 commits into from
Aug 15, 2025

Conversation

thomvet
Copy link
Contributor

@thomvet thomvet commented Aug 8, 2025

@ChrisRackauckas
Copy link
Member

Why would an LBF be promoted?

@thomvet
Copy link
Contributor Author

thomvet commented Aug 12, 2025

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.

@ChrisRackauckas
Copy link
Member

It should be using DiffCache now?

@thomvet
Copy link
Contributor Author

thomvet commented Aug 13, 2025

Yes, with the newest version of SciML/SciMLBase.jl#1097 that should be the case.

We just need the no-op (promote_f(f::SplitFunction, ::Val{specialize}, u0, p, t) where {specialize} = f) here to keep the DiffCache in place, otherwise it gets converted into a zero(u0), which just re-creates the original problem of not having the right cache.

@thomvet
Copy link
Contributor Author

thomvet commented Aug 15, 2025

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).

@ChrisRackauckas ChrisRackauckas merged commit 58e1cd4 into SciML:master Aug 15, 2025
82 of 95 checks passed
@thomvet thomvet deleted the fix-ordinarydiffeq-2719 branch August 15, 2025 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants