-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
FusedAggregation
of simple scatter reductions
#6036
Conversation
rusty1s
commented
Nov 22, 2022
•
edited
Loading
edited
Codecov Report
@@ Coverage Diff @@
## master #6036 +/- ##
==========================================
- Coverage 86.70% 84.86% -1.84%
==========================================
Files 360 361 +1
Lines 19967 20097 +130
==========================================
- Hits 17312 17055 -257
- Misses 2655 3042 +387
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
Amazing. I really like it!
An open discussion: I wonder if it is possible to move these caching logics into these aggregations ( I think I am wrong. It is not efficient to parallelize the computation in this way.MeanAggregation
, VarAggregation
, StdAggregation
) that may utilize caches. We can first sort the executions of aggregations based on caching dependence and maintain caching results for the degree
, sum
, mean
, and var
into a buffer that the later aggregations can read. That may make the control flow a bit clear. Just a random thought. Essentially they are the same but moving the caching logic to the Aggregation may be easier to read.
@lightaime Yeah, I would like to avoid using |
+------------------------------+---------+---------+ | Aggregators | Vanilla | Fusion | +==============================+=========+=========+ | :obj:`[sum, mean]` | 0.4019s | 0.1666s | +------------------------------+---------+---------+ | :obj:`[sum, mean, min, max]` | 0.7841s | 0.4223s | +------------------------------+---------+---------+ | :obj:`[sum, mean, var]` | 0.9711s | 0.3614s | +------------------------------+---------+---------+ | :obj:`[sum, mean, var, std]` | 1.5994s | 0.3722s | +------------------------------+---------+---------+