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

mdspan view for IVF-PQ API #1236

Merged
merged 18 commits into from
Mar 9, 2023
Merged

Conversation

viclafargue
Copy link
Contributor

Answers #1209

@viclafargue viclafargue requested a review from a team as a code owner February 3, 2023 15:34
@viclafargue viclafargue changed the base branch from branch-23.02 to branch-23.04 February 3, 2023 15:35
@github-actions github-actions bot added the cpp label Feb 3, 2023
@cjnolet cjnolet added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Feb 3, 2023
Copy link
Member

@cjnolet cjnolet left a comment

Choose a reason for hiding this comment

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

Just a few minor things. overall the PR looks great!

We're also going to need to update the python API to remove all the pointer-based runtime APIs and invoke the mdspan-based APIs directly (you can see python/pylibraft/pylibraft/neighbors/refine.pyx for an example of how to do this).

cpp/include/raft/neighbors/ivf_pq.cuh Show resolved Hide resolved
cpp/include/raft/neighbors/ivf_pq.cuh Outdated Show resolved Hide resolved
cpp/include/raft/neighbors/ivf_pq.cuh Outdated Show resolved Hide resolved
cpp/include/raft_runtime/neighbors/ivf_pq.hpp Outdated Show resolved Hide resolved
cpp/include/raft_runtime/neighbors/ivf_pq.hpp Outdated Show resolved Hide resolved
cpp/src/distance/neighbors/ivfpq_build.cu Show resolved Hide resolved
@viclafargue viclafargue requested a review from a team as a code owner February 9, 2023 16:20
@github-actions github-actions bot added the python label Feb 9, 2023
@cjnolet cjnolet added the FAISS label Feb 13, 2023


cdef device_matrix_view[uint64_t, uint64_t, row_major] \
get_device_matrix_view_uint64(array, check_shape=True) except *:
Copy link
Member

Choose a reason for hiding this comment

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

This is really great! I'm glad that we're centralizing these. I might suggest using the nomenclature: make_device_matrix_view_xxx though just to be consistent w/ the C++ layer (since we really want to mirror the C++ layer here as much as we can while still being somewhat "pythonic" in the APIs). I'm okay doing that as a follow-on though

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, I am working on IVF reconstruction at the moment, but I can do this as a follow-up PR.

@cjnolet
Copy link
Member

cjnolet commented Feb 16, 2023

@viclafargue i think this needs a style update. One thing that can make this easier is setting up pre-commit hooks (if you haven't already) to make sure the style is correct by the time the commit is made.

You can find the instructions here in the contributors guide: https://docs.rapids.ai/api/raft/nightly/contributing.html#python-pre-commit-hooks

Copy link
Member

@cjnolet cjnolet left a comment

Choose a reason for hiding this comment

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

LGTM!

@cjnolet
Copy link
Member

cjnolet commented Mar 7, 2023

/merge

@cjnolet
Copy link
Member

cjnolet commented Mar 8, 2023

/merge

@divyegala
Copy link
Member

@cjnolet I am keeping an eye on this PR! It looks like /merge is queued up but there were intermittent issues going on in CI earlier.

@cjnolet
Copy link
Member

cjnolet commented Mar 8, 2023

Thanks @divyegala! I admit that I forgot I had already added the /merge command. Looks like most of the PRs are failing with conda issues at the moment.

@rapids-bot rapids-bot bot merged commit 8a22373 into rapidsai:branch-23.04 Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 - Ready to Merge cpp FAISS improvement Improvement / enhancement to an existing function non-breaking Non-breaking change python
Projects
Development

Successfully merging this pull request may close these issues.

3 participants