Repository navigation
Closed
Labels
Description
问题描述 Please describe your issue
一、需求背景
飞桨正在优化cmake代码,来减少编译时候的开发成本,目前paddle编译c++单测有多种方式,如cc_test_old(link静态库),cc_test(windows下link静态库,linux下link paddle.so),paddle_test(windows和linux下都link动态库paddle.so),现在推荐使用paddle_test,好处在于:
- link动态库无需手动加过多的依赖,大部分符号在paddle.so中已存在;
- link libpaddle.so可以大幅度减小C++单测的体积 ,从而减少build目录体积大小
二、存在的问题
paddle仓库中大概有50个使用paddle_test的代码,有一部分后面加了额外不需要的依赖,需要删除,如test/cpp/pir/shape_dialect/CMakeLists.txt中shape_struct_test单测依赖了gtest,实际上是额外的依赖,应该删掉。
三、建议步骤
1 在linux下,将paddle_test DEPS依赖全部删掉编译,如果遇到找不到一些符号,再加上必要的依赖
2 linux下报错解决后,windows下可能也会遇到一些编译问题
四、任务划分
| 序号 | 目录 | 认领人/状态/PR号 |
|---|---|---|
| 1 | @Liyulingyue |
|
| 2 | test/cpp/auto_parallel/CMakeLists.txt | @zade23 |
| 3 | @BeingGod |
|
| 4 | test/cpp/fluid/CMakeLists.txt | @DrRyanHuang |
| 5 | test/cpp/fluid/cinn/CMakeLists.txt | @ccsuzzh |
| 6 | @RedContritio |
|
| 7 | @RedContritio |
|
| 8 | @ccsuzzh |
|
| 9 | test/cpp/fluid/pscore/CMakeLists.txt | @xiaoyewww |
| 10 | test/cpp/pir/cinn/CMakeLists.txt | @zrr1999 |
| 11 | test/cpp/pir/cinn/adt/CMakeLists.txt | @zrr1999 @Liyulingyue |
| 12 | test/cpp/pir/core/CMakeLists.txt | @DrRyanHuang |
| 13 | test/cpp/pir/shape_dialect/CMakeLists.txt | @sanbuphy @Liyulingyue |
| 14 | test/cpp/pir/sub_graph/CMakeLists.txt | @DrRyanHuang @xiaoyewww |
| 15 | test/cpp/prim/CMakeLists.txt | @enkilee @Liyulingyue |
认领方式
请大家以 comment 的形式认领任务,如:
【报名】:1、3、12-13
多个任务之间需要使用中文顿号分隔,报名多个连续任务可用横线表示,如 2-5
PR 提交格式:在 PR 的标题中以 【CMake opt】 开头,注明任务编号
看板信息
| 任务方向 | 任务数量 | 提交作品 / 任务认领 | 提交率 | 完成 | 完成率 |
|---|---|---|---|---|---|
| 快乐开源 | 15 | 10 / 15 | 66.67% | 10 | 66.67% |
统计信息
排名不分先后 @zade23 (1) @DrRyanHuang (2) @ccsuzzh (1) @xiaoyewww (2) @zrr1999 (1) @Liyulingyue (3)
Reacted by Ryan and PuQing
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
Liyulingyue commentedon Dec 14, 2023
【报名】:1
DrRyanHuang commentedon Dec 14, 2023
【报名】:4、12、14
zrr1999 commentedon Dec 14, 2023
【报名】:10、11
RedContritio commentedon Dec 14, 2023
【报名】:6、7
zade23 commentedon Dec 14, 2023
【报名】:2
3 remaining items
ccsuzzh commentedon Dec 14, 2023
【报名】:5、8
xiaoyewww commentedon Dec 15, 2023
【报名】:9、14
Liyulingyue commentedon Dec 19, 2023
Task No. 1 Finished. Nothing needs to delete.
The error log when delete the only DEPS, benchmark:
risemeup1 commentedon Dec 19, 2023
好的,那就不删除
BeingGod commentedon Dec 21, 2023
Task NO.3 的common已经在 #60149 删除。
ccsuzzh commentedon Dec 21, 2023
Task NO.8 的common已经在 #60149 删除。
RedContritio commentedon Dec 25, 2023
Task 6 已在 #60149 解决
Task 7 已在 #59995 解决
luotao1 commentedon Jan 3, 2024
[cmake治理]删除paddle_test多余无用依赖 已全部完成,感谢参与的小伙伴们!
欢迎继续参与快乐开源的其他任务!
Update config.py
Update config.py [CMake opt] (#79)