-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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 capi package #7255
fix capi package #7255
Conversation
You can directly run the below script to check the result. #!/bin/bash
set -xe
export PADDLE_DEV_NAME="paddlepaddle/paddle:latest-dev"
docker run -i --rm -v $PWD:/paddle ${PADDLE_DEV_NAME} \
rm -rf /paddle/build
docker run -i --rm -v $PWD:/paddle \
-e "WITH_PYTHON=OFF" \
-e "WITH_SWIG_PY=OFF" \
-e "WITH_PYTHON=OFF" \
-e "WITH_C_API=ON" \
-e "WITH_GPU=OFF" \
-e "WITH_AVX=ON" \
-e "WITH_MKL=ON" \
-e "WITH_STYLE_CHECK=OFF" \
${PADDLE_DEV_NAME} \
bash -x /paddle/paddle/scripts/docker/build.sh
The paddle.tgz would contain:
And in the
|
ADD_CUSTOM_TARGET(mkldnn_shared_lib ALL DEPENDS ${MKLDNN_SHARED_LIB}) | ||
|
||
IF(WITH_C_API) | ||
INSTALL(FILES ${MKLDNN_SHARED_LIB} DESTINATION lib) |
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.
Not stall to lib
, but third_party/mkldnn/lib
. Please refer to https://github.com/PaddlePaddle/Paddle/blob/develop/cmake/external/glog.cmake#L71
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.
Thanks @Xreki , The reason installed to lib
is that the script here installed to lib
directly.
This function is trying to replace the command.
And I think the *.so should be contained into /usr/local/lib
, maybe @Yancey1989 has considered this before?
Anyway I am OK installing to third-party, but then user should set the path to LD manually.
Same as below.
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.
As glog etc is a static library, but mkldnn etc is a shared library, thus, if *.so are contained into thirdparty
, users should export LD_LIBRARY_PATH
which leads an extra step for users. So we can contain *.so into /usr/loacl/lib
at this PR.
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.
The same with @luotao1 , I think *.so
contained into /usr/local/lib
is an easy way for the user.
@@ -66,3 +66,7 @@ ADD_LIBRARY(mklml SHARED IMPORTED GLOBAL) | |||
SET_PROPERTY(TARGET mklml PROPERTY IMPORTED_LOCATION ${MKLML_LIB}) | |||
ADD_DEPENDENCIES(mklml ${MKLML_PROJECT}) | |||
LIST(APPEND external_project_dependencies mklml) | |||
|
|||
IF(WITH_C_API) | |||
INSTALL(FILES ${MKLML_LIB} ${MKLML_IOMP_LIB} DESTINATION lib) |
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.
Not install to lib
, but third_party/mklml/lib
.Please refer to https://github.com/PaddlePaddle/Paddle/blob/develop/cmake/external/glog.cmake#L71
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
fix #7254 and fix #7181