Skip to content

[SYSTEMDS-3334] Code-gen rewrite ROWMAXS_VECTMULT#1566

Closed
corepointer wants to merge 1 commit into
apache:mainfrom
corepointer:components_codegen
Closed

[SYSTEMDS-3334] Code-gen rewrite ROWMAXS_VECTMULT#1566
corepointer wants to merge 1 commit into
apache:mainfrom
corepointer:components_codegen

Conversation

@corepointer
Copy link
Copy Markdown
Contributor

@corepointer corepointer commented Mar 20, 2022

This patch adds a rewrite to avoid vector intermediates in the generated row template of connected components by doing the elementwise multiplication, row_maxs and max in one pass.

Works only for a certain small input size. Then other rewrites seem to get to modify the DAG before this pattern can be tested. E.g., tested with 1000 nodes -> works, tested with 100000 nodes -> pattern not applied because DAG is already different.

This is for java codegen only. The CUDA version works analogously and will be pushed with other pending CUDA codegen changes (and after the input size issue is fixed)

This patch adds a rewrite to avoid vector intermediates in the generated row template of connected components by doing the elementwise multiplication, row_maxs and max in one pass.
@corepointer corepointer changed the title [SYSTEMDS-3334] Code-gen rewrite AGGMAX_ROWMAXS_VECTMULT [SYSTEMDS-3334] Code-gen rewrite ROWMAXS_VECTMULT Apr 20, 2022
@corepointer corepointer marked this pull request as ready for review April 20, 2022 11:22
@corepointer
Copy link
Copy Markdown
Contributor Author

The rewrite was tuned down from max(rowMaxs(vec_mult())) to only rowMaxs(vect_mult()). This way the rewrite would apply more easily. The subsequent max() was fused anyway.
Nevertheless, the rewrite still has issues with memory estimates when running hybrid and/or GPU exec modes.
And last but not least this is an over-specialized rewrite that could be generalized into agg+vect_op.
Will close with initial working implementation for Java + CUDA (leaving the mentioned issues as future work)

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.

1 participant