Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 74 additions & 36 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
// 'python3 jenkins/generate.py'
// Note: This timestamp is here to ensure that updates to the Jenkinsfile are
// always rebased on main before merging:
// Generated at 2022-04-11T10:45:26.226802
// Generated at 2022-04-11T12:22:12.040444

import org.jenkinsci.plugins.pipeline.modeldefinition.Utils
// NOTE: these lines are scanned by docker/dev_common.sh. Please update the regex as needed. -->
Expand Down Expand Up @@ -85,6 +85,7 @@ tvm_multilib = 'build/libtvm.so, ' +

tvm_multilib_tsim = 'build/libvta_tsim.so, ' +
tvm_multilib
microtvm_lib = 'build/microtvm_template_projects.tar.gz, ' + tvm_lib
upstream_revision = null

// command to start a docker container
Expand Down Expand Up @@ -576,23 +577,12 @@ stage('Build') {
script: "${docker_run} ${ci_qemu} ./tests/scripts/task_config_build_qemu.sh build",
label: 'Create QEMU cmake config',
)
try {
make(ci_qemu, 'build', '-j2')
cpp_unittest(ci_qemu)
timeout(time: max_time, unit: 'MINUTES') {
ci_setup(ci_qemu)
sh (
script: "${docker_run} ${ci_qemu} ./tests/scripts/task_python_microtvm.sh",
label: 'Run microTVM tests',
)
sh (
script: "${docker_run} ${ci_qemu} ./tests/scripts/task_demo_microtvm.sh",
label: 'Run microTVM demos',
)
}
} finally {
junit 'build/pytest-results/*.xml'
}
make(ci_qemu, 'build', '-j2')
sh(
script: 'cd build && tar -czvf microtvm_template_projects.tar.gz microtvm_template_projects/',
label: 'Compress microtvm_template_projects'
)
pack_lib('qemu', microtvm_lib)
}
}
} else {
Expand All @@ -608,24 +598,8 @@ stage('Build') {
script: "${docker_run} ${ci_hexagon} ./tests/scripts/task_config_build_hexagon.sh build",
label: 'Create Hexagon cmake config',
)
try {
make(ci_hexagon, 'build', '-j2')
cpp_unittest(ci_hexagon)
sh (
script: "${docker_run} ${ci_hexagon} ./tests/scripts/task_build_hexagon_api.sh",
label: 'Build Hexagon API',
)
sh (
script: "${docker_run} ${ci_hexagon} ./tests/scripts/task_python_hexagon.sh",
label: 'Run Hexagon tests',
)
sh (
script: "${docker_run} ${ci_hexagon} ./tests/scripts/task_python_hexagon_simulator.sh",
label: 'Run Hexagon tests on simulator',
)
} finally {
junit 'build/pytest-results/*.xml'
}
make(ci_hexagon, 'build', '-j2')
pack_lib('hexagon', tvm_lib)
}
}
} else {
Expand Down Expand Up @@ -779,6 +753,70 @@ stage('Test') {
Utils.markStageSkippedForConditional('python3: i386')
}
},
'test: Hexagon': {
if (!skip_ci && is_docs_only_build != 1) {
node('CPU') {
ws("workspace/exec_${env.EXECUTOR_NUMBER}/tvm/test-hexagon") {
timeout(time: max_time, unit: 'MINUTES') {
try {
init_git()
unpack_lib('hexagon', tvm_lib)
ci_setup(ci_hexagon)
cpp_unittest(ci_hexagon)
sh (
script: "${docker_run} ${ci_hexagon} ./tests/scripts/task_build_hexagon_api.sh",
label: 'Build Hexagon API',
)
sh (
script: "${docker_run} ${ci_hexagon} ./tests/scripts/task_python_hexagon.sh",
label: 'Run Hexagon tests',
)
sh (
script: "${docker_run} ${ci_hexagon} ./tests/scripts/task_python_hexagon_simulator.sh",
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure if it's doable, but this step can run in parallel with the step at line 766.

Copy link
Member Author

Choose a reason for hiding this comment

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

We could especially now that we're installing GNU parallel onto the Docker images, but only the longest step really matters so we don't have to mess with this unless we get the CPU/GPU tests under 30 minutes or so

label: 'Run Hexagon tests on simulator',
)
} finally {
junit 'build/pytest-results/*.xml'
}
}
}
}
} else {
Utils.markStageSkippedForConditional('test: Hexagon')
}
},
'test: QEMU': {
if (!skip_ci && is_docs_only_build != 1) {
node('CPU') {
ws("workspace/exec_${env.EXECUTOR_NUMBER}/tvm/test-qemu") {
timeout(time: max_time, unit: 'MINUTES') {
try {
init_git()
unpack_lib('qemu', microtvm_lib)
sh(
script: 'cd build && tar -xzvf microtvm_template_projects.tar.gz',
label: 'Unpack microtvm_template_projects'
)
ci_setup(ci_qemu)
cpp_unittest(ci_qemu)
sh (
script: "${docker_run} ${ci_qemu} ./tests/scripts/task_python_microtvm.sh",
label: 'Run microTVM tests',
)
sh (
script: "${docker_run} ${ci_qemu} ./tests/scripts/task_demo_microtvm.sh",
label: 'Run microTVM demos',
)
} finally {
junit 'build/pytest-results/*.xml'
}
}
}
}
} else {
Utils.markStageSkippedForConditional('test: QEMU')
}
},
'topi: aarch64': {
if (!skip_ci && is_docs_only_build != 1) {
node('ARM') {
Expand Down
78 changes: 43 additions & 35 deletions jenkins/Jenkinsfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ tvm_multilib = 'build/libtvm.so, ' +

tvm_multilib_tsim = 'build/libvta_tsim.so, ' +
tvm_multilib
microtvm_lib = 'build/microtvm_template_projects.tar.gz, ' + tvm_lib
upstream_revision = null

// command to start a docker container
Expand Down Expand Up @@ -573,23 +574,12 @@ stage('Build') {
script: "${docker_run} ${ci_qemu} ./tests/scripts/task_config_build_qemu.sh build",
label: 'Create QEMU cmake config',
)
try {
make(ci_qemu, 'build', '-j2')
cpp_unittest(ci_qemu)
timeout(time: max_time, unit: 'MINUTES') {
ci_setup(ci_qemu)
sh (
script: "${docker_run} ${ci_qemu} ./tests/scripts/task_python_microtvm.sh",
label: 'Run microTVM tests',
)
sh (
script: "${docker_run} ${ci_qemu} ./tests/scripts/task_demo_microtvm.sh",
label: 'Run microTVM demos',
)
}
} finally {
junit 'build/pytest-results/*.xml'
}
make(ci_qemu, 'build', '-j2')
sh(
script: 'cd build && tar -czvf microtvm_template_projects.tar.gz microtvm_template_projects/',
label: 'Compress microtvm_template_projects'
)
pack_lib('qemu', microtvm_lib)
}
}
} else {
Expand All @@ -605,24 +595,8 @@ stage('Build') {
script: "${docker_run} ${ci_hexagon} ./tests/scripts/task_config_build_hexagon.sh build",
label: 'Create Hexagon cmake config',
)
try {
make(ci_hexagon, 'build', '-j2')
cpp_unittest(ci_hexagon)
sh (
script: "${docker_run} ${ci_hexagon} ./tests/scripts/task_build_hexagon_api.sh",
label: 'Build Hexagon API',
)
sh (
script: "${docker_run} ${ci_hexagon} ./tests/scripts/task_python_hexagon.sh",
label: 'Run Hexagon tests',
)
sh (
script: "${docker_run} ${ci_hexagon} ./tests/scripts/task_python_hexagon_simulator.sh",
label: 'Run Hexagon tests on simulator',
)
} finally {
junit 'build/pytest-results/*.xml'
}
make(ci_hexagon, 'build', '-j2')
pack_lib('hexagon', tvm_lib)
}
}
} else {
Expand Down Expand Up @@ -730,6 +704,40 @@ stage('Test') {
Utils.markStageSkippedForConditional('python3: i386')
}
},
{% call m.test_step(name="test: Hexagon", node="CPU", ws="tvm/test-hexagon") %}
unpack_lib('hexagon', tvm_lib)
ci_setup(ci_hexagon)
cpp_unittest(ci_hexagon)
sh (
script: "${docker_run} ${ci_hexagon} ./tests/scripts/task_build_hexagon_api.sh",
label: 'Build Hexagon API',
)
sh (
script: "${docker_run} ${ci_hexagon} ./tests/scripts/task_python_hexagon.sh",
label: 'Run Hexagon tests',
)
sh (
script: "${docker_run} ${ci_hexagon} ./tests/scripts/task_python_hexagon_simulator.sh",
label: 'Run Hexagon tests on simulator',
)
{% endcall %}
{% call m.test_step(name="test: QEMU", node="CPU", ws="tvm/test-qemu") %}
unpack_lib('qemu', microtvm_lib)
sh(
script: 'cd build && tar -xzvf microtvm_template_projects.tar.gz',
label: 'Unpack microtvm_template_projects'
)
ci_setup(ci_qemu)
cpp_unittest(ci_qemu)
sh (
script: "${docker_run} ${ci_qemu} ./tests/scripts/task_python_microtvm.sh",
label: 'Run microTVM tests',
)
sh (
script: "${docker_run} ${ci_qemu} ./tests/scripts/task_demo_microtvm.sh",
label: 'Run microTVM demos',
)
{% endcall %}
{% call m.test_step(name="topi: aarch64", node="ARM", ws="tvm/ut-python-arm") %}
unpack_lib('arm', tvm_multilib)
ci_setup(ci_arm)
Expand Down