-
Notifications
You must be signed in to change notification settings - Fork 527
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] Clean Up #include
Dependencies
#3402
[REVIEW] Clean Up #include
Dependencies
#3402
Conversation
…ixed allocator paths, moved device_buffer to include.
#include
Dependencies#include
Dependencies
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 read the python and cmakelists files in some detail, but went pretty quickly over the headers. Headers look good. Just a couple small changes to check out. Let's discuss timing separately.
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.
It is finally great to see our C-API also evolving!
…C-API from C code.
After reviewing @teju85 comments, I've updated the C-API structure a bit and added back in the To ensure the C-API can actually be used, I added a simple test library that is compiled only in C and imports I would appreciate a re-review on the updated changes if possible. I still believe this PR is low ris because most changes are to |
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.
Just left 2 suggestions but changes, particularly the new C api tests look great!
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.
Looks great, just one question (and one tiny change). You flipped a couple of includes from absolute to relative and others from relative to absolute. How should we think about the simplest rule for when to prefer absolute or relative #includes?
@JohnZed The changes between relative and absolute were due to the script
While these rules are the ones the |
rerun tests |
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.
Yes, @mdemoret-nv you are right. For the libraries which expose a C-API, but use g++
(for whatever reasons), we'll have to put these __cplusplus
guards. Thank you for fixing it.
Really appreciate you adding a C-API testing in here!
LGTM.
@gpucibot merge |
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:
*_api.cpp
file (some were combined with C++ files)host_buffer
,device_buffer
,hostAllocator
anddeviceAllocator
were moved fromsrc_prims
toinclude
#include <common/cumlHandle.hpp>
has been removed from all C++ files.This PR includes some additional improvements:
include_checker.py
script:#pragma once
#pragma once
using namespace ...
in header files outside of a namespace#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:
After:
src/src_prims
:Before:
After: