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

Update the docstring of jax.lax.switch #25179

Merged
merged 1 commit into from
Dec 2, 2024

Conversation

rajasekharporeddy
Copy link
Contributor

Related to #25140

@dfm dfm requested a review from mattjj December 2, 2024 16:04
@@ -87,6 +87,7 @@ def switch(index, branches, *operands):
Args:
index: Integer scalar type, indicating which branch function to apply.
branches: Sequence of functions (A -> B) to be applied based on ``index``.
The output shapes of all branches must match.
Copy link
Collaborator

Choose a reason for hiding this comment

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

In general, the branches may return pytrees. Maybe we should say "All branches must return the same output structure"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks! Done.

@jakevdp jakevdp self-assigned this Dec 2, 2024
Copy link
Collaborator

@jakevdp jakevdp left a comment

Choose a reason for hiding this comment

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

Thanks!

@google-ml-butler google-ml-butler bot added kokoro:force-run pull ready Ready for copybara import and testing labels Dec 2, 2024
@copybara-service copybara-service bot merged commit 385328b into jax-ml:main Dec 2, 2024
7 of 8 checks passed
@rajasekharporeddy rajasekharporeddy deleted the lax_switch branch December 3, 2024 06:36
@gnecula gnecula self-assigned this Jan 9, 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.

4 participants