Skip to content
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

[REVIEW] Improve memory scaling for low average vertex degree graphs & many GPUs #1823

Merged
merged 80 commits into from
Sep 22, 2021

Conversation

seunghwak
Copy link
Contributor

@seunghwak seunghwak commented Sep 16, 2021

Assuming sqrt(P) is an integer, matrix row/column property array sizes in each GPU scale as V/sqrt(P) while the storage requirement for graph edges scale as E/P. If E/V is small and P is large, the O(V/sqrt(P)) part will dominate the memory requirement and analyzing N times larger graphs will require N^2 times more GPUs; this is unacceptable. However, in this case, at most E/P elements of the V/sqrt(P) sized array will be accessed, so no need to store the whole V/sqrt(P) values. Instead, we can store row/column properties in (key, value) pairs limiting the memory requirement to be the minimum of V/sqrt(P) and E/P.

This PR supports storing matrix row/column properties in (key, value) pairs if the percentage of actually accessed elements is lower than the threshold value (the code has been tested only up to 8 GPUs, and there was no clear benefit at this scale; currently the threshold value is set to 0 and (key, value) pair support is never enabled, but the threshold value will be adjusted later after large scale testing).

@seunghwak seunghwak added Graph Prims improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Sep 16, 2021
@seunghwak seunghwak added this to the 21.10 milestone Sep 16, 2021
@seunghwak seunghwak changed the title [WIP][skip-ci] Improve memory scaling for low average vertex degree graphs & many GPUs [WIP] Improve memory scaling for low average vertex degree graphs & many GPUs Sep 19, 2021
@seunghwak
Copy link
Contributor Author

rerun tests

@seunghwak seunghwak changed the title [WIP] Improve memory scaling for low average vertex degree graphs & many GPUs [REVIEW] Improve memory scaling for low average vertex degree graphs & many GPUs Sep 20, 2021
@seunghwak seunghwak added 3 - Ready for Review and removed 2 - In Progress DO NOT MERGE Hold off on merging; see PR for details labels Sep 20, 2021
@codecov-commenter
Copy link

codecov-commenter commented Sep 20, 2021

Codecov Report

Merging #1823 (318ceff) into branch-21.10 (bf64c2c) will increase coverage by 9.72%.
The diff coverage is n/a.

❗ Current head 318ceff differs from pull request most recent head 78cfbda. Consider uploading reports for the commit 78cfbda to get more accurate results
Impacted file tree graph

@@               Coverage Diff                @@
##           branch-21.10    #1823      +/-   ##
================================================
+ Coverage         59.85%   69.57%   +9.72%     
================================================
  Files                77      139      +62     
  Lines              3547     8645    +5098     
================================================
+ Hits               2123     6015    +3892     
- Misses             1424     2630    +1206     
Impacted Files Coverage Δ
python/cugraph/utilities/grmat.py
python/cugraph/link_analysis/hits.py
python/cugraph/comms/comms.py
python/cugraph/proto/__init__.py
python/cugraph/traversal/traveling_salesperson.py
python/cugraph/community/egonet.py
python/cugraph/utilities/utils.py
python/cugraph/dask/community/louvain.py
python/cugraph/cores/core_number.py
...ph/structure/graph_implementation/npartiteGraph.py
... and 206 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 032f86a...78cfbda. Read the comment docs.

@seunghwak
Copy link
Contributor Author

rerun tests

Copy link
Collaborator

@ChuckHastings ChuckHastings left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description field for this PR should be updated with an actual description of the work.

@BradReesWork
Copy link
Member

@gpucibot merge

@rapids-bot rapids-bot bot merged commit 7cabcd0 into rapidsai:branch-21.10 Sep 22, 2021
@seunghwak seunghwak deleted the enh_mem_scaling branch October 19, 2021 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvement / enhancement to an existing function non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants