Skip to content

[JAX] Extend colocated_cpu_devices to accept Mesh besides devices #29387

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

Merged
merged 1 commit into from
Jun 11, 2025

Conversation

copybara-service[bot]
Copy link

@copybara-service copybara-service bot commented Jun 10, 2025

[JAX] Extend colocated_cpu_devices to accept Mesh besides devices

This change extends existing colocated_cpu_devices to take a JAX Mesh and
returns a new Mesh that uses colocated CPU devices. This conversion is a
common operation when using colocated Python because the user copies arrays
between two meshes while preserving other sharding properties of the array.

@copybara-service copybara-service bot force-pushed the test_769828365 branch 4 times, most recently from 0443153 to 58e85f2 Compare June 11, 2025 01:55
@copybara-service copybara-service bot changed the title [JAX] Add colocated_cpu_mesh and colocated_cpu_sharding APIs for colocated Python [JAX] Extend colocated_cpu_devices to accept Mesh besides devices Jun 11, 2025
@copybara-service copybara-service bot force-pushed the test_769828365 branch 2 times, most recently from e2381ed to 852f109 Compare June 11, 2025 17:38
This change extends existing `colocated_cpu_devices` to take a JAX `Mesh` and
returns a new `Mesh` that uses colocated CPU devices. This conversion is a
common operation when using colocated Python because the user copies arrays
between two meshes while preserving other sharding properties of the array.

PiperOrigin-RevId: 770223744
@copybara-service copybara-service bot merged commit 5c2a320 into main Jun 11, 2025
@copybara-service copybara-service bot deleted the test_769828365 branch June 11, 2025 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant