-
Notifications
You must be signed in to change notification settings - Fork 114
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
Split jnis into 2 libs and add common lib #181
Conversation
Signed-off-by: John Mazanec <jmazane@amazon.com>
Codecov Report
@@ Coverage Diff @@
## main #181 +/- ##
============================================
+ Coverage 82.62% 82.78% +0.15%
- Complexity 804 826 +22
============================================
Files 117 120 +3
Lines 3575 3631 +56
Branches 337 342 +5
============================================
+ Hits 2954 3006 +52
- Misses 466 468 +2
- Partials 155 157 +2
Continue to review full report at Codecov.
|
Signed-off-by: John Mazanec <jmazane@amazon.com>
Signed-off-by: John Mazanec <jmazane@amazon.com>
Signed-off-by: John Mazanec <jmazane@amazon.com>
Confirmed tar works arm/x64 on AL2 and Ubuntu 18. Confirmed docker works on arm and x64. PR is ready to be reviewed/shipped. |
if (${CONFIG_FAISS} STREQUAL OFF AND ${CONFIG_NMSLIB} STREQUAL OFF AND ${CONFIG_TEST} STREQUAL OFF) | ||
set(CONFIG_ALL ON) | ||
else() | ||
set(CONFIG_ALL OFF) | ||
endif () |
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.
if (${CONFIG_FAISS} STREQUAL OFF AND ${CONFIG_NMSLIB} STREQUAL OFF AND ${CONFIG_TEST} STREQUAL OFF) | |
set(CONFIG_ALL ON) | |
else() | |
set(CONFIG_ALL OFF) | |
endif () | |
if (${CONFIG_FAISS} STREQUAL ON OR ${CONFIG_NMSLIB} STREQUAL ON OR ${CONFIG_TEST} STREQUAL ON) | |
set(CONFIG_ALL OFF) | |
endif () |
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.
But then if they are all on, config_all will be set to off.
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.
Good catch!
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! Thanks
Signed-off-by: John Mazanec <jmazane@amazon.com>
Signed-off-by: John Mazanec <jmazane@amazon.com> Signed-off-by: Martin Gaievski <gaievski@amazon.com>
Signed-off-by: John Mazanec <jmazane@amazon.com>
Signed-off-by: John Mazanec jmazane@amazon.com
Description
This PR splits the "opensearchknn" jni into 2 jni's: "opensearchknn_nmslib" and "opensearchknn_faiss". In addition, it builds another shared library "opensearchknn_common" that will be shared between the 2. The primary reason for splitting the 2 libraries is isolation: for a user using nmslib only, they should not need to load faiss and vice-versa.
Previously, routing to the correct engine was done in
jni/src/org_opensearch_knn_index_JNIService.cpp
. This change moves this routing decision up into the Java layer. JNIService will route request to either FaissService or NmslibService.This PR is in WIP for the following:
I will remove WIP status once I think it is ready to merge.
Issues Resolved
#173
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.