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

[sharding_in_types] Enforce AxisTypes to always exist if set_mesh is used. #25391

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

copybara-service[bot]
Copy link

[sharding_in_types] Enforce AxisTypes to always exist if set_mesh is used.

Also support Auto mode fully or mixed in with User mode. This works by overriding the sharding of Auto axes in the PartitionSpec with Unconstrained in ShapedArray constructor. The ShapedArray constructor is the central place where we can make such substitutions.

During lowering of shardings with auto axes, we mark the auto dims are unspecifed_dims. We don't mark all dims as unspecified because that would enable XLA to shard them even further which is not what we want if some of the dims are user sharded.

@copybara-service copybara-service bot force-pushed the test_703218126 branch 2 times, most recently from 0c87317 to 283611e Compare December 11, 2024 01:48
…s used.

Also support `Auto` mode fully or mixed in with `User` mode. This works by overriding the sharding of `Auto` axes in the PartitionSpec with `Unconstrained` in `ShapedArray` constructor. The `ShapedArray` constructor is the central place where we can make such substitutions.

During lowering of shardings with auto axes, we mark the auto dims are `unspecifed_dims`. We don't mark all dims as unspecified because that would enable XLA to shard them even further which is not what we want if some of the dims are user sharded.

PiperOrigin-RevId: 704911253
@copybara-service copybara-service bot merged commit b5e4fd1 into main Dec 11, 2024
@copybara-service copybara-service bot deleted the test_703218126 branch December 11, 2024 02:03
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