Replies: 1 comment 1 reply
-
Interesting remark! As a different example, consider the block of code
With an output of
At some point of the "transformation process"(going from the python function call to the compiled function), jax must recognize that it already has a complied version of |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am a newbie to
jax
. When I'm reading to the documentation, I'm confused about the caching behavior ofjit
.In the caching section, it says that "Avoid calling jax.jit inside loops. Doing that effectively creates a new f at each call, which will get compiled each time instead of reusing the same cached function". However, running the following code only produces one printing side effect:
The string "tracing..." is only printed once, and it seems that
jit
does not trace the function again.Beta Was this translation helpful? Give feedback.
All reactions