-
Notifications
You must be signed in to change notification settings - Fork 24.5k
WIP Jiterator reduction #74446
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 Jiterator reduction #74446
Conversation
CI Flow Status⚛️ CI FlowRuleset - Version:
|
🔗 Helpful links
💊 CI failures summary and remediationsAs of commit 5d7bf9e (more details on the Dr. CI page): 💚 💚 Looks good so far! There are no failures yet. 💚 💚 This comment was automatically generated by Dr. CI (expand for details).Please report bugs/suggestions to the (internal) Dr. CI Users group. |
curious, will this line of work enable in the future jit-generation of economic, copy/upcast-avoiding variants to solve #55366 ? |
Yes, it will! We would still like to avoid jit-compiling the cross-product of dtype conversions, but we should be able to more easily accommodate some common cases like bool/uint8 -> int/int64 |
about cross-product: if it's jit-compiling, a given program rarely uses full cross-product, so it may be interesting to have a regime that indeed allows for jit-compiling everything (or more of things) at the expense of slower warmup (maybe by |
51cb728
to
8169287
Compare
@ngimel has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Still wip? Otherwise I'll try to have a proper look at it on Monday |
No longer wip, tests are passing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
@pytorchbot merge this please |
Hey @ngimel. |
@pytorchbot revert this, broke internal tests with:
|
This reverts commit ad028e5. Reverted #74446 on behalf of https://github.com/seemethere
This PR enables jit-compiled reductions and moves
prod
to be jit-compiled.Currently, only reductions that can use
func_wrapper
for automatic implementation ofreduce/project/translate_idx
opes are supported, there are a few TODOs for support of more complex reductions such as norms and max, that typically require full-fledged ReduceOps functor. Similarly, only reductions with a single input are supported.Number of inputs is hardcoded to 1, which is true for our current reductions, but can be relaxed in the future.