-
Notifications
You must be signed in to change notification settings - Fork 115
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
Skip rebuild from scratch after cmake is ran #1636
Conversation
@jmazanec15 something seems to go wrong with BWC.. Not sure if it is because of this change |
@navneet1v Windows was a GHA failure to setup Java. The BWC seem more related to this change. Taking a look |
@@ -17,9 +17,7 @@ oss/* | |||
jni/CMakeCache.txt | |||
jni/CMakeFiles | |||
jni/Makefile | |||
jni/cmake* | |||
jni/CPack* |
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.
We already removed CPack in #1620
6243eba
to
d4dbc51
Compare
5e01d7b
to
698b4f3
Compare
@@ -38,19 +38,10 @@ jobs: | |||
with: | |||
submodules: true | |||
|
|||
# Git functionality in CMAKE file does not work with given ubuntu image. Therefore, handling it 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.
This is no longer issue so I removed. All patches should be specified directly in build system.
ba91446
to
eb062ae
Compare
endif() | ||
endif() | ||
|
||
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/init-faiss.cmake) | ||
find_package(OpenMP REQUIRED) |
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.
Shouldn't we move this to init script like for other packages?
find_package(OpenMP REQUIRED)
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 question - I held off here because we directly link the shared library (opensearch_faiss) against openmp here - so I figured it was good to keep in main cmake because its related to opensearch_faiss
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.
makes sense. Thanks!
set(FAISS_ENABLE_PYTHON OFF) | ||
|
||
if(NOT DEFINED SIMD_ENABLED) | ||
set(SIMD_ENABLED true) # set default value as true if the argument is not set |
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.
Have you verified if it is passing the argument properly for SIMD_ENABLED
after these refactoring changes?
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.
yes, include directive will just basically copy and paste the code into the section its included. See https://cmake.org/cmake/help/latest/command/include.html.
# Git functionality in CMAKE file does not work with given ubuntu image. Therefore, handling it here. | ||
- name: Apply Git Patch | ||
# Deleting file at the end to skip `git apply` inside CMAKE file | ||
- name: Setup git user |
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.
Can you add one comment for setting up a git user just for reference?
By commiting the patch changes, this commit prevents the libraries to be built from scratch every time cmake is ran. This will save additional build time. In addition to this, this commit separates out the different functionality to make the build system more readable. We can continue to iterate on this in the future. Signed-off-by: John Mazanec <[email protected]>
9fc70eb
By commiting the patch changes, this commit prevents the libraries to be built from scratch every time cmake is ran. This will save additional build time. In addition to this, this commit separates out the different functionality to make the build system more readable. We can continue to iterate on this in the future. Signed-off-by: John Mazanec <[email protected]> (cherry picked from commit c35f6ad)
Description
By commiting the patch changes (via
git am
instead ofgit apply
), this commit prevents the libraries to be built from scratch every time cmake is ran. This will save additional build time.from cmake, this looks like:
In addition to this, this commit separates out the different functionality to make the build system more readable. We can continue to iterate on this in the future.
Issues Resolved
#1552
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.