Skip to content

jax.lax.map + batch_size + explicit sharding: How to? #29164

Answered by yashk2810
PhilipVinc asked this question in Q&A
Discussion options

You must be logged in to vote

If you want to keep your inputs sharded on dim 0 that eventually get passed to scan, then I would suggest dropping into Auto mode via the auto_axes API.

If you want to stay in Explicit mode, then don't shard your input on dim 0 (i.e. the dimension that is getting scanned over).

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
6 replies
@PhilipVinc
Comment options

@yashk2810
Comment options

@PhilipVinc
Comment options

@yashk2810
Comment options

@PhilipVinc
Comment options

Answer selected by PhilipVinc
Comment options

You must be logged in to vote
0 replies
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