-
Notifications
You must be signed in to change notification settings - Fork 311
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] Reorganized cugraph source directory #286
[REVIEW] Reorganized cugraph source directory #286
Conversation
nvgraph_gdf no longer include library_types.h
The new graph categories look good to me. I noticed another big change in this PR. The API implementation is now split across internal "backend" files whereas it used to be in a single file ( |
Ideally, we should merge PRs that are based on top of the former directory organization first. Such as PR #287 |
Yes, and I am also planning to submit a PR pretty soon, and it touches multiple files. The reorganization may better happen after that PR gets merged. The cudf team is planning to adopt the following file structure (https://github.com/rapidsai/cudf/blob/branch-0.7/cpp/docs/TRANSITIONGUIDE.md).
We should also start replacing existing .h files with .hpp files and renaming/regrouping/splitting public header files to match our new directory structure (we may also need this for internal header files but I guess this is less important/urgent than public ones). And this may be outside the scope of this reorganization (PLEASE IGNORE ANYTHING FROM HERE IF THEY ARE OUTSIDE THE SCOPE) but the cudf team is planning to explicitly separate external APIs from internal implementations through namespace (https://github.com/rapidsai/cudf/blob/branch-0.7/cpp/docs/TRANSITIONGUIDE.md#detail-namespace). Following this, we should do namespace cugraph { external APIs. } // namespace cugraph namespace cugraph { internal implementations. } // namespace detail And all functions specific to a translation unit (functions or data types relevant only to a single compiled file, or static functions) go to anonymous namespace. namespace { implementations only relevant to a single translation unit. } So every source file should look like.
See https://github.com/rapidsai/cudf/blob/branch-0.8/cpp/src/copying/gather.cu for a cudf's example. And we may not be considering cpp/nvgraph here, but we should think about seemingly unused directories/files under cpp/nvgraph (e.g. cpp/nvgraph/test, cpp/nvgraph/cpp/tests, cpp/nvgraph/include/app, cpp/nvgraph/include/tests and so on). And cpp/nvgraph has two directories for external packages (cpp/nvgraph/external and cpp/nvgraph/cpp/thirdparty). These two directories may better be merged to one. |
directory structure matches NewtworkX - I don't agree that Jaccard is link prediction, but that is a side issue :) |
@seunghwak I think it makes sense to address the We should create issues for header splitting and h/hpp renaming. This is something we should have on the radar but it is not as critical as it is for cuDF. For instance, cuDF has headers with 1200+ lines while ours have less than 20 functions. We should do it too, but probably not hold this PR for that. |
should we merge |
I have renamed the file for clarity.
We need separate files because the templated class is being used elsewhere and defining the function in cuh files is going to be problematic. |
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.
I like the new structure. We will need to think about snmg since wit could mimic the same structure. It might eventually go into a dask_cugraph repop.
I think we should get this merged and then address any issues in a separate PR
Fixes #258