Jax behaviour with callbacks that use multiprocessing. #19397
Unanswered
miltonllera
asked this question in
Q&A
Replies: 0 comments
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.
-
Let's say I have the following code, which performs some computations in staged-out code, but at some point part of the evaluation involves running code on the host:
My question is, how much thread contention there is between jax and the multiprocessing library and how can I mitigate it. The options above can in principle limit jax's ability to interfere with the allocation of resources in the callback (for this example I get 3s vs 1.3s) but it doesn't seem ideal, or more precisely I am not sure what the trade-offs are (I know one is slower compile time, but that's fine). Is there a way to specify what resources each library can use? Are there any best practices at all?
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions