-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
WIP/RFH: Make dims a keyword argument to reducing functions #25831
Conversation
The at-inferred macro, when presented with a kwargs call, previously would ask return types about the function directly. This is an accurate representation of how the call behaves at top/global scope, but typically we are much more interested in the behavior of the function when called from another function with well-typed arguments. Within this context, the compiler can use inlining and other optimizations that allow some keyword functions to recover type-stability. This is becoming a common idiom within base. This patch changes the behavior of at-inferred to test the behavior of the `f(args..., kwargs...)` expression as though it were placed directly as written within an anonymous function. Required for #25831.
The at-inferred macro, when presented with a kwargs call, previously would ask return types about the function directly. This is an accurate representation of how the call behaves at top/global scope, but typically we are much more interested in the behavior of the function when called from another function with well-typed arguments. Within this context, the compiler can use inlining and other optimizations that allow some keyword functions to recover type-stability. This is becoming a common idiom within base. This patch changes the behavior of at-inferred to test the behavior of the `f(args..., kwargs...)` expression as though it were placed directly as written within an anonymous function. Required for #25831.
afac66d
to
ece50d6
Compare
The at-inferred macro, when presented with a kwargs call, previously would ask return types about the function directly. This is an accurate representation of how the call behaves at top/global scope, but typically we are much more interested in the behavior of the function when called from another function with well-typed arguments. Within this context, the compiler can use inlining and other optimizations that allow some keyword functions to recover type-stability. This is becoming a common idiom within base. This patch changes the behavior of at-inferred to test the behavior of the `f(args..., kwargs...)` expression as though it were placed directly as written within an anonymous function. Required for #25831. (cherry picked from commit 7cf3586)
ece50d6
to
bf5bdbd
Compare
Inference issue, as requested by @JeffBezanson
|
|
Or I guess it could still be called |
The inconsistency with |
Consistency is required for an implementation of |
Heavily WIP. If you're reading this, you can pretty much ignore this for now.
Still to do:
cum(sum|prod)
,var
,std
, etc.Fixes #25501.