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

jax.numpy: implement window functions in terms of lax ops #13023

Merged
merged 2 commits into from
Oct 28, 2022

Conversation

jakevdp
Copy link
Collaborator

@jakevdp jakevdp commented Oct 27, 2022

Including blackman, bartlett, hamming, hanning, kaiser.

Why? Previously these were implemented by computing the output on host at trace-time and embedding the result as a large constant array. Computing the results via lax operations is more in the spirit of jax.numpy.

Fixes #13014

Including blackman, bartlett, hamming, hanning, kaiser.

Why? Previously these were implemented by embedding large constants; this should be more performant.
Including blackman, bartlett, hamming, hanning, kaiser.

Why? Previously these were implemented by computing the output on host at trace-time and embedding the result as a large constant array. Computing the results via lax operations is more in the spirit of jax.numpy.
Copy link
Member

@froystig froystig left a comment

Choose a reason for hiding this comment

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

Nice catch and nice fix!

@google-ml-butler google-ml-butler bot added kokoro:force-run pull ready Ready for copybara import and testing labels Oct 28, 2022
@copybara-service copybara-service bot merged commit 1816263 into google:main Oct 28, 2022
@jakevdp jakevdp deleted the jnp-window branch October 28, 2022 15:51
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.

Numpy window functions produce large constants
3 participants