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

Optimize PR-CI-Windows #62651

Merged
merged 7 commits into from
Mar 21, 2024

Conversation

xuxinyi389
Copy link
Contributor

@xuxinyi389 xuxinyi389 commented Mar 12, 2024

PR types

Performance optimization

PR changes

Others

Description

Pcard-73263
pr-ci-windows流水线的测试精细化管理:
PR-CI-Windows流水线和PR-CI-Windows-Inference流水线测试的单测有许多重叠部分,但实际上有部分重叠的部分是单条流水线覆盖即可的。两条流水线的主要差异在使用的CRT版本不同(可通过编译过程覆盖),和CUDA、TRT版本不同。因此PR-CI-WIndows中和CUDA、TRT无关联的单测可以不再运行,而是仅由PR-CI-Windows-Inference流水线覆盖。除上述外,本次优化还包括:对于只修改了py文件的PR,不再编译CPP单测和运行CPP单测。

test_trt_convert_fill_constant单测此前的超时时间为300s,现将其在Windows平台的超时时间修改为450s
收益:
PR-CI-Windows流水线WIN_UNITTEST_LEVEL=1可以节约35%左右的单测运行时间WIN_UNITTEST_LEVEL=0可以节约40%左右的单测运行时间。
PR-CI-Windows-Inference流水线(WIN_UNITTEST_LEVEL始终为2,跑全量测试)可以节约15%左右的单测运行时间.

Copy link

paddle-bot bot commented Mar 12, 2024

你的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.

@xuxinyi389 xuxinyi389 closed this Mar 13, 2024
@xuxinyi389 xuxinyi389 force-pushed the skip_test_on_windows branch from 33ed7f3 to 13b1e61 Compare March 13, 2024 09:00
@xuxinyi389 xuxinyi389 reopened this Mar 13, 2024
@xuxinyi389 xuxinyi389 force-pushed the skip_test_on_windows branch 3 times, most recently from 8ccb2cc to a8d9bed Compare March 18, 2024 03:34
@xuxinyi389 xuxinyi389 changed the title skip Optimize PR-CI-Windows Mar 18, 2024
@xuxinyi389 xuxinyi389 force-pushed the skip_test_on_windows branch from fad945b to a53f3f2 Compare March 19, 2024 07:49
Copy link
Contributor

@zhwesky2010 zhwesky2010 left a comment

Choose a reason for hiding this comment

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

LEVEL 1
LEVEL 2
都单流水线运行吧,只能说这些目录与CUDA关系比较小,但还不能逐个文件的论证与CUDA完全无关

@xuxinyi389
Copy link
Contributor Author

xuxinyi389 commented Mar 19, 2024

LEVEL 1 LEVEL 2 都单流水线运行吧,只能说这些目录与CUDA关系比较小,但还不能逐个文件的论证与CUDA完全无关

WIN_UNITTEST_LEVEL机制只应用在PR-CI-Windows上(PR_CI_INFERENCE中WIN_UNITTEST_LEVEL=0,跑全量单测),WITH_CPP_TEST机制应用在windows三条流水线上。

XieYunshen
XieYunshen previously approved these changes Mar 20, 2024
Copy link
Contributor

@XieYunshen XieYunshen left a comment

Choose a reason for hiding this comment

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

LGTM

endif()
if(WITH_MKLDNN)
if(WITH_MKLDNN AND (NOT WIN32 OR WIN_UNITTEST_LEVEL EQUAL 0))
Copy link
Contributor

Choose a reason for hiding this comment

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

这3个分支能否合并,这个判断本身复杂性太多,尽可能不要多次判断,合并与简化,提升可读性

if(WIN32 AND WIN_UNITTEST_LEVEL GREATER 0)
    if(WITH_MKLDNN)
    endif()
    message(...)
else()
    // add_subdirectory
endif()

Copy link
Contributor Author

@xuxinyi389 xuxinyi389 Mar 20, 2024

Choose a reason for hiding this comment

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

已将4处判断合并在2处,message有两处保留,主要是本文件内容较多,觉得添加单测和设置单测属性还是分开为好,因此分支没有进一步合并

else
while read line
do
run_unittest_gpu "$line" 16
Copy link
Contributor

Choose a reason for hiding this comment

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

这个不是GPU流水线共用的吗,PR-CI-Windows-Inference需要跑这个

Copy link
Contributor Author

Choose a reason for hiding this comment

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

是共用的,PR-CI-Windows-Inference的WIN_UNITTEST_LEVEL永远为0,不会跳过显存占用为0的单测

@zhwesky2010 zhwesky2010 merged commit afcbd41 into PaddlePaddle:develop Mar 21, 2024
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.

4 participants