Skip to content

Commit 31c22c5

Browse files
authored
Combine unit and integration test steps into one stage (#9733)
This removes the barrier wait between test and integration tests in CI. This will increase capacity requirements and usage but, assuming we can meet that with autoscaler, should reduce CI times by an hour or two since we're doing all the testing in parallel. The slow path is CPU unit test -> GPU frontend tests, so kicking off the GPU frontend tests faster should help decrease CI runtime. Co-authored-by: driazati <[email protected]>
1 parent 6f9c806 commit 31c22c5

File tree

1 file changed

+29
-17
lines changed

1 file changed

+29
-17
lines changed

Jenkinsfile

Lines changed: 29 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -267,16 +267,9 @@ stage('Build') {
267267
pack_lib('cpu', tvm_multilib_tsim)
268268
timeout(time: max_time, unit: 'MINUTES') {
269269
ci_setup(ci_cpu)
270-
python_unittest(ci_cpu)
271-
fsim_test(ci_cpu)
272-
sh (
273-
script: "${docker_run} ${ci_cpu} ./tests/scripts/task_python_vta_tsim.sh",
274-
label: "Run VTA tests in TSIM",
275-
)
276270
// sh "${docker_run} ${ci_cpu} ./tests/scripts/task_golang.sh"
277271
// TODO(@jroesch): need to resolve CI issue will turn back on in follow up patch
278272
sh (script: "${docker_run} ${ci_cpu} ./tests/scripts/task_rust.sh", label: "Rust build and test")
279-
junit "build/pytest-results/*.xml"
280273
}
281274
}
282275
}
@@ -367,8 +360,8 @@ stage('Build') {
367360
}
368361
}
369362

370-
stage('Unit Test') {
371-
parallel 'python3: GPU': {
363+
stage('Test') {
364+
parallel 'unittest: GPU': {
372365
if (is_docs_only_build != 1) {
373366
node('TensorCore') {
374367
ws(per_exec_ws('tvm/ut-python-gpu')) {
@@ -397,10 +390,10 @@ stage('Unit Test') {
397390
}
398391
}
399392
} else {
400-
Utils.markStageSkippedForConditional('python3: GPU')
393+
Utils.markStageSkippedForConditional('unittest: GPU')
401394
}
402395
},
403-
'python3: CPU': {
396+
'integration: CPU': {
404397
if (is_docs_only_build != 1) {
405398
node('CPU') {
406399
ws(per_exec_ws("tvm/ut-python-cpu")) {
@@ -417,7 +410,29 @@ stage('Unit Test') {
417410
}
418411
}
419412
} else {
420-
Utils.markStageSkippedForConditional('python3: CPU')
413+
Utils.markStageSkippedForConditional('integration: CPU')
414+
}
415+
},
416+
'unittest: CPU': {
417+
if (is_docs_only_build != 1) {
418+
node('CPU') {
419+
ws(per_exec_ws("tvm/ut-python-cpu")) {
420+
init_git()
421+
unpack_lib('cpu', tvm_multilib_tsim)
422+
timeout(time: max_time, unit: 'MINUTES') {
423+
ci_setup(ci_cpu)
424+
python_unittest(ci_cpu)
425+
fsim_test(ci_cpu)
426+
sh (
427+
script: "${docker_run} ${ci_cpu} ./tests/scripts/task_python_vta_tsim.sh",
428+
label: "Run VTA tests in TSIM",
429+
)
430+
junit "build/pytest-results/*.xml"
431+
}
432+
}
433+
}
434+
} else {
435+
Utils.markStageSkippedForConditional('unittest: CPU')
421436
}
422437
},
423438
'python3: i386': {
@@ -463,11 +478,8 @@ stage('Unit Test') {
463478
} else {
464479
Utils.markStageSkippedForConditional('python3: arm')
465480
}
466-
}
467-
}
468-
469-
stage('Integration Test') {
470-
parallel 'topi: GPU': {
481+
},
482+
'topi: GPU': {
471483
if (is_docs_only_build != 1) {
472484
node('GPU') {
473485
ws(per_exec_ws('tvm/topi-python-gpu')) {

0 commit comments

Comments
 (0)