Skip to content
Discussion options

You must be logged in to vote

Hi - thanks for the question! In some senses this is intended behavior, in that the JAX jit cache uses strong references to track static arguments, so that if an argument goes out of scope the cache entry is not discarded. You can see why this would be useful, because, e.g. you wouldn't want to have to recompile a function just because you used a non-global string value as a static argument!

The side effect, then, is that if you have very large temporary static arguments, a strong reference will be created within the jit cache that will keep them in scope. This isn't really a leak per-se – the object is deliberately referenced in order to keep cached versions of compiled functions and pre…

Replies: 3 comments 15 replies

Comment options

You must be logged in to vote
6 replies
@pipme
Comment options

@pipme
Comment options

@pipme
Comment options

@jakevdp
Comment options

@pipme
Comment options

Answer selected by pipme
Comment options

You must be logged in to vote
1 reply
@pipme
Comment options

Comment options

You must be logged in to vote
8 replies
@jakevdp
Comment options

@pipme
Comment options

@pipme
Comment options

@pipme
Comment options

@jakevdp
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants