Conversation
3d5245c to
6822b0c
Compare
|
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.
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.
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.
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.
The same with @luotao1 , I think *.so contained into /usr/local/lib is an easy way for the user.
| 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.
Not install to lib, but third_party/mklml/lib.Please refer to https://github.com/PaddlePaddle/Paddle/blob/develop/cmake/external/glog.cmake#L71
fix #7254 and fix #7181