Skip to content

pmap where function includes dynamic (traced) shapes #5895

Answered by froystig
matpalm asked this question in Q&A
Discussion options

You must be logged in to vote

Marking the factor argument to downsample as static seems like correct intuition, but the outer pmap'ed function passes it something abstract by that point. At the end of the day, we cannot create a constant/static downsampling factor (different values of which beget a differently compiled reduce_window operation) from a dynamic argument. But we also cannot pmap over several downsampling factors unless we make the factor a dynamic argument!

In other words: this example isn't an instance of "single program, multiple data" parallelism—which the pmap/vmap parallelism model requires—because different factors make different programs.

Replies: 1 comment 1 reply

Comment options

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

Answer selected by matpalm
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