Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JAX][DOC] memory_kind, with_memory_kind and out_shardings #26285

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

zhenying-liu
Copy link
Contributor

Add documentation for the memory_kind parameter in sharding, the with_memory_kind method, and the out_shardings parameter for specifying output sharding in the {func}jax.jit function.

The device numbers here are not in numerical order, because the mesh reflects the underlying toroidal topology of the device.

For all different sharding types such as {class}`~jax.sharding.NamedSharding`, {class}`~jax.sharding.SingleDeviceSharding`, {class}`~jax.sharding.PositionalSharding` and {class}`~jax.sharding.GSPMDSharding`, there is a parameter called `memory_kind`, which defaults to `device`. You can set this parameter to `pinned_host` if you prefer to place it on the host.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's just mention NamedSharding here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@google-ml-butler google-ml-butler bot added kokoro:force-run pull ready Ready for copybara import and testing labels Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pull ready Ready for copybara import and testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants