-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Have mapreduce
dispatch on Returns
?
#42333
Comments
I don't think this will give you the same result for many inputs. It's also getting a bit close for comfort imho of turning Julia into a CAS. As soon as you introduce something "algebraically" like |
I'm not sure what you mean. It should work for any
Yes, that weighting is non trivial. In terms of compilation cost it does not seem worse, slightly better if anything. But I agree that general bloat is an issue. |
This requires I also agree with Kristoffer that adding this to |
You're right, there needs to be some restriction of the type of
Based on the amount of specialization I've come across in I sort of expected this to be have been implemented already. Dispatching on |
IMO the selling point is reduced compilation as mentioned in #39794 (comment). I don't think heavily dispatch on |
Right; dispatching on
As you can see, no loop. |
Nice! Not sure what happens with the current One could also consider if it should be possible to do You guys have a better idea of the trade-off weighting. It seemed like a typical place for specialization, but as you say, it may not necessarily be a good idea. |
The type
Returns
was added in #39794 . For example, ifsum(f, x)
is used for some user-specified regularization penalty onx
, thenf = Returns(0)
could be used to conveniently "turn off" that regularizationIt seems neat to have
mapreduce
dispatch onReturns
, e.g.,Any thoughts?
(Note that
mapreduce
is surprisingly fast as it is, for the case above it was5 ms
(?!) without specialized dispatch. Btw, I*m a bit curious how it can be that fast.)The text was updated successfully, but these errors were encountered: