-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Add support for lax.pmean
#929
Comments
I think you can do |
That works fine. Still would be nice if there's a way to obtain the axis_size in some other way. I didn't benchmark but doesn't this compile into something that will do an additional AllReduce? |
Actually no, So in short, the computation being generated by What do you think? |
You could close this issue as it was implemented and merged in #2081, except that it somehow is missing from the reference ? |
Thanks for noticing that oversight! #2778 will add pmean to the docs. |
When using pmap I often miss a parallel mean function
lax.pmean(x, axis_name)
.I guess it's not too complicated to write
lax.psum / axis_size
. However, there is currently also no way to retrieve the size of a parallel axis within a parallel computation.The text was updated successfully, but these errors were encountered: