-
Notifications
You must be signed in to change notification settings - Fork 197
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
[ENH] [1/5] Header structure: replace specializations #1437
[ENH] [1/5] Header structure: replace specializations #1437
Conversation
Instead of having the specializations in sub-directories, the raft_runtime source files now mimic the include/ directory hierarchy.
Used .data() instead of .data_handle()
These types are not used in the ext header, but are useful to have.
Review tip: I have moved the headers by adding the |
Indeed filtering the commits help tremendously. We have large mechanical changes in, the following commits:
It make sense to review these 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.
Thanks Allard for breaking up the oiriginal PR (#1415) into multiple pieces! Also thanks for the detailed description of the changes in the PR description. The questions I had for #1415 are already answered here (or a tracking issue is created). I have one question left, but that could be answered in a follow up PR.
Overall the PR looks good to me, and I am excited about the compile time improvements that we can get once we go through all the steps outlined here and in he follow up PRs.
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.
These changes look great to me - I'm really looking forward to having this series of PR's merged, I think the improvements to build times will make RAFT development much easier.
I'd like to see the corresponding downstream PR's pass CI before getting this merged (like rapidsai/cuml#5363) - do you know why its failing with cuda 11.2/11.4 but working with 11.8? The failure looks like a missing symbol w/ the RusselRao distance
In [3]: import cpp_demangle
In [4]: cpp_demangle.demangle("_ZN4raft8distance8distanceILNS0_12DistanceTypeE18EfffiEEvRKNS_9resourcesEPKT0_S8_PT2_T3_SB_SB_bS6_")
Out[4]: 'void raft::distance::distance<(raft::distance::DistanceType)18, float, float, float, int>(raft::resources const&, float const*, float const*, float*, int, int, int, bool, float)'
@vyasr actually fixed this one today. It turns out some recent changes to the conda packages were causing the cuda toolkit to get pinned to a specific version (11.8) and it was causing cuml's CI to pull in an old version of raft packages for other cuda versions. Cuml's CI should run fine now (assuming theres no failures from the changes in this PR) |
Some of the headers was split under the The public API did not change in any of the cases, so functionally the current status is fine. But I think it is nicer if we split the files under the detail folder when possible. I would prefer if we do not hold up this PR for such cosmetic changes, but we should consider returning to this question. |
Splitting at detail rather than at public level was done for three reasons:
I think we should favor splitting at the public level. This is beneficial for two reasons: (1) to document which instances exist and (2) to allow downstream libraries to instantiate templates themselves. Instancing at public level allows downstream libraries to opt in to |
Good points! |
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.
Really looking forward to these changes, @ahendriksen! I've gone through all the files and I think everything looks good, with the exception of some trivial things (mostly docs related).
Co-authored-by: Corey J. Nolet <[email protected]>
Co-authored-by: Corey J. Nolet <[email protected]>
Co-authored-by: Corey J. Nolet <[email protected]>
Co-authored-by: Corey J. Nolet <[email protected]>
80abe51
to
fa523aa
Compare
This is a rebase of all the commits in PRs: - #1437 - #1438 - #1439 - #1440 - #1441 The original PRs have not been rebased to preserve review comments. This PR is up to date with branch 23.06. Closes #1416 Authors: - Allard Hendriksen (https://github.com/ahendriksen) Approvers: - Divye Gala (https://github.com/divyegala) - Corey J. Nolet (https://github.com/cjnolet) URL: #1469
This PR replaces the specialization headers with a split header structure. It is a more reviewable version of #1415.
This is achieved by following the strategy outlined in issue #1416.
The following steps are performed:
Preparatory
header.cuh
toheader-inl.cuh
to preserve history and minimize the diff in later comits.rbf_fin_op
that can be used to instantiate templates later on.registers.cuh
.Meat of PR: Use header structure as outlined in the new documentation.
header-inl.cuh
, addheader.cuh
andheader-ext.cuh
-ext
header.src/distance/specializations/detail/kernels
. They were in fact not used in the tests, one did not compile, and adding instances would have caused conflicts with PR Gram matrix support for sparse input #1296. This was decided with @tfeher here.#pragma message
.Fixup: Add some more template instances, remove unnecessary functions, fix a test.
instantiation
in code comments consistent with docs.selection.cu
. If it were built withRAFT_EXPLICIT_INSTANTIATE_ONLY
, thenkFaissMax
would not be defined. By splitting it out into a separate header, it can be used regardless.