-
Notifications
You must be signed in to change notification settings - Fork 553
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
[BUG] Clean Up #include
Dependencies
#3376
Labels
bug
Something isn't working
Build or Dep
Issues related to building the code or dependencies
CUDA / C++
CUDA issue
Tech Debt
Issues related to debt
Comments
18 tasks
rapids-bot bot
pushed a commit
that referenced
this issue
Feb 5, 2021
Closes #3376 This PR moves a few header files around to fix bad dependencies from `include` -> `src`. Moving forward, the only allowed `#include` direction will be: - `src` -> `include` - `src` -> `src_prims` - `src_prims` -> `include` To facilitate this, a few changes needed to be made: 1. Functions for the C-API have been separated into their own `*_api.cpp` file (some were combined with C++ files) 2. `host_buffer`, `device_buffer`, `hostAllocator` and `deviceAllocator` were moved from `src_prims` to `include` 3. `#include <common/cumlHandle.hpp>` has been removed from all C++ files. This PR includes some additional improvements: - Updated the `include_checker.py` script: - Added functionality to check for badly placed `#pragma once` - Added functionality to fix some of the existing warnings - General refactor to support more checks - Fixed all incorrect uses of `#pragma once` - Fixed incorrect uses of `using namespace ...` in header files outside of a namespace - Removed some unnecessary `#include` While this touches a lot of files, the actual number of changes is relatively small. Below is a before/after comparison of the include graphs: **`src/include`:** Before: ![image](https://user-images.githubusercontent.com/42954918/105561661-ab32fe00-5cd4-11eb-8850-bfeaffaba60f.png) After: ![image](https://user-images.githubusercontent.com/42954918/105561673-b4bc6600-5cd4-11eb-8bb7-04be91f902b6.png) **`src/src_prims`:** Before: ![image](https://user-images.githubusercontent.com/42954918/105561616-79ba3280-5cd4-11eb-8a49-1d0c030df7c1.png) After: ![image](https://user-images.githubusercontent.com/42954918/105561633-89397b80-5cd4-11eb-9702-27b2a809834b.png) Authors: - Michael Demoret (@mdemoret-nv) Approvers: - Dante Gama Dessavre (@dantegd) - John Zedlewski (@JohnZed) - Thejaswi. N. S (@teju85) URL: #3402
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Something isn't working
Build or Dep
Issues related to building the code or dependencies
CUDA / C++
CUDA issue
Tech Debt
Issues related to debt
Discovered in PR #3367, there are dependencies to
cpp/src
from the include folder, C-API, prims, tests, benchmark, etc. which causes issues when determining cmakePUBLIC
interface includes forlibcuml++
. Due to this dependency,cpp/src
needs to be listed asPUBLIC
, implying it would be installed into theinclude
directory on a system. Since this does not happen, any dependent cmake package or third party library will run into issues.A quick search shows that many of the issues are related to
#include <common/cumlHandle.hpp>
which resides incpp/src
. This file is included from:cpp/bench/sg/dataset.cuh
cpp/include/cuml/neighbors/knn.hpp
include
should not depend onsrc
cpp/src/dbscan/dbscan_api.cpp
cpp/test/prims/gram.cu
We should be able to remove this dependency with the addition of
raft::handle_t
.Additionally, it would be worthwhile to do the following optional but beneficial improvements:
This issue is related to (and partially blocks) issue #3375
The text was updated successfully, but these errors were encountered: