-
Notifications
You must be signed in to change notification settings - Fork 863
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
Fix cpp ci #2958
Fix cpp ci #2958
Conversation
- name: Install dependencies | ||
run: | | ||
python ts_scripts/install_dependencies.py --environment=dev --cpp | ||
sudo apt update && python ts_scripts/install_dependencies.py --environment=dev --cpp |
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 we check cmake version before we proceed?
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.
@lxning not sure what you mean? Inside the workflow file? What would be the consequences of the check?
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.
include(FetchContent) | ||
|
||
FetchContent_Declare( | ||
yaml-cpp | ||
GIT_REPOSITORY https://github.com/jbeder/yaml-cpp.git | ||
GIT_TAG 0.8.0 # Can be a tag (yaml-cpp-x.x.x), a commit hash, or a branch name (master) | ||
) | ||
FetchContent_GetProperties(yaml-cpp) | ||
|
||
if(NOT yaml-cpp_POPULATED) | ||
message(STATUS "Fetching yaml-cpp...") | ||
FetchContent_Populate(yaml-cpp) | ||
add_subdirectory(${yaml-cpp_SOURCE_DIR} ${yaml-cpp_BINARY_DIR}) | ||
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.
we need build yaml-cpp with -DCMAKE_CXX_FLAGS="-fPIC" (see https://github.com/pytorch/serve/blob/master/cpp/build.sh#L133C84-L133C109)
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.
|
||
### Clean the build directory | ||
To clean the build directory in order to rebuild from scratch simply delete the cpp/_build directory with | ||
``` | ||
rm -rf cpp/_build | ||
``` | ||
|
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 we keep this so that cx can clean up env in case of debugging?
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.
@lxning Not sure if I understand. This is meant to be executed if you want to rebuild from scratch. Like a make clean
. Can make this more clear in the description.
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 haven't set clean rule at this moment. We need let cx know how to clean.
|
||
mkdir $YAML_CPP_BUILD_DIR | ||
cd $YAML_CPP_BUILD_DIR | ||
cmake $YAML_CPP_SRC_DIR -DYAML_BUILD_SHARED_LIBS=ON -DYAML_CPP_BUILD_TESTS=OFF -DCMAKE_CXX_FLAGS="-fPIC" |
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 need build yaml-cpp with DCMAKE_CXX_FLAGS="-fPIC"
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.
See above
GIT_REPOSITORY https://github.com/ggerganov/llama.cpp | ||
GIT_TAG b2241 |
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.
do we need build llama cpp with -DCMAKE_CXX_FLAGS="-fPIC"?
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.
See above
Description
Please read our CONTRIBUTING.md prior to creating your first pull request.
Please include a summary of the feature or issue being fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes #(issue)
Type of change
Please delete options that are not relevant.
Feature/Issue validation/testing
Please describe the Unit or Integration tests that you ran to verify your changes and relevant result summary. Provide instructions so it can be reproduced.
Please also list any relevant details for your test configuration.
Test A
Logs for Test A
Test B
Logs for Test B
Checklist: