Conditional saving/storing in a jitted function #20592
Answered
by
jakevdp
andremfreitas
asked this question in
Q&A
-
Hi, What is the optimal approach when we want to save some result every, for example, 10 steps, of a numerical solver ? PS: This numerical solver is called iteratively via a Thanks, |
Beta Was this translation helpful? Give feedback.
Answered by
jakevdp
Apr 4, 2024
Replies: 1 comment 1 reply
-
Saving a value is a side-effect, so you cannot do it directly in a |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
andremfreitas
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Saving a value is a side-effect, so you cannot do it directly in a
jit
-compiled function. But you should be able to usejax.experimental.io_callback
for this; see a discussion at External Callbacks in JAX.