Skip to content

Allow all shardings if exported.nr_devices is 1 in _export.py. #29690

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 25, 2025

Conversation

copybara-service[bot]
Copy link

Allow all shardings if exported.nr_devices is 1 in _export.py.

If exported.nr_devices == 1, any sharding is equivalent to replicated sharding. The sharding in the exported function is meaningless.

We also update test cases, where

  • meshes of size 1 and n can share the same exported module
  • meshes of size 2 and n cannot share the same exported module

@copybara-service copybara-service bot force-pushed the test_775223333 branch 2 times, most recently from 7ae8a67 to e75e1a8 Compare June 25, 2025 07:11
If `exported.nr_devices == 1`, any sharding is equivalent to replicated sharding. The sharding in the exported function is meaningless.

We also update test cases, where
* meshes of size 1 and n can share the same exported module
* meshes of size 2 and n cannot share the same exported module

PiperOrigin-RevId: 775560222
@copybara-service copybara-service bot merged commit 67bf78a into main Jun 25, 2025
1 check was pending
@copybara-service copybara-service bot deleted the test_775223333 branch June 25, 2025 07:28
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