-
Notifications
You must be signed in to change notification settings - Fork 143
[Review][Java] Expand CagraIndex#search to accept more types (int8 and int32)
#1283
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][Java] Expand CagraIndex#search to accept more types (int8 and int32)
#1283
Conversation
CagraIndex to accept more types (int8 and int32)
CagraIndex to accept more types (int8 and int32)CagraIndex#search to accept more types (int8 and int32)
|
Changing this back to draft as we need #1361 as preliminary work |
…1361) This PR extract an internal interface that is used as a base to implement all internal CuVSMatrix types; the interface introduces commonly used field accessors like `memorySegment()` and `toTensor()` that we do not want/could not appear on the public interface (e.g. because they expose or require Panama types or internal types). The new interface is implemented by all concrete matrix types, closing a gap that we had in #1328 (which I realized while working on separate PRs like #1283) Follow-up of #1328 Authors: - Lorenzo Dematté (https://github.com/ldematte) Approvers: - Ben Frederickson (https://github.com/benfred) URL: #1361
…index-int8 # Conflicts: # java/cuvs-java/src/main/java22/com/nvidia/cuvs/internal/CuVSMatrixBaseImpl.java # java/cuvs-java/src/test/java/com/nvidia/cuvs/CagraBuildAndSearchIT.java # java/cuvs-java/src/test/java/com/nvidia/cuvs/CagraRandomizedIT.java
|
/ok to test 3e3212f |
|
|
||
| returnValue = cuvsStreamSync(cuvsRes); | ||
| checkCuVSError(returnValue, "cuvsStreamSync"); | ||
| // TODO: do we need this stream sync here? |
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 don't think you need to do this sync here - since cuvsCagraSearch is operating on the same stream
ChrisHegarty
left a comment
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.
LGTM
|
/merge |
…apidsai#1361) This PR extract an internal interface that is used as a base to implement all internal CuVSMatrix types; the interface introduces commonly used field accessors like `memorySegment()` and `toTensor()` that we do not want/could not appear on the public interface (e.g. because they expose or require Panama types or internal types). The new interface is implemented by all concrete matrix types, closing a gap that we had in rapidsai#1328 (which I realized while working on separate PRs like rapidsai#1283) Follow-up of rapidsai#1328 Authors: - Lorenzo Dematté (https://github.com/ldematte) Approvers: - Ben Frederickson (https://github.com/benfred) URL: rapidsai#1361
…and int32) (rapidsai#1283) With the introduction of `CuVSMatrix` as the type to provide an input dataset, we expanded the types that can be used in indexing. With this PR we aim to do the same query/search: - Use a `CuVSMatrix` for `CagraQuery` too - Use the correct types for sizes in `CagraIndex#search` There is more we can do there, e.g. use `CuVSDeviceMatrix` for storing the results so we don't have to explicitly copy them (all duplicated code). That would be follow-up work. Authors: - Lorenzo Dematté (https://github.com/ldematte) - Ben Frederickson (https://github.com/benfred) Approvers: - Ben Frederickson (https://github.com/benfred) - Chris Hegarty (https://github.com/ChrisHegarty) URL: rapidsai#1283
…1366) Some additional tests to increase our test coverage. Good to review, but we might want to expand this after #1283 (or vice-versa, whichever comes first). Authors: - Lorenzo Dematté (https://github.com/ldematte) - MithunR (https://github.com/mythrocks) Approvers: - MithunR (https://github.com/mythrocks) URL: #1366
With the introduction of
CuVSMatrixas the type to provide an input dataset, we expanded the types that can be used in indexing.With this PR we aim to do the same query/search:
CuVSMatrixforCagraQuerytooCagraIndex#searchThere is more we can do there, e.g. use
CuVSDeviceMatrixfor storing the results so we don't have to explicitly copy them (all duplicated code). That would be follow-up work.