Skip to content

Conversation

@mfdeakin
Copy link
Owner

Use the model to reduce adaptive evalution costs, deciding at compile time whether the linear merge sums + required lower level merge sums is better than just using the top level quadratic merge sum
Correct the estimated quadratic merge latency model to account for the quadratic merge assuming neither sums have been built as non-overlapping and non-adjacent
Add eval_type to the latency estimates, needed for two_sum which may has different characteristics for vector_type outputs

sum rather than the standard quadratic merge sum

Use the model to reduce adaptive evalution costs, deciding at compile
time whether the linear merge sums + required lower level merge sums is better
than just using the top level quadratic merge sum
Correct the estimated quadratic merge latency model to account for the
quadratic merge assuming neither sums have been built as
non-overlapping and non-adjacent
Add eval_type to the latency estimates, needed for two_sum which may
has different characteristics for `vector_type` outputs
TODO: Fix the failing adaptive test cases
Detect if subtrees are merged or not when using the linear merge,
if not, then merge them individually before performing the linear merge
Always perform a linear merge higher levels of the expression tree are expecting it
Implement and use sparse_mult_merge, the algorithm used to multiply two partial sums of strongly non-adjacent values with the result being strongly non-adjacent
Apparently slightly bugged, need to diagnose the issue
@codecov-commenter
Copy link

codecov-commenter commented Feb 3, 2024

Codecov Report

Attention: Patch coverage is 97.03947% with 9 lines in your changes are missing coverage. Please review.

Project coverage is 98.14%. Comparing base (894bde9) to head (562261c).

Files Patch % Lines
src/ae_fp_eval_impl.hpp 93.33% 7 Missing ⚠️
src/ae_adaptive_predicate_eval.hpp 96.49% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main       #8      +/-   ##
==========================================
+ Coverage   98.06%   98.14%   +0.08%     
==========================================
  Files          13       14       +1     
  Lines        1034     1241     +207     
==========================================
+ Hits         1014     1218     +204     
- Misses         20       23       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Also add zero-pruning to the (slow) linear merge, gives substantial
performance improvements (~150 us to ~15 us)
Probably incurs a performance penalty to expressions using it
Also move common helful functors like is_nonzero and zero_prune_store
to utils
More cleanup, move copy_nonzero to utils, use zero_prune_store_inc
some more
Split out the binary recursive merge from the sparse_mult_merge
method, implement it as the standard recursive merge + zero pruning
Use somewhat better names in sparse_mult_merge_term
@mfdeakin mfdeakin force-pushed the adaptive_linear_merge branch from bb7f7c2 to 7d86934 Compare February 25, 2024 15:53
Add multiplication implementation tests
Remove zero_prune_store_dec, rename zero_prune_store_inc to
zero_prune_store
More uses of zero_prune_store instead of copy-pasta
Now do only necessary work, don't add, negate, or multiply zeros
Remove non-zero filtering
@mfdeakin mfdeakin force-pushed the adaptive_linear_merge branch from 6a36e71 to 562261c Compare February 28, 2024 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants