Skip to content

Commit b77d24c

Browse files
authored
[microTVM][CRT]Separate CRT template project from standalone CRT build (#13812)
This PR separates the CRT template project for microTVM from CRT standalone library build. The CRT template project would move to build/microtvm_template_projects. It also adds uploading microtvm_template_projects to S3 in few images that were missing this previously.
1 parent cc7def0 commit b77d24c

File tree

17 files changed

+98
-25
lines changed

17 files changed

+98
-25
lines changed

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,7 @@ include(cmake/utils/CCache.cmake)
481481
# Module rules
482482
include(cmake/modules/VTA.cmake)
483483
include(cmake/modules/StandaloneCrt.cmake)
484+
include(cmake/modules/CRT.cmake)
484485
include(cmake/modules/Zephyr.cmake)
485486
include(cmake/modules/Arduino.cmake)
486487
include(cmake/modules/CUDA.cmake)
@@ -576,6 +577,7 @@ include(cmake/modules/contrib/PAPI.cmake)
576577
if(USE_MICRO)
577578
# NOTE: cmake doesn't track dependencies at the file level across subdirectories. For the
578579
# Unix Makefiles generator, need to add these explicit target-level dependency)
580+
add_dependencies(tvm_runtime crt)
579581
add_dependencies(tvm_runtime zephyr)
580582
add_dependencies(tvm_runtime arduino)
581583
if(MSVC)

ci/jenkins/generated/arm_jenkinsfile.groovy

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ci/jenkins/generated/cpu_jenkinsfile.groovy

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ci/jenkins/generated/i386_jenkinsfile.groovy

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ci/jenkins/generated/minimal_jenkinsfile.groovy

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ci/jenkins/templates/arm_jenkinsfile.groovy.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
cmake_build(ci_arm, 'build', '-j4')
3232
make_standalone_crt(ci_arm, 'build')
3333
make_cpp_tests(ci_arm, 'build')
34-
{{ m.upload_artifacts(tag='arm', filenames=tvm_multilib + cpptest + crttest + standalone_crt) }}
34+
{{ m.upload_artifacts(tag='arm', filenames=tvm_multilib + cpptest + crttest + standalone_crt + microtvm_template_projects) }}
3535
{% endcall %}
3636

3737
{% set test_method_names = [] %}

ci/jenkins/templates/cpu_jenkinsfile.groovy.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
cmake_build(ci_cpu, 'build', '-j2')
3232
make_standalone_crt(ci_cpu, 'build')
3333
make_cpp_tests(ci_cpu, 'build')
34-
{{ m.upload_artifacts(tag='cpu', filenames=tvm_multilib_tsim + tvm_allvisible + crttest + cpptest + standalone_crt) }}
34+
{{ m.upload_artifacts(tag='cpu', filenames=tvm_multilib_tsim + tvm_allvisible + crttest + cpptest + standalone_crt + microtvm_template_projects) }}
3535
ci_setup(ci_cpu)
3636
// sh "${docker_run} ${ci_cpu} ./tests/scripts/task_golang.sh"
3737
// TODO(@jroesch): need to resolve CI issue will turn back on in follow up patch

ci/jenkins/templates/i386_jenkinsfile.groovy.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
cmake_build(ci_i386, 'build', '-j2')
3232
make_standalone_crt(ci_i386, 'build')
3333
make_cpp_tests(ci_i386, 'build')
34-
{{ m.upload_artifacts(tag='i386', filenames=tvm_multilib_tsim + standalone_crt + crttest + cpptest) }}
34+
{{ m.upload_artifacts(tag='i386', filenames=tvm_multilib_tsim + standalone_crt + crttest + cpptest + microtvm_template_projects) }}
3535
{% endcall %}
3636

3737

ci/jenkins/templates/minimal_jenkinsfile.groovy.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
cmake_build(ci_minimal, 'build', '-j2')
3232
make_standalone_crt(ci_minimal, 'build')
3333
make_cpp_tests(ci_minimal, 'build')
34-
{{ m.upload_artifacts(tag='cpu-minimal', filenames=tvm_lib + tvm_allvisible + crttest + cpptest + standalone_crt) }}
34+
{{ m.upload_artifacts(tag='cpu-minimal', filenames=tvm_lib + tvm_allvisible + crttest + cpptest + standalone_crt + microtvm_template_projects) }}
3535
{% endcall %}
3636

3737

ci/scripts/jenkins/s3.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,4 +142,7 @@ def s3(source: str, destination: str, recursive: bool) -> List[str]:
142142
show_md5(file)
143143
elif action == Action.UPLOAD:
144144
show_md5(item)
145+
if Path(item).is_dir():
146+
if len(list(Path(item).glob("**/*"))) == 0:
147+
raise RuntimeError(f"Cannot upload empty folder with name: {item}")
145148
s3(item, s3_path + "/" + item, recursive=Path(item).is_dir())

0 commit comments

Comments
 (0)