Repository navigation
[pmap] In-line definitions of jax.device_put_sharded and jax.device_put_replicated. - #5374
Merged
Merged
Conversation
Collaborator
|
@danielsuo I tried to tackle this problem some time ago and there were some internal failures that I could not fix in the flax code: #5101 |
copybara-service
Bot
force-pushed
the
test_888582438
branch
3 times, most recently
from
April 7, 2026 12:49
41d0052 to
4ddd1a3
Compare
…e_put_replicated`. NOTE: Added a `axis_name` argument because `jax_utils` is a commonly used utility and it may be beneficial for `flax` users to be able to specify the axis name to match the axis name used in their experiment. Both `jax.device_put_sharded` and `jax.device_put_replicated` were deprecated in JAX v0.8.1 in November 2025. We in-line their definitions using public JAX APIs taking the `jax_pmap_shmap_merge=True` branch, which was made the default in JAX v0.8.0 in October 2025. Please see the below for more information: - JAX CHANGELOG: https://docs.jax.dev/en/latest/changelog.html - Migrating from `jax.pmap`: https://docs.jax.dev/en/latest/migrate_pmap.html PiperOrigin-RevId: 895857088
copybara-service
Bot
force-pushed
the
test_888582438
branch
from
April 7, 2026 13:03
4ddd1a3 to
355e141
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[pmap] In-line definitions of
jax.device_put_shardedandjax.device_put_replicated.NOTE: Added a
axis_nameargument becausejax_utilsis a commonly used utility and it may be beneficial forflaxusers to be able to specify the axis name to match the axis name used in their experiment.Both
jax.device_put_shardedandjax.device_put_replicatedwere deprecated in JAX v0.8.1 in November 2025. We in-line their definitions using public JAX APIs taking thejax_pmap_shmap_merge=Truebranch, which was made the default in JAX v0.8.0 in October 2025.Please see the below for more information:
jax.pmap: https://docs.jax.dev/en/latest/migrate_pmap.html