Skip to content

Conversation

@wadefelix
Copy link
Contributor

@wadefelix wadefelix commented Jun 17, 2021

PR types

Function optimization

PR changes

Others

Describe

在PR-CPU-Py2流水线执行GPU示例代码测试,把流水线的版本改为GPU版本。
// 对啊,第一个怎么办
see http://agroup.baidu.com/paddlepaddle-org-cn/md/article/4036225#0618
已测三次,第一次运行时间5小时;第二次运行时间2.5小时,第三次运行时间接近3小时。
因为编译cache的有益影响,第二次编译非常快就完成了。但是整体增加时间确实太长了。等于将py2流水线增加了约两个小时。

而若在已有的py3流水线上执行个全量测试,增加时间也就10分钟左右(单卡P4上测得)。

06-21:经过多次运行之后,编译缓存也见效显著。编译代码未做变更时,编译时长仅为17分钟左右。与CPU的9分钟相比增加8分钟。
代码少量变更的roll optimize by SunNy820828449 · Pull Request #32880 · PaddlePaddle/Paddle任务时长为28分钟。可以接受。与之前的9-15分钟相比,增长<20分钟。

但有更改主体代码的仅此一例。需要合入此PR代码后继续观察。且此逻辑由WITH_GPU直接影响,仅需修改PRC-CI-CPU-Py2的执行脚本内的环境变量即可控制本逻辑。

0622
补充修改:http://agroup.baidu.com/paddlepaddle-org-cn/md/article/4036225
关于ops.py 中的func变量,改为私有_func。因为func是个临时变量。 昨天的一个修改把这个导出 print signatures 打印出来了。这个临时变量 可能因为顺序每次不一样,然后每次就都与另一个不同的op的md5相同, 也有可能顺序正好一致 就通过了CI, 顺序不一致就通不过。

@paddle-bot-old
Copy link

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

@wadefelix wadefelix force-pushed the gpu-samplecode-test branch from 0aa3d44 to db8c523 Compare June 18, 2021 01:32
@wadefelix wadefelix force-pushed the gpu-samplecode-test branch 2 times, most recently from 9730b5c to 6d1db56 Compare June 20, 2021 03:16
@wadefelix wadefelix force-pushed the gpu-samplecode-test branch from 35f523d to 8122b5b Compare June 21, 2021 03:06
Copy link
Contributor Author

Choose a reason for hiding this comment

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

此处解释: $spec_path 即 paddle/fluid/API_PR.spec 和 paddle/fluid/API_DEV.spec 文件, print_signatures.py 已更改为不打印ArgSpec,而且流水线环境中也没有py2环境均为py3环境。故删除此处逻辑

Copy link
Contributor Author

Choose a reason for hiding this comment

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

此处解释:
这两个程序已在 48行 62行 分别执行过。不需要再单独执行了。

另,下面的判断exit的代码应和上面的if判断 合并。

Copy link
Contributor

@MingMingShangTian MingMingShangTian left a comment

Choose a reason for hiding this comment

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

LGTM

@wadefelix wadefelix force-pushed the gpu-samplecode-test branch from 038ffc7 to 1fb196f Compare June 22, 2021 06:03
@wadefelix wadefelix force-pushed the gpu-samplecode-test branch from 1fb196f to bcf950c Compare June 22, 2021 06:04
test=document_fix

save
@wadefelix wadefelix force-pushed the gpu-samplecode-test branch from cb1f6bb to 4324ec8 Compare June 22, 2021 06:49
@wadefelix
Copy link
Contributor Author

@wawltor 看一看,把 ops.py 的 func 变量改成_func了,看看有无影响

Copy link
Contributor

@pangyoki pangyoki left a comment

Choose a reason for hiding this comment

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

LGTM

@lelelelelez lelelelelez merged commit dd4297c into PaddlePaddle:develop Jun 22, 2021
@wadefelix wadefelix deleted the gpu-samplecode-test branch June 24, 2021 03:10
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.

4 participants