Skip to content
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

[cmake治理]cmake optimization of fluid/memory #59995

Merged

Conversation

risemeup1
Copy link
Contributor

@risemeup1 risemeup1 commented Dec 13, 2023

PR types

Others

PR changes

Others

Description

背景:

  1. 治理paddle/fluid/memory的cmake代码,将paddle/fluid/memory按照目录级别编译成fluid_memory.a(1.6M)

收益:

  1. 解除paddle/fluid/memory多个循环依赖的问题,如memory,malloc,allocator,profiler之间的循环依赖,此处不一一列出;
  2. 删除40多个个静态库对malloc,stas,memcpy,malloc的多余依赖,和10多个单测可执行文件对malloc,stas,memcpy,malloc的依赖,删除之后这些静态库的体积,单测可执行文件的体积都有所减小,build目录的体积也有减小,CI目录大小减小了40M;
  3. 增量编译,改动paddle/fluid/memory下的文件,GPU编译选项下增量编译耗时减少32s,全量编译减少约2min
  4. 规范paddle的C++单测位置,将fluid/memory目录下单测迁移到paddle/test/cpp/fluid/memory

Pcard-67010

Copy link

paddle-bot bot commented Dec 13, 2023

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@risemeup1 risemeup1 changed the title cmake optimization [cmake治理]cmake optimization of fluid/framework/new_executor and fluid/memory Dec 13, 2023
@risemeup1 risemeup1 changed the title [cmake治理]cmake optimization of fluid/framework/new_executor and fluid/memory [cmake治理]cmake optimization of fluid/memory Dec 13, 2023
zhangbo9674
zhangbo9674 previously approved these changes Dec 14, 2023
Copy link
Contributor

@XiaoguangHu01 XiaoguangHu01 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@XiaoguangHu01 XiaoguangHu01 left a comment

Choose a reason for hiding this comment

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

LGTM

@winter-wang winter-wang merged commit 0add8b6 into PaddlePaddle:develop Dec 14, 2023
29 checks passed
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.

6 participants