Skip to content

Conversation

@jiweibo
Copy link
Contributor

@jiweibo jiweibo commented Aug 13, 2021

PR types

Others

PR changes

Others

Describe

1、对libpaddle_inference.so 和 libpaddle_inference_c.so 进行 strip,去除符号信息。
2、对third_party/mkldnn中的so进行软链
3、对third_party/mkldnn mklml目录中的so进行strip

测试条件:
sm: 52 60 61 70 75 80
commtid:b0a1d122c3cdde00284706ff904bdeb48378490e

核心动态库,strip前后测试数据

libpaddle_inference.so libpaddle_inference_c.so
WITH_STRIP=OFF 1.2G(1221360) 1.2G(1225384)
WITH_STRIP=ON 1.2G(1190984) 1.2G(1195084)
收益 29.66M 29.59M

整个预测库压缩为tgz后的体积 (C++和C压缩后体积不同的原因在于C++中打包了静态库)

paddle_inference.tgz paddle_inference_c.tgz
pr前 623M(637552) 314M(321032)
pr后 595M(609196) 286M(292364)
收益 28M 28M

gcc编译选项测试数据
todo

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

Copy link
Contributor

@Avin0323 Avin0323 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jiweibo jiweibo merged commit 086540c into PaddlePaddle:develop Aug 25, 2021
@jiweibo jiweibo deleted the inference_lib_size branch August 25, 2021 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants