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] OPG degree #840

Merged
merged 22 commits into from
May 6, 2020
Merged

[REVIEW] OPG degree #840

merged 22 commits into from
May 6, 2020

Conversation

afender
Copy link
Member

@afender afender commented Apr 28, 2020

close #810

  • Added temporary comm class (to be replaced by RAFT). It is a lightweight stopgap that should be easy to replace.
  • Added a path to set the communicator in GraphBase (might move to the Handle once we have it)
  • OPG edge list host partitioner (1D) for testing
  • C++ OPG Out degree implementation and test

@afender afender requested a review from Iroy30 April 28, 2020 23:38
@afender afender requested review from a team as code owners April 28, 2020 23:38
@afender
Copy link
Member Author

afender commented Apr 28, 2020

Expected output
Screen Shot 2020-04-28 at 6 45 22 PM

cpp/include/graph.hpp Outdated Show resolved Hide resolved
cpp/src/comms/mpi/comms_mpi.cpp Outdated Show resolved Hide resolved
cpp/src/comms/mpi/comms_mpi.hpp Outdated Show resolved Hide resolved
cpp/src/structure/graph.cu Outdated Show resolved Hide resolved
cpp/src/structure/graph.cu Show resolved Hide resolved
@codecov-io
Copy link

codecov-io commented May 1, 2020

Codecov Report

Merging #840 into branch-0.14 will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##           branch-0.14     #840   +/-   ##
============================================
  Coverage        47.92%   47.92%           
============================================
  Files               44       44           
  Lines             1327     1327           
============================================
  Hits               636      636           
  Misses             691      691           

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 631bbaa...07feb33. Read the comment docs.

@@ -330,6 +330,7 @@ link_directories(
"${CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES}")

add_library(cugraph SHARED
src/comms/mpi/comms_mpi.cpp
Copy link
Member

Choose a reason for hiding this comment

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

Should this also be in a "BUILD_MPI" block? there is no need to include the file if mpi is not going to be built.

Copy link
Member Author

@afender afender May 5, 2020

Choose a reason for hiding this comment

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

When BUILD_MPI is OFF, the communicator member functions become no-op. This allows running through the existing path without contaminating the whole code base with #ifdef ENABLE_OPGoutside of the communicator class.

cpp/include/comms_mpi.hpp Outdated Show resolved Hide resolved
// CUDA

CUDA_TRY(cudaGetDeviceCount(&_device_count));
_device_id = _rank % _device_count; // FixMe : assumes each node has the same number of GPUs
Copy link
Member

Choose a reason for hiding this comment

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

This seems like it could be an issues. We should discuss configuration and how to handle
you also only set one device and not one per rank

Copy link
Member Author

Choose a reason for hiding this comment

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

This seems like it could be an issues. We should discuss configuration and how to handle

I think it is fine. We expect python to set the device and this code to be removed. This is just for C++ smoke tests for now so that I can validate the progress on the C++ part.

you also only set one device and not one per rank

No, it does set one device per rank. In an OPG environment, this section of the code is traversed by all ranks, each one will retrieve and set its own GPU based on its rank.

cpp/src/comms/mpi/comms_mpi.cpp Outdated Show resolved Hide resolved
degree_from_vertex_ids(GraphBase<VT,ET,WT>::number_of_edges, src_indices, degree, stream);
if (GraphBase<VT,ET,WT>::comm.get_p()) // FixMe retrieve global source indexing for the allreduce work
CUGRAPH_FAIL("OPG degree not implemented for OUT degree");
degree_from_vertex_ids(GraphBase<VT,ET,WT>::comm, GraphBase<VT,ET,WT>::number_of_vertices, GraphBase<VT,ET,WT>::number_of_edges, src_indices, degree, stream);
Copy link
Member

Choose a reason for hiding this comment

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

Is it GraphBase or new GraphBaseView? PR #799 might need to be merged first

Copy link
Member Author

Choose a reason for hiding this comment

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

We would need to reconcile either way.

Copy link
Contributor

@Iroy30 Iroy30 left a comment

Choose a reason for hiding this comment

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

LGTM

@Iroy30
Copy link
Contributor

Iroy30 commented May 5, 2020

It would be good to be able to run these changes on CI with mpi build ON

@BradReesWork BradReesWork merged commit 3f78243 into rapidsai:branch-0.14 May 6, 2020
@afender afender deleted the opg_degree branch April 5, 2021 18:55
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.

[FEA] Degree
5 participants