Skip to content
Discussion options

You must be logged in to vote

A pure_callback is a function that executes on the host at runtime, and host execution occurs in a single CPU process. So in that sense, no, you cannot execute a pure_callback in parallel.

On the other hand, your host-side function is just a Python function, which could call out to any parallel computation framework that the host Python process has access to (including another JAX process, python multiprocessing, pytorch, dask, etc.), so in that sense you could execute a pure_callback in parallel, but it has nothing to do with pure_callback per se.

Does that make sense?

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by qres
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants