-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Optimize PR-CI-Windows #62651
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
33ed7f3
to
13b1e61
Compare
8ccb2cc
to
a8d9bed
Compare
fad945b
to
a53f3f2
Compare
There was a problem hiding this 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完全无关
WIN_UNITTEST_LEVEL机制只应用在PR-CI-Windows上(PR_CI_INFERENCE中WIN_UNITTEST_LEVEL=0,跑全量单测),WITH_CPP_TEST机制应用在windows三条流水线上。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
test/ir/inference/CMakeLists.txt
Outdated
endif() | ||
if(WITH_MKLDNN) | ||
if(WITH_MKLDNN AND (NOT WIN32 OR WIN_UNITTEST_LEVEL EQUAL 0)) |
There was a problem hiding this comment.
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()
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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需要跑这个
There was a problem hiding this comment.
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的单测
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%左右的单测运行时间.