Assigning multiple CPU cores for some functions #8093
Unanswered
samarth-kashyap
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi jax team,
I'm attempting an eigenvalue optimization problem using numpyro. I have a matrix whose eigenvalues depend on 3 parameters (w1, w3, w5). The eig_func_mcmc constructs the matrix and solves the eigenvalue problem. Numpyro uses MCMC and builds multiple chains which randomly sample the parameters (w1, w3, w5).
Based on some tests, the eigenvalue problem solving on the CPU speeds up significantly when the number of cores is increased to 8 and marginally thereafter. I would want to setup the code such that each individual eigenvalue problem solving would take 8 cores. Is there a way to do this?
Numpyro handles parallelizing of chains using
pmap
. So ideally what I want to do is to assign 8*N cores to a job, with N chainssuch that numpyro executes each chain on a different block of 8 cores. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions