-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Generate capi pacakge #7237
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
Generate capi pacakge #7237
Conversation
make DESTDIR="$install_prefix" install | ||
|
||
if [[ ${WITH_MKL:-OFF} == "ON" ]]; then | ||
find ./third_party/install -name 'libmklml_gnu.so' -exec cp {} $install_prefix/usr/local/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.
libmklml_gnu.so不用copy
find ./third_party/install -name 'libmklml_gnu.so' -exec cp {} $install_prefix/usr/local/lib \; | ||
find ./third_party/install -name 'libmklml_intel.so' -exec cp {} $install_prefix/usr/local/lib \; | ||
cp -P ./third_party/install/mkldnn/lib/* $install_prefix/usr/local/lib/ | ||
fi |
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.
可以仿照如下写法来代替204-206么? @tensor-tang
Lines 89 to 90 in 5593858
if '${MKL_SHARED_LIBS}'!= '': | |
paddle_rt_libs += '${MKL_SHARED_LIBS}'.split(';') |
cp -P ./third_party/install/mkldnn/lib/* $install_prefix/usr/local/lib/ | ||
fi | ||
|
||
find ./third_party/install -name 'libiomp5.so' -exec cp {} $install_prefix/usr/local/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.
209行的libiomp5只在WITH_MKL=ON
的时候用,应该放到上面的if判断中。
Could we make things simple, how about separate into 2 parts:
|
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.
I agree with #7237 (comment) . LGTM!
if [[ ${WITH_MKL:-OFF} == "ON" ]]; then | ||
find ./third_party/install -name 'libmklml_gnu.so' -exec cp {} $install_prefix/usr/local/lib \; | ||
find ./third_party/install -name 'libmklml_intel.so' -exec cp {} $install_prefix/usr/local/lib \; | ||
cp -P ./third_party/install/mkldnn/lib/* $install_prefix/usr/local/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.
执行make install
命令时,cmake中设定自动将一些third_party库拷贝到CMAKE_INSTALL_PREFIX/third_party
目录下,目前会自动拷贝的库有zlib
、glog
、gflags
、protobuf
、openblas
,如:
Paddle/cmake/external/glog.cmake
Lines 71 to 78 in d06bbb1
IF(WITH_C_API) | |
INSTALL(DIRECTORY ${GLOG_INCLUDE_DIR} DESTINATION third_party/glog) | |
IF(ANDROID) | |
INSTALL(FILES ${GLOG_LIBRARIES} DESTINATION third_party/glog/lib/${ANDROID_ABI}) | |
ELSE() | |
INSTALL(FILES ${GLOG_LIBRARIES} DESTINATION third_party/glog/lib) | |
ENDIF() | |
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.
I think it's a better way, and maybe @tensor-tang could consider with this.
related #7181