-
Hopefully this is an easy question: If I have a vmap which calls a function that is turn calls another vmap, how will this be parallelized on a GPU? Will it only parallelize over the outer vmap, or will there be hierarchical parallelism over both vmaps (exposing maximum parallelism)? |
Beta Was this translation helpful? Give feedback.
Answered by
shoyer
Feb 28, 2021
Replies: 1 comment
-
Yes, nested vmap will fully parallelize the entire operation.
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
shoyer
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, nested vmap will fully parallelize the entire operation.
vmap
is a transformation that makes your code work exactly equivalently to manually rewriting your code with an extra dimension. So nestingvmap
is equivalent to rewriting your code with an extra dimension, twice.