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

ivf_flat::index: hide implementation details #747

Merged
merged 147 commits into from
Aug 24, 2022

Conversation

achirkin
Copy link
Contributor

Hide the mutable mdarray members of ivf_flat::index behind immutable mdspan views.

achirkin and others added 30 commits May 13, 2022 10:51
…eparate out cuivfl handle init in separate func
Co-authored-by: Tamas Bela Feher <tfeher@nvidia.com>
Co-authored-by: Tamas Bela Feher <tfeher@nvidia.com>
@github-actions github-actions bot added the cpp label Jul 22, 2022
Copy link
Contributor

@tfeher tfeher left a comment

Choose a reason for hiding this comment

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

Thanks @achirkin for these updates, I have a few small comments, otherwise in general it looks good to me.

cpp/include/raft/spatial/knn/ivf_flat.cuh Show resolved Hide resolved
cpp/include/raft/spatial/knn/detail/ann_utils.cuh Outdated Show resolved Hide resolved
}

/** Inverted list indices: ids of items in the source data [size] */
[[nodiscard]] inline auto indices() const noexcept
Copy link
Member

Choose a reason for hiding this comment

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

This looks really nice and clean and it designates the ivf_flat::index as the owning object without having to deal w/ the complexities and maintenance of transferring that ownership. I like this a lot.

@achirkin achirkin self-assigned this Jul 28, 2022
@github-actions github-actions bot removed the CMake label Jul 28, 2022
@achirkin achirkin marked this pull request as ready for review July 28, 2022 08:05
@achirkin
Copy link
Contributor Author

achirkin commented Jul 28, 2022

This PR is ready for review, but should only be merged after #764 due to a bug in mdarrays (which causes cuml tests to segfault).

Copy link
Contributor

@tfeher tfeher left a comment

Choose a reason for hiding this comment

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

Thanks Artem for addressing the issues! The PR looks good to me.

@achirkin achirkin changed the base branch from branch-22.08 to branch-22.10 August 9, 2022 07:30
@cjnolet
Copy link
Member

cjnolet commented Aug 24, 2022

rerun tests

@cjnolet
Copy link
Member

cjnolet commented Aug 24, 2022

@achirkin I notice this PR is breaking but from the looks of the changes, it's only breaking for the new IVF-flat index API, right? If that's the case, are there any active consumers of this API that you know of which would break if we merged this?

@achirkin
Copy link
Contributor Author

Yes, I marked it breaking because of the changes in the bew ivf-flat api, and I am not aware of anybody using it yet.

@cjnolet
Copy link
Member

cjnolet commented Aug 24, 2022

@gpucibot merge

@rapids-bot rapids-bot bot merged commit ab9a695 into rapidsai:branch-22.10 Aug 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Ready for Review breaking Breaking change cpp improvement Improvement / enhancement to an existing function
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants