Skip to content

Fix handling of input None in custom_transpose. #29030

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
May 28, 2025

Conversation

dfm
Copy link
Contributor

@dfm dfm commented May 27, 2025

Fixes #29009

#29009 points out that using custom_transpose when some of the linear arguments are None. Since we treat a user-returned None as a symbolic zero, we would end up with a Pytree mismatch in the case where an input was None. In this case, the cotangent corresponding to an input None should be dropped, rather than returned.

@dfm dfm requested a review from froystig May 27, 2025 15:05
@dfm dfm self-assigned this May 27, 2025
@google-ml-butler google-ml-butler bot added kokoro:force-run pull ready Ready for copybara import and testing labels May 28, 2025
@copybara-service copybara-service bot merged commit f32ce04 into jax-ml:main May 28, 2025
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kokoro:force-run pull ready Ready for copybara import and testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

custom transpose fails on user provided None values
2 participants