You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by jr...@apache.org on 2021/03/31 04:52:15 UTC

[tvm] branch ci-docker-staging updated (fdd51c7 -> 21b15f8)

This is an automated email from the ASF dual-hosted git repository.

jroesch pushed a change to branch ci-docker-staging
in repository https://gitbox.apache.org/repos/asf/tvm.git.


 discard fdd51c7  test CI with staging containers
     add 3ba5868  [TensorIR] Fix parser autocompletion mode (#7737)
     add 7130e80  Better grouped convolution for CPU targets (#6137)
     add 8e23806  [Topi, Relay] Add cumprod (#7722)
     add 67a4a8b  Fix missing <cassert> header, caused compilation failure. (#7740)
     add 8c8971a  [CI] Temp disable rust docs build (#7743)
     add fbfeee4  [Refactor] Rename TVMContext to Device (#7721)
     add f449070  [Bugfix] Fix usages of logging-related macros (#7748)
     add f74dac7  Bump ci-cpu and ci-arm container versions. (#7745)
     add 14f829a  [docs] Getting Started with TVM: AutoTVM and Matrix Multiply (#7643)
     add 474bc4e  [RUNTIME][WEB] Cleanup logging for web runtime. (#7750)
     add dc81767  [ARITH] detect iter affine map with predicate (#7752)
     add 2988a08  [docs] Getting Started: Introduction and Installation (#7638)
     add 18fa495  [Logging] Bring back the stack size optimization (#7756)
     add c39a6e2  Clean up uTVM demo runtime, add ONNX model test and tutorial (#7557)
     add 34deb80  Make Autopad static when available (#7755)
     add e8752c9  [VTA] Make more explicit error message during sim lib loading failures. (#7761)
     add af6f167  [ARITH] normalize iter affine map expr to PrimExpr (#7759)
     add 53d44ef  [FIX] Fix android projects (#7764)
     add 9b43a64  Rename GraphRuntime to GraphExecutor (#7653)
     add 1c2555a  [ONNX] Enable GPU in ONNX importer tests (#7438)
     add fd18751  Add support for using the VM across the RPC boundary.  (#7746)
     add 612f6ce  [Autoscheduler][Sparse] Add sparse dense end to end model tuning support for x86/arm cpu & Some bug fix (#7635)
     add ad775b8  Fix typo in include/tvm/runtime/crt/crt.h and NEWS.md (#7770)
     new 69675d4  Rewrite the Rust Module API and change some imports causing crashes.
     new 5651bd6  Fixes for version bump
     new 1939a4d  Update build.rs to use new tvm-build version
     new 03b7019  Tweak build.rs to use release version of tvm-build
     new ab1bc81  Add docs
     new 954abe0  Add Readme for tvm-sys crate.
     new cabc9a7  Fix Cargo verisions for pre-release
     new a8391af  Add README
     new 09ff914  Move generated code to OUT_DIR
     new 309eff0  Fix path
     new 8e373c8  Add descp for tvm-sys
     new 0b593de  Tweak versions for publishing
     new c281b2d  Tweak versions for publishing
     new b540eef  Add README for tvm-graph-rt
     new dd7cc31  Conform to Apache branding guidelines
     new 9dee499  Fix caps
     new b8613d6  Add header
     new 6d639ba  Remove warning
     new 34806ac  Format
     new 6b8c295  Clean up build
     new 74932d0  Turn docs back on
     new 8f8333f  Tweak CI
     new 21b15f8  WIP

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (fdd51c7)
            \
             N -- N -- N   refs/heads/ci-docker-staging (21b15f8)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 23 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 3rdparty/dlpack                                    |   2 +-
 CMakeLists.txt                                     |  44 +-
 Jenkinsfile                                        |   4 +-
 Makefile                                           |   2 +-
 NEWS.md                                            |   2 +-
 .../androidcamerademo/Camera2BasicFragment.java    |  44 +-
 .../android_camera/app/src/main/jni/Application.mk |   2 +-
 apps/android_camera/app/src/main/jni/tvm_runtime.h |   5 +-
 apps/android_camera/models/prepare_model.py        |   2 +-
 .../org/apache/tvm/android/demo/MainActivity.java  |  38 +-
 .../android_deploy/app/src/main/jni/Application.mk |   2 +-
 apps/android_deploy/app/src/main/jni/tvm_runtime.h |   5 +-
 apps/android_rpc/app/src/main/jni/Application.mk   |   2 +-
 apps/android_rpc/app/src/main/jni/tvm_runtime.h    |   7 +-
 apps/android_rpc/tests/android_rpc_test.py         |  24 +-
 apps/benchmark/arm_cpu_imagenet_bench.py           |   8 +-
 apps/benchmark/gpu_imagenet_bench.py               |   8 +-
 apps/benchmark/mobile_gpu_imagenet_bench.py        |   8 +-
 apps/bundle_deploy/Makefile                        |  12 +-
 apps/bundle_deploy/README.md                       |   8 +-
 apps/bundle_deploy/bundle.c                        |  46 +-
 apps/bundle_deploy/bundle.cc                       |   2 +-
 apps/bundle_deploy/bundle_static.c                 |  48 +-
 apps/bundle_deploy/demo.cc                         |   4 +-
 apps/bundle_deploy/demo_static.c                   |   8 +-
 apps/bundle_deploy/runtime.cc                      |   2 +-
 apps/bundle_deploy/test.cc                         |   4 +-
 apps/bundle_deploy/test_static.c                   |   8 +-
 apps/extension/tests/test_ext.py                   |  12 +-
 apps/howto_deploy/cpp_deploy.cc                    |  16 +-
 apps/howto_deploy/tvm_runtime_pack.cc              |   6 +-
 apps/ios_rpc/tests/ios_rpc_mobilenet.py            |  12 +-
 apps/ios_rpc/tests/ios_rpc_test.py                 |  16 +-
 apps/ios_rpc/tvmrpc.xcodeproj/project.pbxproj      |   4 +-
 apps/ios_rpc/tvmrpc/TVMRuntime.mm                  |   4 +-
 apps/microtvm/README.md                            |  17 +-
 .../{reference-vm/zephyr => }/pyproject.toml       |  10 +-
 apps/microtvm/reference-vm/zephyr/rebuild-tvm.sh   |   2 +-
 apps/microtvm/{ => zephyr}/README.md               |  11 +-
 .../microtvm/zephyr/demo_runtime}/CMakeLists.txt   |   1 -
 apps/microtvm/{ => zephyr/demo_runtime}/README.md  |  15 +-
 .../boards/nrf5340dk_nrf5340_cpuapp.conf           |  20 +-
 .../zephyr/demo_runtime/boards/nucleo_f746zg.conf  |  19 +-
 .../zephyr/demo_runtime/boards/qemu_x86.conf       |  11 +-
 .../microtvm/zephyr/demo_runtime}/crt/crt_config.h |   2 +-
 .../microtvm/zephyr/demo_runtime}/prj.conf         |   7 +-
 .../demo_runtime}/qemu-hack/qemu-system-i386       |   0
 .../microtvm/zephyr/demo_runtime}/src/main.c       | 226 ++++---
 apps/topi_recipe/conv/depthwise_conv2d_test.py     |  44 +-
 apps/topi_recipe/conv/test_conv2d_hwcn_map.py      |  10 +-
 apps/topi_recipe/conv/test_conv_int8_arm.py        |  12 +-
 apps/topi_recipe/conv/test_conv_int8_intel.py      |  12 +-
 apps/topi_recipe/gemm/android_gemm_square.py       |  14 +-
 apps/topi_recipe/gemm/cuda_gemm_square.py          |  12 +-
 apps/topi_recipe/gemm/gemm_int8.py                 |  10 +-
 apps/topi_recipe/reduce/test_reduce_map.py         |   4 +-
 apps/topi_recipe/rnn/lstm.py                       |  14 +-
 apps/topi_recipe/rnn/matexp.py                     |  10 +-
 apps/wasm-standalone/wasm-graph/src/types.rs       |   4 +-
 cmake/config.cmake                                 |  14 +-
 cmake/modules/CUDA.cmake                           |  10 +-
 cmake/modules/LibInfo.cmake                        |   6 +-
 cmake/modules/StandaloneCrt.cmake                  |   6 +-
 cmake/modules/contrib/ArmComputeLib.cmake          |  22 +-
 cmake/modules/contrib/TensorRT.cmake               |   2 +-
 conda/recipe/bld.bat                               |   2 +-
 conda/recipe/build.sh                              |   2 +-
 docker/Dockerfile.demo_android                     |   2 +-
 docker/install/install_tvm_cpu.sh                  |   2 +-
 docker/install/ubuntu1804_install_llvm.sh          |   2 +-
 docker/install/ubuntu_install_core.sh              |   8 +-
 docker/install/ubuntu_install_llvm.sh              |   2 +-
 .../{graph_runtime.rst => graph_executor.rst}      |   4 +-
 docs/api/python/index.rst                          |   2 +-
 docs/api/python/relay/backend.rst                  |   2 +-
 docs/conf.py                                       |   3 +
 docs/contribute/code_guide.rst                     |   2 +-
 docs/deploy/arm_compute_lib.rst                    |  14 +-
 docs/deploy/bnns.rst                               |   6 +-
 docs/deploy/hls.rst                                |   8 +-
 docs/deploy/tensorrt.rst                           |   4 +-
 docs/deploy/vitis_ai.rst                           |  16 +-
 docs/dev/codebase_walkthrough.rst                  |   8 +-
 docs/dev/debugger.rst                              |  14 +-
 docs/dev/index.rst                                 |   4 +-
 docs/dev/microtvm_design.rst                       |  22 +-
 docs/dev/relay_bring_your_own_codegen.rst          |   8 +-
 docs/dev/virtual_machine.rst                       |  10 +-
 docs/index.rst                                     |   2 +-
 docs/install/from_source.rst                       |   2 +-
 docs/microtvm/index.rst                            |   2 +-
 golang/sample/complex.go                           |  10 +-
 golang/sample/simple.go                            |   2 +-
 golang/src/array_test.go                           |  24 +-
 golang/src/{context.go => device.go}               |  68 +--
 golang/src/function_test.go                        |   2 +-
 golang/src/ndarray.go                              |  18 +-
 golang/src/tvm_runtime_pack.cc                     |   4 +-
 golang/src/value.go                                |   4 +-
 include/tvm/arith/analyzer.h                       |  10 +
 include/tvm/arith/iter_affine_map.h                |   5 +-
 include/tvm/relay/analysis.h                       |   8 +-
 include/tvm/relay/attrs/transform.h                |  14 +-
 include/tvm/relay/interpreter.h                    |   4 +-
 include/tvm/runtime/c_runtime_api.h                |  49 +-
 include/tvm/runtime/crt/crt.h                      |   6 +-
 include/tvm/runtime/crt/error_codes.h              |  10 +-
 .../crt/{graph_runtime.h => graph_executor.h}      |  56 +-
 ...ph_runtime_module.h => graph_executor_module.h} |  14 +-
 include/tvm/runtime/crt/memory.h                   |   8 +-
 include/tvm/runtime/crt/platform.h                 |   8 +-
 include/tvm/runtime/device_api.h                   | 131 ++---
 include/tvm/runtime/logging.h                      | 198 +++++--
 include/tvm/runtime/ndarray.h                      |  66 ++-
 include/tvm/runtime/packed_func.h                  |  40 +-
 include/tvm/runtime/profiling.h                    |  16 +-
 include/tvm/runtime/serializer.h                   |  16 +-
 include/tvm/runtime/vm/executable.h                |  34 +-
 include/tvm/runtime/vm/memory_manager.h            |  35 +-
 include/tvm/runtime/vm/vm.h                        |  16 +-
 include/tvm/tir/analysis.h                         |   6 +
 include/tvm/tir/stmt.h                             |   6 +-
 jvm/README.md                                      |   8 +-
 .../src/main/java/org/apache/tvm/ArgTypeCode.java  |   2 +-
 .../apache/tvm/{TVMContext.java => Device.java}    |  68 +--
 jvm/core/src/main/java/org/apache/tvm/LibInfo.java |   2 +-
 jvm/core/src/main/java/org/apache/tvm/NDArray.java |  32 +-
 .../{GraphRuntime.java => GraphExecutor.java}      |  18 +-
 .../java/org/apache/tvm/contrib/GraphModule.java   |  20 +-
 .../main/java/org/apache/tvm/rpc/RPCSession.java   |  86 +--
 ...{TVMRemoteContext.java => TVMRemoteDevice.java} |   6 +-
 .../src/test/java/org/apache/tvm/ModuleTest.java   |  14 +-
 ...raphRuntimeTest.java => GraphExecutorTest.java} |  22 +-
 ...est_graph_runtime.py => test_graph_executor.py} |   2 +-
 jvm/native/src/main/native/jni_helper_func.h       |  14 +-
 .../src/main/native/org_apache_tvm_native_c_api.cc |   2 +-
 python/tvm/__init__.py                             |   2 +-
 python/tvm/_ffi/_ctypes/packed_func.py             |  10 +-
 python/tvm/_ffi/_ctypes/types.py                   |  16 +-
 python/tvm/_ffi/_cython/base.pxi                   |  10 +-
 python/tvm/_ffi/_cython/packed_func.pxi            |  12 +-
 python/tvm/_ffi/runtime_ctypes.py                  |  16 +-
 python/tvm/arith/__init__.py                       |   2 +-
 python/tvm/arith/iter_affine_map.py                |  30 +-
 python/tvm/auto_scheduler/measure.py               |  32 +-
 python/tvm/auto_scheduler/relay_integration.py     |  36 +-
 python/tvm/auto_scheduler/search_task.py           |   9 +-
 python/tvm/autotvm/measure/measure_methods.py      |  22 +-
 python/tvm/autotvm/task/relay_integration.py       |   8 +-
 python/tvm/contrib/coreml_runtime.py               |  12 +-
 ...uda_graph_runtime.py => cuda_graph_executor.py} |  38 +-
 .../{debug_runtime.py => debug_executor.py}        |  58 +-
 python/tvm/contrib/debugger/debug_runtime.py       | 228 +-------
 .../{graph_runtime.py => graph_executor.py}        |  84 +--
 python/tvm/contrib/graph_runtime.py                | 295 +---------
 python/tvm/contrib/peak.py                         |  48 +-
 python/tvm/contrib/sparse.py                       |  16 +-
 python/tvm/contrib/target/coreml.py                |   4 +-
 python/tvm/contrib/tflite_runtime.py               |  16 +-
 python/tvm/driver/build_module.py                  |   4 +-
 python/tvm/driver/tvmc/compiler.py                 |   2 +-
 python/tvm/driver/tvmc/runner.py                   |  20 +-
 python/tvm/micro/__init__.py                       |   4 +-
 python/tvm/micro/contrib/zephyr.py                 |   5 +-
 python/tvm/micro/model_library_format.py           |   6 +-
 python/tvm/micro/session.py                        |  54 +-
 python/tvm/relay/analysis/analysis.py              |  10 +-
 python/tvm/relay/analysis/sparse_dense.py          |  23 +
 ...untime_codegen.py => graph_executor_codegen.py} |  12 +-
 ...untime_factory.py => graph_executor_factory.py} |  14 +-
 python/tvm/relay/backend/interpreter.py            |  10 +-
 python/tvm/relay/backend/vm.py                     |  14 +-
 python/tvm/relay/build_module.py                   |  58 +-
 python/tvm/relay/frontend/common.py                |   8 +-
 python/tvm/relay/frontend/onnx.py                  |   3 +-
 python/tvm/relay/frontend/tflite.py                |   2 +-
 python/tvm/relay/op/_transform.py                  |  19 +-
 python/tvm/relay/op/annotation/annotation.py       |  10 +-
 python/tvm/relay/op/contrib/arm_compute_lib.py     |   2 +-
 python/tvm/relay/op/contrib/tensorrt.py            |   2 +-
 python/tvm/relay/op/memory/memory.py               |  10 +-
 python/tvm/relay/op/strategy/arm_cpu.py            |   7 +-
 python/tvm/relay/op/strategy/cuda.py               |  19 +-
 python/tvm/relay/op/strategy/generic.py            |  29 +-
 python/tvm/relay/op/strategy/x86.py                |   8 +-
 python/tvm/relay/op/tensor.py                      |  20 +-
 python/tvm/relay/op/transform.py                   |  65 ++-
 python/tvm/relay/quantize/_calibrate.py            |   8 +-
 python/tvm/relay/testing/__init__.py               |   4 +-
 python/tvm/relay/testing/init.py                   |   2 +-
 python/tvm/relay/transform/memory_plan.py          |  31 +-
 python/tvm/rpc/client.py                           |  32 +-
 python/tvm/runtime/__init__.py                     |   4 +-
 python/tvm/runtime/module.py                       |  35 +-
 python/tvm/runtime/ndarray.py                      | 127 ++--
 python/tvm/runtime/profiler_vm.py                  |   6 +-
 python/tvm/runtime/vm.py                           |  89 ++-
 python/tvm/target/target.py                        |  20 +-
 python/tvm/testing.py                              |  14 +-
 python/tvm/tir/buffer.py                           |   8 +-
 python/tvm/topi/__init__.py                        |   2 +-
 python/tvm/topi/arm_cpu/__init__.py                |   1 +
 python/tvm/topi/arm_cpu/group_conv2d.py            | 370 ++++++++++++
 python/tvm/topi/cuda/nms.py                        |   8 +-
 python/tvm/topi/cuda/scan.py                       | 196 ++++++-
 python/tvm/topi/cumsum.py                          | 121 ----
 python/tvm/topi/nn/sparse.py                       |   2 +-
 python/tvm/topi/random/kernel.py                   |   6 +-
 python/tvm/topi/scan.py                            | 236 ++++++++
 python/tvm/topi/sort.py                            |   6 +-
 python/tvm/topi/sparse/utils.py                    | 126 ++++
 python/tvm/topi/testing/common.py                  |   8 +-
 python/tvm/topi/unique.py                          |   2 +-
 python/tvm/topi/vision/nms.py                      |   8 +-
 python/tvm/topi/x86/__init__.py                    |   1 +
 python/tvm/topi/x86/group_conv2d.py                | 371 ++++++++++++
 rust/tvm-graph-rt/Cargo.toml                       |   8 +-
 {apps/microtvm => rust/tvm-graph-rt}/README.md     |  12 +-
 rust/tvm-graph-rt/src/array.rs                     |  12 +-
 rust/tvm-graph-rt/src/graph.rs                     |  16 +-
 rust/tvm-macros/Cargo.toml                         |   2 +-
 {apps/microtvm => rust/tvm-macros}/README.md       |  12 +-
 rust/tvm-rt/Cargo.toml                             |  10 +-
 rust/tvm-rt/src/{context.rs => device.rs}          |  14 +-
 rust/tvm-rt/src/lib.rs                             |  12 +-
 rust/tvm-rt/src/ndarray.rs                         |  72 ++-
 rust/tvm-sys/Cargo.toml                            |  11 +-
 {apps/microtvm => rust/tvm-sys}/README.md          |  16 +-
 rust/tvm-sys/build.rs                              | 136 +++--
 rust/tvm-sys/src/array.rs                          |   4 +-
 rust/tvm-sys/src/byte_array.rs                     |   6 +-
 rust/tvm-sys/src/{context.rs => device.rs}         | 112 ++--
 rust/tvm-sys/src/lib.rs                            |   6 +-
 rust/tvm-sys/src/packed_func.rs                    |   8 +-
 rust/tvm-sys/src/value.rs                          |  12 +-
 rust/tvm/Cargo.toml                                |   6 +-
 rust/tvm/README.md                                 |   8 +-
 rust/tvm/examples/resnet/src/build_resnet.py       |  10 +-
 rust/tvm/examples/resnet/src/main.rs               |   8 +-
 rust/tvm/src/ir/diagnostics/mod.rs                 |   2 +-
 rust/tvm/src/lib.rs                                |   6 +-
 rust/tvm/src/runtime/graph_rt.rs                   |  34 +-
 rust/tvm/tests/basics/src/main.rs                  |  12 +-
 rust/tvm/tests/callback/src/bin/array.rs           |   2 +-
 src/arith/analyzer.cc                              |   7 +
 src/arith/iter_affine_map.cc                       | 511 +++++++++++++---
 src/arith/solve_linear_inequality.cc               |  51 +-
 src/auto_scheduler/search_task.cc                  |  16 +-
 src/contrib/tf_op/tvm_dso_op_kernels.cc            |  10 +-
 src/node/structural_hash.cc                        |   6 +-
 src/parser/parser.cc                               |  12 +-
 src/printer/relay_text_printer.cc                  |   2 +-
 src/relay/analysis/context_analysis.cc             |  86 +--
 src/relay/analysis/get_calibration_data.cc         |   4 +-
 src/relay/analysis/util.cc                         |   2 +-
 src/relay/backend/build_module.cc                  |   6 +-
 src/relay/backend/compile_engine.cc                |   2 +-
 .../backend/contrib/arm_compute_lib/codegen.cc     |   6 +-
 src/relay/backend/contrib/tensorrt/codegen.cc      |  12 +-
 ...untime_codegen.cc => graph_executor_codegen.cc} |  26 +-
 src/relay/backend/graph_plan_memory.cc             |   4 +-
 src/relay/backend/interpreter.cc                   |  42 +-
 src/relay/backend/vm/compiler.cc                   |  10 +-
 src/relay/backend/vm/compiler.h                    |   2 +-
 src/relay/op/memory/memory.cc                      |   6 +-
 src/relay/op/memory/memory.h                       |   2 +-
 src/relay/op/tensor/transform.cc                   |  34 +-
 src/relay/transforms/fold_constant.cc              |  28 +-
 src/relay/transforms/memory_alloc.cc               |  53 +-
 src/relay/transforms/partial_eval.cc               |  20 +-
 src/relay/transforms/partition_graph.cc            |   2 +-
 src/runtime/c_runtime_api.cc                       | 129 ++--
 .../contrib/arm_compute_lib/acl_allocator.cc       |   8 +-
 .../contrib/arm_compute_lib/acl_allocator.h        |   8 +-
 src/runtime/contrib/arm_compute_lib/acl_runtime.cc |   8 +-
 src/runtime/contrib/coreml/coreml_runtime.mm       |   4 +-
 src/runtime/contrib/cudnn/conv_forward.cc          |   4 +-
 src/runtime/contrib/cudnn/cudnn_utils.cc           |   4 +-
 src/runtime/contrib/cudnn/cudnn_utils.h            |   2 +-
 src/runtime/contrib/edgetpu/edgetpu_runtime.cc     |   8 +-
 src/runtime/contrib/edgetpu/edgetpu_runtime.h      |   8 +-
 src/runtime/contrib/ethosn/ethosn_device.cc        |   3 +-
 src/runtime/contrib/miopen/conv_forward.cc         |  22 +-
 src/runtime/contrib/miopen/miopen_utils.cc         |   4 +-
 src/runtime/contrib/miopen/miopen_utils.h          |   2 +-
 src/runtime/contrib/mps/conv.mm                    |  20 +-
 src/runtime/contrib/mps/gemm.mm                    |   8 +-
 src/runtime/contrib/nnpack/convolution.cc          |  16 +-
 src/runtime/contrib/random/mt_random_engine.cc     |   6 +-
 src/runtime/contrib/random/random.cc               |   2 +-
 src/runtime/contrib/tensorrt/tensorrt_builder.cc   |   4 +-
 src/runtime/contrib/tensorrt/tensorrt_runtime.cc   |  10 +-
 src/runtime/contrib/tflite/tflite_runtime.cc       |  10 +-
 src/runtime/contrib/tflite/tflite_runtime.h        |  10 +-
 src/runtime/cpu_device_api.cc                      |  25 +-
 src/runtime/crt/Makefile                           |   4 +-
 src/runtime/crt/common/crt_backend_api.c           |   8 +-
 src/runtime/crt/common/crt_runtime_api.c           |  56 +-
 src/runtime/crt/common/ndarray.c                   |  32 +-
 .../graph_executor.c}                              | 409 ++++++-------
 .../{graph_runtime => graph_executor}/load_json.c  |  22 +-
 .../graph_executor_module.c}                       | 124 ++--
 src/runtime/crt/host/main.cc                       |  18 +-
 .../tvm/runtime/crt/internal/common/ndarray.h      |   4 +-
 .../graph_executor.h}                              |  70 +--
 .../{graph_runtime => graph_executor}/load_json.h  |  14 +-
 src/runtime/crt/memory/memory.c                    |   6 +-
 src/runtime/crt/utvm_rpc_server/rpc_server.cc      |   6 +-
 src/runtime/cuda/cuda_device_api.cc                |  99 ++--
 .../cuda_graph/graph_runtime_cuda_graph.cc         |  49 +-
 .../debug/graph_executor_debug.cc}                 |  58 +-
 .../graph_executor.cc}                             | 129 ++--
 .../graph_executor.h}                              |  33 +-
 .../graph_executor_factory.cc}                     | 133 ++---
 .../graph_executor_factory.h}                      |  56 +-
 src/runtime/hexagon/hexagon_device_api.cc          |  72 +--
 src/runtime/hexagon/hexagon_module.cc              |  34 +-
 src/runtime/hexagon/hexagon_module.h               |   2 +-
 src/runtime/library_module.cc                      |  42 +-
 src/runtime/library_module.h                       |  12 +
 src/runtime/logging.cc                             |  33 +-
 src/runtime/metadata_module.cc                     |   2 +-
 src/runtime/metal/metal_common.h                   |  52 +-
 src/runtime/metal/metal_device_api.mm              |  69 ++-
 src/runtime/metal/metal_module.mm                  |   6 +-
 ...tvm_graph_runtime.cc => utvm_graph_executor.cc} |  32 +-
 ...{utvm_graph_runtime.h => utvm_graph_executor.h} |  28 +-
 src/runtime/micro/standalone/utvm_runtime.cc       |  14 +-
 src/runtime/minrpc/minrpc_server.h                 |  42 +-
 src/runtime/minrpc/rpc_reference.h                 |  16 +-
 src/runtime/ndarray.cc                             |  59 +-
 src/runtime/object.cc                              |   2 +-
 src/runtime/opencl/aocl/aocl_common.h              |   2 +-
 src/runtime/opencl/aocl/aocl_device_api.cc         |   4 +-
 src/runtime/opencl/opencl_common.h                 |  42 +-
 src/runtime/opencl/opencl_device_api.cc            |  47 +-
 src/runtime/opencl/opencl_module.cc                |   4 +-
 src/runtime/opencl/sdaccel/sdaccel_common.h        |   2 +-
 src/runtime/opencl/sdaccel/sdaccel_device_api.cc   |   4 +-
 src/runtime/profiling.cc                           |  20 +-
 src/runtime/rocm/rocm_device_api.cc                |  84 +--
 src/runtime/rpc/rpc_device_api.cc                  |  79 ++-
 src/runtime/rpc/rpc_endpoint.cc                    |  82 ++-
 src/runtime/rpc/rpc_endpoint.h                     |   4 +-
 src/runtime/rpc/rpc_local_session.cc               |  20 +-
 src/runtime/rpc/rpc_local_session.h                |   2 +-
 src/runtime/rpc/rpc_module.cc                      |  72 +--
 src/runtime/rpc/rpc_session.cc                     |   4 +-
 src/runtime/rpc/rpc_session.h                      |  18 +-
 src/runtime/stackvm/stackvm.cc                     |   8 +-
 src/runtime/vm/executable.cc                       |  76 ++-
 src/runtime/vm/memory_manager.cc                   |  39 +-
 src/runtime/vm/naive_allocator.h                   |  10 +-
 src/runtime/vm/pooled_allocator.h                  |  12 +-
 src/runtime/vm/profiler/vm.cc                      |   9 +-
 src/runtime/vm/vm.cc                               |  89 +--
 src/runtime/vulkan/vulkan.cc                       |  79 ++-
 src/runtime/workspace_pool.cc                      |  42 +-
 src/runtime/workspace_pool.h                       |   8 +-
 src/support/ffi_testing.cc                         |  10 +-
 src/support/libinfo.cc                             |  18 +-
 src/target/llvm/codegen_amdgpu.cc                  |  12 +-
 src/target/llvm/codegen_hexagon.cc                 |   6 +-
 src/target/llvm/codegen_params.cc                  |   2 +-
 src/target/metadata_module.cc                      |   2 +-
 src/target/source/codegen_c.cc                     |  20 +-
 src/target/target_kind.cc                          |   2 +-
 .../schedule_postproc_rewrite_for_tensor_core.cc   |   4 +-
 .../tir/analysis/expr_complexity.cc                |  56 +-
 src/tir/ir/script/script_complete.cc               |  26 +-
 src/tir/transforms/lower_tvm_builtin.cc            |   4 +-
 src/tir/transforms/make_packed_api.cc              |   6 +-
 tests/azure-pipelines/main.yml                     |   6 +-
 tests/cpp/build_module_test.cc                     |   8 +-
 tests/cpp/container_test.cc                        |   2 +-
 tests/cpp/contrib/bnns.cc                          |   4 +-
 tests/cpp/packed_func_test.cc                      |   4 +-
 tests/cpp/profiling.cc                             |   8 +-
 tests/cpp/relay_build_module_test.cc               |   6 +-
 tests/crt/memory_test.cc                           |   8 +-
 tests/lint/check_file_type.py                      |  15 +-
 tests/micro/qemu/.gitignore                        |   2 -
 tests/micro/qemu/zephyr-runtime/.gitignore         |   3 -
 tests/micro/test_runtime_micro_on_arm.py           |  16 +-
 {apps/microtvm => tests/micro/zephyr}/README.md    |  28 +-
 tests/micro/{qemu => zephyr}/conftest.py           |   3 +
 tests/micro/{qemu => zephyr}/test_zephyr.py        |  91 ++-
 tests/micro/zephyr/testdata/digit-2.jpg            | Bin 0 -> 572 bytes
 tests/micro/zephyr/testdata/digit-9.jpg            | Bin 0 -> 535 bytes
 tests/micro/zephyr/testdata/mnist-8.onnx           | Bin 0 -> 26454 bytes
 .../test_minimal_target_codegen_llvm.py            |  14 +-
 .../test_runtime_ndarray.py                        |   8 +-
 .../test_runtime_packed_func.py                    |  12 +-
 .../contrib/test_arm_compute_lib/infrastructure.py |   4 +-
 tests/python/contrib/test_bnns/infrastructure.py   |   4 +-
 .../contrib/test_bnns/test_onnx_topologies.py      |   6 +-
 tests/python/contrib/test_cblas.py                 |  24 +-
 tests/python/contrib/test_coreml_codegen.py        |   6 +-
 tests/python/contrib/test_coreml_runtime.py        |  14 +-
 tests/python/contrib/test_cublas.py                |  24 +-
 tests/python/contrib/test_cudnn.py                 |  28 +-
 tests/python/contrib/test_edgetpu_runtime.py       |   6 +-
 tests/python/contrib/test_ethosn/infrastructure.py |   6 +-
 tests/python/contrib/test_gemm_acc16.py            |  10 +-
 tests/python/contrib/test_gemm_acc32_vnni.py       |  10 +-
 tests/python/contrib/test_miopen.py                |  10 +-
 tests/python/contrib/test_mps.py                   |  16 +-
 tests/python/contrib/test_mxnet_bridge.py          |   8 +-
 tests/python/contrib/test_nnpack.py                |  28 +-
 tests/python/contrib/test_onnx.py                  |   4 +-
 tests/python/contrib/test_onnx_model.py            |   4 +-
 tests/python/contrib/test_random.py                |  20 +-
 tests/python/contrib/test_rocblas.py               |  16 +-
 tests/python/contrib/test_sort.py                  |  26 +-
 tests/python/contrib/test_sparse.py                |  24 +-
 tests/python/contrib/test_tensorrt.py              |  42 +-
 tests/python/contrib/test_tflite_runtime.py        |   1 -
 tests/python/contrib/test_thrust.py                |  24 +-
 .../contrib/test_verilator/infrastructure.py       |   4 +-
 .../python/contrib/test_vitis_ai/infrastructure.py |   9 +-
 .../test_vitis_ai_runtime_cpu_part.py              |   2 +-
 tests/python/frontend/caffe/test_forward.py        |   6 +-
 tests/python/frontend/caffe2/test_forward.py       |  10 +-
 tests/python/frontend/coreml/test_forward.py       | 106 ++--
 tests/python/frontend/darknet/test_forward.py      |   6 +-
 tests/python/frontend/keras/test_forward.py        |  10 +-
 tests/python/frontend/mxnet/test_forward.py        | 264 ++++-----
 tests/python/frontend/mxnet/test_qnn_ops_utils.py  |   6 +-
 tests/python/frontend/onnx/test_forward.py         | 119 ++--
 tests/python/frontend/pytorch/qnn_test.py          |   2 +-
 tests/python/frontend/pytorch/test_forward.py      |  14 +-
 tests/python/frontend/pytorch/test_lstm.py         |  10 +-
 .../frontend/pytorch/test_object_detection.py      |   4 +-
 .../python/frontend/tensorflow/test_bn_dynamic.py  |   6 +-
 tests/python/frontend/tensorflow/test_forward.py   |  32 +-
 tests/python/frontend/tflite/test_forward.py       |  14 +-
 tests/python/integration/test_dot.py               |   8 +-
 tests/python/integration/test_ewise.py             |  58 +-
 tests/python/integration/test_ewise_fpga.py        |  20 +-
 tests/python/integration/test_gemm.py              |  12 +-
 tests/python/integration/test_reduce.py            |  94 +--
 tests/python/integration/test_scan.py              |   6 +-
 tests/python/integration/test_tuning.py            |   2 +-
 tests/python/integration/test_winograd_nnpack.py   |  10 +-
 .../quantization/test_quantization_accuracy.py     |   6 +-
 tests/python/relay/benchmarking/benchmark_vm.py    |  30 +-
 tests/python/relay/dyn/test_dynamic_op_level10.py  |  18 +-
 tests/python/relay/dyn/test_dynamic_op_level2.py   |   8 +-
 tests/python/relay/dyn/test_dynamic_op_level3.py   |   6 +-
 tests/python/relay/dyn/test_dynamic_op_level4.py   |   4 +-
 tests/python/relay/dyn/test_dynamic_op_level5.py   |   4 +-
 tests/python/relay/dyn/test_dynamic_op_level6.py   |   4 +-
 tests/python/relay/test_adt.py                     |   4 +-
 tests/python/relay/test_any.py                     |  12 +-
 .../test_auto_scheduler_layout_rewrite_networks.py |   6 +-
 tests/python/relay/test_auto_scheduler_tuning.py   |   6 +-
 tests/python/relay/test_backend_compile_engine.py  |   6 +-
 ...h_runtime.py => test_backend_graph_executor.py} |  12 +-
 tests/python/relay/test_backend_interpreter.py     |   8 +-
 tests/python/relay/test_cpp_build_module.py        |  28 +-
 tests/python/relay/test_external_codegen.py        |  20 +-
 tests/python/relay/test_json_runtime.py            |  20 +-
 tests/python/relay/test_op_fast_math.py            |   8 +-
 tests/python/relay/test_op_grad_level1.py          |   8 +-
 tests/python/relay/test_op_grad_level2.py          |  12 +-
 tests/python/relay/test_op_grad_level3.py          |   8 +-
 tests/python/relay/test_op_level1.py               |  40 +-
 tests/python/relay/test_op_level10.py              |  60 +-
 tests/python/relay/test_op_level2.py               | 114 ++--
 tests/python/relay/test_op_level3.py               | 187 +++---
 tests/python/relay/test_op_level4.py               |  44 +-
 tests/python/relay/test_op_level5.py               |  88 +--
 tests/python/relay/test_op_level6.py               |  12 +-
 tests/python/relay/test_op_qnn_add.py              |  12 +-
 tests/python/relay/test_op_qnn_concatenate.py      |  12 +-
 tests/python/relay/test_op_qnn_conv2_transpose.py  |   4 +-
 tests/python/relay/test_op_qnn_conv2d.py           |  10 +-
 tests/python/relay/test_op_qnn_dense.py            |   4 +-
 tests/python/relay/test_op_qnn_dequantize.py       |   8 +-
 tests/python/relay/test_op_qnn_mul.py              |  12 +-
 tests/python/relay/test_op_qnn_quantize.py         |   8 +-
 tests/python/relay/test_op_qnn_requantize.py       |   4 +-
 .../relay/test_op_qnn_simulated_dequantize.py      |   4 +-
 .../python/relay/test_op_qnn_simulated_quantize.py |   4 +-
 tests/python/relay/test_op_qnn_subtract.py         |   2 +-
 tests/python/relay/test_param_dict.py              |  12 +-
 tests/python/relay/test_pass_alter_op_layout.py    |   6 +-
 tests/python/relay/test_pass_annotate_target.py    |  16 +-
 tests/python/relay/test_pass_annotation.py         | 174 +++---
 tests/python/relay/test_pass_auto_quantize.py      |   4 +-
 tests/python/relay/test_pass_dynamic_to_static.py  |   8 +-
 .../relay/test_pass_fold_explicit_padding.py       |   4 +-
 tests/python/relay/test_pass_fuse_ops.py           |   4 +-
 tests/python/relay/test_pass_legalize.py           |   2 +-
 .../python/relay/test_pass_legalize_tensorcore.py  |   2 +-
 tests/python/relay/test_pass_manager.py            |  24 +-
 tests/python/relay/test_pass_partial_eval.py       |   4 +-
 tests/python/relay/test_pass_partition_graph.py    |  22 +-
 tests/python/relay/test_pass_qnn_legalize.py       |   2 +-
 tests/python/relay/test_pass_to_a_normal_form.py   |   8 +-
 .../relay/test_pass_to_basic_block_normal_form.py  |   8 +-
 .../python/relay/test_pass_to_graph_normal_form.py |   4 +-
 tests/python/relay/test_prng.py                    |  23 +-
 tests/python/relay/test_simplify_fc_transpose.py   |   6 +-
 tests/python/relay/test_sparse_dense_convert.py    |   6 +-
 tests/python/relay/test_tensor_array.py            |   7 +-
 tests/python/relay/test_vm.py                      | 130 +++--
 tests/python/relay/test_vm_serialization.py        |  18 +-
 tests/python/topi/python/test_fifo_buffer.py       |  70 +--
 tests/python/topi/python/test_topi_argwhere.py     |  24 +-
 tests/python/topi/python/test_topi_batch_matmul.py |  24 +-
 .../python/test_topi_batch_matmul_tensorcore.py    |   8 +-
 .../topi/python/test_topi_batch_to_space_nd.py     |  18 +-
 .../topi/python/test_topi_bitserial_conv2d.py      |  16 +-
 .../topi/python/test_topi_bitserial_conv2d_rasp.py |   8 +-
 .../topi/python/test_topi_bitserial_dense.py       |   8 +-
 tests/python/topi/python/test_topi_bnn.py          |  12 +-
 tests/python/topi/python/test_topi_broadcast.py    | 114 ++--
 tests/python/topi/python/test_topi_clip.py         |  18 +-
 tests/python/topi/python/test_topi_conv1d.py       |  20 +-
 .../topi/python/test_topi_conv1d_transpose_ncw.py  |  24 +-
 tests/python/topi/python/test_topi_conv2d_NCHWc.py |  10 +-
 tests/python/topi/python/test_topi_conv2d_hwcn.py  |  36 +-
 .../python/test_topi_conv2d_hwnc_tensorcore.py     |  26 +-
 tests/python/topi/python/test_topi_conv2d_int8.py  | 110 ++--
 tests/python/topi/python/test_topi_conv2d_nchw.py  |  40 +-
 tests/python/topi/python/test_topi_conv2d_nhwc.py  |   8 +-
 .../topi/python/test_topi_conv2d_nhwc_pack_int8.py |   8 +-
 .../python/test_topi_conv2d_nhwc_tensorcore.py     |  12 +-
 .../topi/python/test_topi_conv2d_nhwc_winograd.py  |  10 +-
 .../topi/python/test_topi_conv2d_transpose_nchw.py |  36 +-
 .../topi/python/test_topi_conv2d_winograd.py       |  20 +-
 tests/python/topi/python/test_topi_conv3d_ncdhw.py |  26 +-
 tests/python/topi/python/test_topi_conv3d_ndhwc.py |  22 +-
 .../python/test_topi_conv3d_ndhwc_tensorcore.py    |  10 +-
 .../python/test_topi_conv3d_transpose_ncdhw.py     |  24 +-
 .../topi/python/test_topi_conv3d_winograd.py       |  10 +-
 tests/python/topi/python/test_topi_correlation.py  |  20 +-
 tests/python/topi/python/test_topi_cumsum.py       |  79 ---
 .../topi/python/test_topi_deformable_conv2d.py     |  20 +-
 tests/python/topi/python/test_topi_dense.py        |  26 +-
 .../topi/python/test_topi_dense_tensorcore.py      |  10 +-
 .../python/topi/python/test_topi_depth_to_space.py |  10 +-
 .../topi/python/test_topi_depthwise_conv2d.py      | 130 ++---
 .../test_topi_depthwise_conv2d_back_input.py       |  10 +-
 .../test_topi_depthwise_conv2d_back_weight.py      |  10 +-
 tests/python/topi/python/test_topi_dilate.py       |   6 +-
 tests/python/topi/python/test_topi_einsum.py       |   6 +-
 tests/python/topi/python/test_topi_group_conv2d.py |  90 +--
 .../python/test_topi_group_conv2d_NCHWc_int8.py    |  10 +-
 tests/python/topi/python/test_topi_image.py        |  96 +--
 tests/python/topi/python/test_topi_lrn.py          |   6 +-
 tests/python/topi/python/test_topi_math.py         |  86 +--
 tests/python/topi/python/test_topi_matmul.py       |   6 +-
 tests/python/topi/python/test_topi_pooling.py      | 114 ++--
 tests/python/topi/python/test_topi_prng.py         |  40 +-
 tests/python/topi/python/test_topi_qnn.py          |  54 +-
 tests/python/topi/python/test_topi_reduce.py       |  16 +-
 tests/python/topi/python/test_topi_relu.py         |  36 +-
 tests/python/topi/python/test_topi_reorg.py        |   6 +-
 tests/python/topi/python/test_topi_scan.py         | 144 +++++
 tests/python/topi/python/test_topi_scatter.py      |   6 +-
 tests/python/topi/python/test_topi_softmax.py      |  26 +-
 tests/python/topi/python/test_topi_sort.py         |  72 +--
 .../topi/python/test_topi_space_to_batch_nd.py     |  18 +-
 .../python/topi/python/test_topi_space_to_depth.py |  10 +-
 tests/python/topi/python/test_topi_sparse.py       |  85 +--
 tests/python/topi/python/test_topi_tensor.py       |  62 +-
 tests/python/topi/python/test_topi_transform.py    | 646 ++++++++++-----------
 tests/python/topi/python/test_topi_unique.py       |  18 +-
 tests/python/topi/python/test_topi_upsampling.py   |  36 +-
 tests/python/topi/python/test_topi_vision.py       | 190 +++---
 .../python/unittest/test_arith_iter_affine_map.py  | 125 +++-
 .../unittest/test_auto_scheduler_layout_rewrite.py |  24 +-
 .../unittest/test_auto_scheduler_search_policy.py  |   2 +-
 tests/python/unittest/test_crt.py                  |  34 +-
 tests/python/unittest/test_link_params.py          |  22 +-
 .../unittest/test_micro_model_library_format.py    |   4 +-
 tests/python/unittest/test_runtime_container.py    |   2 +-
 tests/python/unittest/test_runtime_graph.py        |  20 +-
 .../unittest/test_runtime_graph_cuda_graph.py      |   8 +-
 tests/python/unittest/test_runtime_graph_debug.py  |  12 +-
 .../python/unittest/test_runtime_heterogeneous.py  |  24 +-
 .../test_runtime_module_based_interface.py         | 130 ++---
 tests/python/unittest/test_runtime_module_load.py  |  24 +-
 tests/python/unittest/test_runtime_rpc.py          |  38 +-
 tests/python/unittest/test_runtime_vm_profiler.py  |   4 +-
 tests/python/unittest/test_target_codegen_blob.py  |  16 +-
 tests/python/unittest/test_target_codegen_bool.py  |  16 +-
 .../python/unittest/test_target_codegen_c_host.py  |  40 +-
 .../unittest/test_target_codegen_cross_llvm.py     |   8 +-
 tests/python/unittest/test_target_codegen_cuda.py  | 150 ++---
 .../python/unittest/test_target_codegen_device.py  |  12 +-
 .../python/unittest/test_target_codegen_extern.py  |  18 +-
 tests/python/unittest/test_target_codegen_llvm.py  |  72 +--
 .../python/unittest/test_target_codegen_opencl.py  |  70 +--
 tests/python/unittest/test_target_codegen_rocm.py  |  36 +-
 tests/python/unittest/test_target_codegen_spirv.py |  10 +-
 .../python/unittest/test_target_codegen_vulkan.py  |  18 +-
 tests/python/unittest/test_te_autodiff.py          |   2 +-
 tests/python/unittest/test_te_hybrid_script.py     |   6 +-
 ...te_schedule_postproc_rewrite_for_tensor_core.py |  20 +-
 .../unittest/test_te_schedule_tensor_core.py       |  20 +-
 tests/python/unittest/test_te_tensor_overload.py   |  34 +-
 tests/python/unittest/test_tir_buffer.py           |  32 +-
 tests/python/unittest/test_tir_intrin.py           |  28 +-
 tests/python/unittest/test_tir_ir_builder.py       |  40 +-
 .../python/unittest/test_tir_transform_hoist_if.py |  10 +-
 ...test_tir_transform_instrument_bound_checkers.py | 132 ++---
 .../unittest/test_tir_transform_loop_partition.py  |   8 +-
 .../test_tir_transform_lower_warp_memory.py        |  26 +-
 tests/python/unittest/test_tvmscript_complete.py   | 174 ++++++
 tests/python/unittest/test_tvmscript_roundtrip.py  |  11 +-
 tests/scripts/task_config_build_gpu.sh             |   2 +-
 tests/scripts/task_java_unittest.sh                |   2 +-
 tests/scripts/task_python_frontend.sh              |   5 +-
 tests/scripts/task_python_microtvm.sh              |   2 +-
 tests/scripts/task_rust.sh                         |  18 +-
 tests/scripts/test.sh                              |   4 +
 tutorials/auto_scheduler/tune_conv2d_layer_cuda.py |  12 +-
 tutorials/auto_scheduler/tune_network_arm.py       |  46 +-
 tutorials/auto_scheduler/tune_network_cuda.py      |  10 +-
 tutorials/auto_scheduler/tune_network_mali.py      |  20 +-
 tutorials/auto_scheduler/tune_network_x86.py       |  33 +-
 tutorials/auto_scheduler/tune_sparse_x86.py        |  49 +-
 tutorials/autotvm/tune_conv2d_cuda.py              |  10 +-
 tutorials/autotvm/tune_relay_arm.py                |   8 +-
 tutorials/autotvm/tune_relay_cuda.py               |   8 +-
 tutorials/autotvm/tune_relay_mobile_gpu.py         |   8 +-
 tutorials/autotvm/tune_relay_x86.py                |   8 +-
 tutorials/autotvm/tune_simple_template.py          | 336 -----------
 tutorials/frontend/build_gcn.py                    |   8 +-
 tutorials/frontend/deploy_model_on_android.py      |  16 +-
 tutorials/frontend/deploy_model_on_rasp.py         |   6 +-
 .../frontend/deploy_object_detection_pytorch.py    |   4 +-
 tutorials/frontend/deploy_prequantized.py          |   6 +-
 tutorials/frontend/deploy_prequantized_tflite.py   |   8 +-
 tutorials/frontend/deploy_quantized.py             |   4 +-
 tutorials/frontend/deploy_sparse.py                |  22 +-
 tutorials/frontend/deploy_ssd_gluoncv.py           |  14 +-
 tutorials/frontend/from_caffe2.py                  |   6 +-
 tutorials/frontend/from_coreml.py                  |   6 +-
 tutorials/frontend/from_darknet.py                 |   6 +-
 tutorials/frontend/from_keras.py                   |   4 +-
 tutorials/frontend/from_mxnet.py                   |   6 +-
 tutorials/frontend/from_pytorch.py                 |   6 +-
 tutorials/frontend/from_tensorflow.py              |   8 +-
 tutorials/frontend/from_tflite.py                  |   2 +-
 tutorials/frontend/using_external_lib.py           |  10 +-
 tutorials/get_started/README.txt                   |   4 +-
 tutorials/get_started/autotvm_matmul.py            | 376 ++++++++++++
 tutorials/get_started/cross_compilation_and_rpc.py |  14 +-
 tutorials/get_started/install.py                   |  49 ++
 tutorials/get_started/introduction.py              | 132 +++++
 tutorials/get_started/relay_quick_start.py         |  10 +-
 tutorials/get_started/tensor_expr_get_started.py   |  18 +-
 tutorials/get_started/tune_matmul_x86.py           |  12 +-
 tutorials/language/extern_op.py                    |  12 +-
 tutorials/language/reduction.py                    |   6 +-
 tutorials/language/scan.py                         |   6 +-
 tutorials/language/tensorize.py                    |  10 +-
 tutorials/micro/micro_tflite.py                    |  13 +-
 tutorials/optimize/opt_conv_cuda.py                |  10 +-
 tutorials/optimize/opt_conv_tensorcore.py          |  12 +-
 tutorials/optimize/opt_gemm.py                     |  34 +-
 tutorials/optimize/opt_matmul_auto_tensorcore.py   |  12 +-
 tutorials/topi/intro_topi.py                       |   8 +-
 vta/python/vta/testing/simulator.py                |  26 +-
 vta/python/vta/top/graphpack.py                    |  10 +-
 vta/runtime/device_api.cc                          |  28 +-
 vta/scripts/tune_resnet.py                         |   8 +-
 .../python/integration/test_benchmark_gemm.py      |  10 +-
 .../integration/test_benchmark_topi_conv2d.py      |  12 +-
 .../test_benchmark_topi_conv2d_transpose.py        |  10 +-
 .../integration/test_benchmark_topi_dense.py       |  10 +-
 .../test_benchmark_topi_group_conv2d.py            |  12 +-
 vta/tests/python/unittest/test_vta_insn.py         |  44 +-
 vta/tutorials/autotvm/tune_relay_vta.py            |   6 +-
 vta/tutorials/frontend/deploy_classification.py    |  12 +-
 vta/tutorials/frontend/legacy/deploy_detection.py  |  10 +-
 web/apps/node/example.js                           |   3 +-
 web/emcc/tvmjs_support.cc                          |  39 +-
 web/emcc/wasm_runtime.cc                           |  29 +-
 web/emcc/webgpu_runtime.cc                         |  60 +-
 web/src/ctypes.ts                                  |   4 +-
 web/src/index.ts                                   |   2 +-
 web/src/runtime.ts                                 |  92 ++-
 web/tests/node/test_ndarray.js                     |   2 +-
 web/tests/node/test_packed_func.js                 |   6 +
 web/tests/python/webgpu_rpc_test.py                |   6 +-
 web/tests/python/websock_rpc_test.py               |   8 +-
 691 files changed, 10900 insertions(+), 8588 deletions(-)
 mode change 100644 => 100755 NEWS.md
 rename apps/microtvm/{reference-vm/zephyr => }/pyproject.toml (95%)
 copy apps/microtvm/{ => zephyr}/README.md (63%)
 rename {tests/micro/qemu/zephyr-runtime => apps/microtvm/zephyr/demo_runtime}/CMakeLists.txt (99%)
 copy apps/microtvm/{ => zephyr/demo_runtime}/README.md (63%)
 copy tests/scripts/task_python_microtvm.sh => apps/microtvm/zephyr/demo_runtime/boards/nrf5340dk_nrf5340_cpuapp.conf (71%)
 mode change 100755 => 100644
 copy tests/scripts/task_python_microtvm.sh => apps/microtvm/zephyr/demo_runtime/boards/nucleo_f746zg.conf (74%)
 mode change 100755 => 100644
 rename tests/micro/qemu/zephyr-runtime/sample.yaml => apps/microtvm/zephyr/demo_runtime/boards/qemu_x86.conf (78%)
 rename {tests/micro/qemu/zephyr-runtime => apps/microtvm/zephyr/demo_runtime}/crt/crt_config.h (98%)
 rename {tests/micro/qemu/zephyr-runtime => apps/microtvm/zephyr/demo_runtime}/prj.conf (87%)
 rename {tests/micro/qemu/zephyr-runtime => apps/microtvm/zephyr/demo_runtime}/qemu-hack/qemu-system-i386 (100%)
 rename {tests/micro/qemu/zephyr-runtime => apps/microtvm/zephyr/demo_runtime}/src/main.c (55%)
 rename docs/api/python/{graph_runtime.rst => graph_executor.rst} (92%)
 rename golang/src/{context.go => device.go} (58%)
 mode change 100644 => 100755 include/tvm/runtime/crt/crt.h
 rename include/tvm/runtime/crt/{graph_runtime.h => graph_executor.h} (60%)
 rename include/tvm/runtime/crt/{graph_runtime_module.h => graph_executor_module.h} (71%)
 rename jvm/core/src/main/java/org/apache/tvm/{TVMContext.java => Device.java} (75%)
 rename jvm/core/src/main/java/org/apache/tvm/contrib/{GraphRuntime.java => GraphExecutor.java} (87%)
 rename jvm/core/src/main/java/org/apache/tvm/rpc/{TVMRemoteContext.java => TVMRemoteDevice.java} (86%)
 rename jvm/core/src/test/java/org/apache/tvm/contrib/{GraphRuntimeTest.java => GraphExecutorTest.java} (85%)
 rename jvm/core/src/test/scripts/{test_graph_runtime.py => test_graph_executor.py} (98%)
 rename python/tvm/contrib/cuda_graph/{cuda_graph_runtime.py => cuda_graph_executor.py} (74%)
 copy python/tvm/contrib/debugger/{debug_runtime.py => debug_executor.py} (82%)
 copy python/tvm/contrib/{graph_runtime.py => graph_executor.py} (76%)
 rename python/tvm/relay/backend/{graph_runtime_codegen.py => graph_executor_codegen.py} (89%)
 rename python/tvm/relay/backend/{graph_runtime_factory.py => graph_executor_factory.py} (88%)
 create mode 100644 python/tvm/topi/arm_cpu/group_conv2d.py
 delete mode 100644 python/tvm/topi/cumsum.py
 create mode 100644 python/tvm/topi/scan.py
 create mode 100644 python/tvm/topi/sparse/utils.py
 create mode 100644 python/tvm/topi/x86/group_conv2d.py
 copy {apps/microtvm => rust/tvm-graph-rt}/README.md (63%)
 copy {apps/microtvm => rust/tvm-macros}/README.md (63%)
 rename rust/tvm-rt/src/{context.rs => device.rs} (91%)
 copy {apps/microtvm => rust/tvm-sys}/README.md (63%)
 rename rust/tvm-sys/src/{context.rs => device.rs} (71%)
 rename src/relay/backend/{graph_runtime_codegen.cc => graph_executor_codegen.cc} (96%)
 rename src/runtime/crt/{graph_runtime/graph_runtime.c => graph_executor/graph_executor.c} (71%)
 rename src/runtime/crt/{graph_runtime => graph_executor}/load_json.c (96%)
 rename src/runtime/crt/{graph_runtime_module/graph_runtime_module.c => graph_executor_module/graph_executor_module.c} (50%)
 rename src/runtime/crt/include/tvm/runtime/crt/internal/{graph_runtime/graph_runtime.h => graph_executor/graph_executor.h} (56%)
 rename src/runtime/crt/include/tvm/runtime/crt/internal/{graph_runtime => graph_executor}/load_json.h (90%)
 rename src/runtime/{graph => graph_executor}/cuda_graph/graph_runtime_cuda_graph.cc (70%)
 rename src/runtime/{graph/debug/graph_runtime_debug.cc => graph_executor/debug/graph_executor_debug.cc} (85%)
 rename src/runtime/{graph/graph_runtime.cc => graph_executor/graph_executor.cc} (82%)
 rename src/runtime/{graph/graph_runtime.h => graph_executor/graph_executor.h} (93%)
 rename src/runtime/{graph/graph_runtime_factory.cc => graph_executor/graph_executor_factory.cc} (54%)
 rename src/runtime/{graph/graph_runtime_factory.h => graph_executor/graph_executor_factory.h} (63%)
 rename src/runtime/micro/standalone/{utvm_graph_runtime.cc => utvm_graph_executor.cc} (94%)
 rename src/runtime/micro/standalone/{utvm_graph_runtime.h => utvm_graph_executor.h} (87%)
 copy tests/cpp/profiling.cc => src/tir/analysis/expr_complexity.cc (53%)
 delete mode 100644 tests/micro/qemu/.gitignore
 delete mode 100644 tests/micro/qemu/zephyr-runtime/.gitignore
 copy {apps/microtvm => tests/micro/zephyr}/README.md (52%)
 rename tests/micro/{qemu => zephyr}/conftest.py (94%)
 rename tests/micro/{qemu => zephyr}/test_zephyr.py (75%)
 create mode 100644 tests/micro/zephyr/testdata/digit-2.jpg
 create mode 100644 tests/micro/zephyr/testdata/digit-9.jpg
 create mode 100644 tests/micro/zephyr/testdata/mnist-8.onnx
 rename tests/python/relay/{test_backend_graph_runtime.py => test_backend_graph_executor.py} (95%)
 delete mode 100644 tests/python/topi/python/test_topi_cumsum.py
 create mode 100644 tests/python/topi/python/test_topi_scan.py
 create mode 100644 tests/python/unittest/test_tvmscript_complete.py
 create mode 100644 tests/scripts/test.sh
 delete mode 100644 tutorials/autotvm/tune_simple_template.py
 create mode 100644 tutorials/get_started/autotvm_matmul.py
 create mode 100644 tutorials/get_started/install.py
 create mode 100644 tutorials/get_started/introduction.py

[tvm] 01/23: Rewrite the Rust Module API and change some imports causing crashes.

Posted by jr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jroesch pushed a commit to branch ci-docker-staging
in repository https://gitbox.apache.org/repos/asf/tvm.git

commit 69675d46ea9161234cbfaeb9c8c65897a0eb99b0
Author: Jared Roesch <jr...@octoml.ai>
AuthorDate: Wed Feb 17 21:01:22 2021 -0800

    Rewrite the Rust Module API and change some imports causing crashes.
    
    This commit also updates the docs to remove outdated information.
---
 rust/tvm/src/compiler/graph_rt.rs            | 1 +
 tests/python/topi/python/test_topi_sparse.py | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/rust/tvm/src/compiler/graph_rt.rs b/rust/tvm/src/compiler/graph_rt.rs
index 6b58733..61409ba 100644
--- a/rust/tvm/src/compiler/graph_rt.rs
+++ b/rust/tvm/src/compiler/graph_rt.rs
@@ -26,6 +26,7 @@ use thiserror::Error;
 
 use crate::ir::IRModule;
 use crate::python;
+use crate::runtime::IsObjectRef;
 use crate::runtime::{map::Map, Function, Module as RtModule, NDArray, String};
 
 #[derive(Error, Debug)]
diff --git a/tests/python/topi/python/test_topi_sparse.py b/tests/python/topi/python/test_topi_sparse.py
index 500384b..6db1b2a 100644
--- a/tests/python/topi/python/test_topi_sparse.py
+++ b/tests/python/topi/python/test_topi_sparse.py
@@ -25,7 +25,6 @@ from tvm.topi.utils import get_const_tuple
 import tvm.contrib.sparse as tvmsp
 from collections import namedtuple
 import time
-import scipy.sparse as sp
 import tvm.testing
 
 _sparse_dense_implement = {
@@ -248,6 +247,8 @@ def test_dense():
 
 
 def test_sparse_dense_csr():
+    import scipy.sparse as sp
+
     M, N, K, density = 1, 17, 47, 0.2
     X_np = np.random.randn(M, K).astype("float32")
     W_sp_np = sp.random(N, K, density=density, format="csr", dtype="float32")

[tvm] 19/23: Format

Posted by jr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jroesch pushed a commit to branch ci-docker-staging
in repository https://gitbox.apache.org/repos/asf/tvm.git

commit 34806acef5cb991c72cedfd9bd9e7bb14c95af62
Author: Jared Roesch <jr...@octoml.ai>
AuthorDate: Fri Mar 26 14:41:25 2021 -0700

    Format
---
 rust/tvm-sys/build.rs          | 30 ++++++++++++++++++++++--------
 rust/tvm-sys/src/byte_array.rs |  4 +---
 2 files changed, 23 insertions(+), 11 deletions(-)

diff --git a/rust/tvm-sys/build.rs b/rust/tvm-sys/build.rs
index 107d813..5a62f22 100644
--- a/rust/tvm-sys/build.rs
+++ b/rust/tvm-sys/build.rs
@@ -22,7 +22,7 @@ extern crate bindgen;
 use std::path::{Path, PathBuf};
 
 use anyhow::{Context, Result};
-use tvm_build::{BuildConfig};
+use tvm_build::BuildConfig;
 
 /// The necessary information for detecting a TVM installation.
 struct TVMInstall {
@@ -41,9 +41,13 @@ fn find_using_tvm_path<P: AsRef<Path>>(tvm_path: P) -> Result<TVMInstall> {
 fn if_unset<K: AsRef<std::ffi::OsStr>, V: AsRef<std::ffi::OsStr>>(k: K, v: V) -> Result<()> {
     match std::env::var(k.as_ref()) {
         Ok(other) if other != "" => {
-            println!("cargo:warning=Using existing environment variable setting {:?}={:?}", k.as_ref(), v.as_ref());
+            println!(
+                "cargo:warning=Using existing environment variable setting {:?}={:?}",
+                k.as_ref(),
+                v.as_ref()
+            );
         }
-        _ => std::env::set_var(k, v)
+        _ => std::env::set_var(k, v),
     }
 
     Ok(())
@@ -70,7 +74,10 @@ fn find_using_tvm_build() -> Result<TVMInstall> {
 }
 
 fn main() -> Result<()> {
-    let TVMInstall { source_path, build_path } = match option_env!("TVM_HOME") {
+    let TVMInstall {
+        source_path,
+        build_path,
+    } = match option_env!("TVM_HOME") {
         Some(tvm_path) if tvm_path != "" => find_using_tvm_path(tvm_path),
         _ => find_using_tvm_build(),
     }?;
@@ -80,13 +87,18 @@ fn main() -> Result<()> {
     if cfg!(feature = "static-linking") {
         println!("cargo:rustc-link-lib=static=tvm");
         // TODO move this to tvm-build as library_path?
-        println!("cargo:rustc-link-search=native={}/build", build_path.display());
-
+        println!(
+            "cargo:rustc-link-search=native={}/build",
+            build_path.display()
+        );
     }
 
     if cfg!(feature = "dynamic-linking") {
         println!("cargo:rustc-link-lib=dylib=tvm");
-        println!("cargo:rustc-link-search=native={}/build", build_path.display());
+        println!(
+            "cargo:rustc-link-search=native={}/build",
+            build_path.display()
+        );
     }
 
     let runtime_api = source_path.join("include/tvm/runtime/c_runtime_api.h");
@@ -109,7 +121,9 @@ fn main() -> Result<()> {
         .derive_eq(true)
         .derive_default(true)
         .generate()
-        .map_err(|()| anyhow::anyhow!("bindgen failed to generate the Rust bindings for the C API"))?
+        .map_err(|()| {
+            anyhow::anyhow!("bindgen failed to generate the Rust bindings for the C API")
+        })?
         .write_to_file(out_file)
         .context("failed to write the generated Rust binding to disk")?;
 
diff --git a/rust/tvm-sys/src/byte_array.rs b/rust/tvm-sys/src/byte_array.rs
index b1b75fc..4b005ab 100644
--- a/rust/tvm-sys/src/byte_array.rs
+++ b/rust/tvm-sys/src/byte_array.rs
@@ -41,9 +41,7 @@ pub struct ByteArray {
 impl ByteArray {
     /// Gets the underlying byte-array
     pub fn data(&self) -> &'static [u8] {
-        unsafe { std::slice::from_raw_parts(
-            self.array.data as *const u8,
-            self.array.size as _) }
+        unsafe { std::slice::from_raw_parts(self.array.data as *const u8, self.array.size as _) }
     }
 
     /// Gets the length of the underlying byte-array

[tvm] 06/23: Add Readme for tvm-sys crate.

Posted by jr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jroesch pushed a commit to branch ci-docker-staging
in repository https://gitbox.apache.org/repos/asf/tvm.git

commit 954abe0e669c6dba7f7ed05863411ae375e7e1b4
Author: Jared Roesch <jr...@octoml.ai>
AuthorDate: Mon Feb 22 22:49:40 2021 -0800

    Add Readme for tvm-sys crate.
---
 rust/tvm-sys/README.md | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/rust/tvm-sys/README.md b/rust/tvm-sys/README.md
new file mode 100644
index 0000000..f509c98
--- /dev/null
+++ b/rust/tvm-sys/README.md
@@ -0,0 +1,11 @@
+# tvm-sys
+
+The low level bindings to TVM's C APIs for interacting with the runtime,
+the cross-language object system, and packed function API.
+
+These will generate bindings to TVM, if you set `TVM_HOME` variable before
+building it will instruct the bindings to use your source tree, if not the
+crate will use `tvm-build` in order to build a sandboxed version of the library.
+
+This feature is intended to simplify the installation for brand new TVM users
+by trying to automate the build process as much as possible.

[tvm] 04/23: Tweak build.rs to use release version of tvm-build

Posted by jr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jroesch pushed a commit to branch ci-docker-staging
in repository https://gitbox.apache.org/repos/asf/tvm.git

commit 03b7019ba0304b634d3cf4d0893cc808e7729f21
Author: Jared Roesch <jr...@octoml.ai>
AuthorDate: Mon Feb 22 21:34:29 2021 -0800

    Tweak build.rs to use release version of tvm-build
---
 rust/tvm-sys/Cargo.toml |  2 +-
 rust/tvm-sys/build.rs   | 19 +++++++++++--------
 2 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/rust/tvm-sys/Cargo.toml b/rust/tvm-sys/Cargo.toml
index 6075421..0c89023 100644
--- a/rust/tvm-sys/Cargo.toml
+++ b/rust/tvm-sys/Cargo.toml
@@ -36,4 +36,4 @@ enumn = "^0.1"
 [build-dependencies]
 bindgen = { version="0.57", default-features=false }
 anyhow = "^1.0"
-tvm-build = { git = "https://github.com/octoml/tvm-build", branch = "main" }
+tvm-build = "0.1"
diff --git a/rust/tvm-sys/build.rs b/rust/tvm-sys/build.rs
index 78ff84e..c917328 100644
--- a/rust/tvm-sys/build.rs
+++ b/rust/tvm-sys/build.rs
@@ -22,8 +22,15 @@ extern crate bindgen;
 use std::path::{Path, PathBuf};
 
 use anyhow::{Context, Result};
-use tvm_build::BuildConfig;
+use tvm_build::{BuildConfig};
 
+/// The necessary information for detecting a TVM installation.
+struct TVMInstall {
+    source_path: PathBuf,
+    build_path: PathBuf,
+}
+
+/// Find the TVM install using the provided path.
 fn find_using_tvm_path<P: AsRef<Path>>(tvm_path: P) -> Result<TVMInstall> {
     Ok(TVMInstall {
         source_path: tvm_path.as_ref().into(),
@@ -47,16 +54,12 @@ fn set_env_vars() -> Result<()> {
     if_unset("LLVM_CONFIG_PATH", "/opt/homebrew/opt/llvm/bin/llvm-config")
 }
 
-struct TVMInstall {
-    source_path: PathBuf,
-    build_path: PathBuf,
-}
-
+/// Find a TVM installation using TVM build by either first installing or detecting.
 fn find_using_tvm_build() -> Result<TVMInstall> {
     set_env_vars()?;
     let mut build_config = BuildConfig::default();
-    build_config.repository = Some("https://github.com/jroesch/tvm".to_string());
-    build_config.branch = Some("rust-tvm-build".to_string());
+    build_config.repository = Some("https://github.com/apache/tvm".to_string());
+    build_config.branch = Some(option_env!("TVM_BRANCH").unwrap_or("main").into());
     let build_result = tvm_build::build(build_config)?;
     let source_path = build_result.revision.source_path();
     let build_path = build_result.revision.build_path();

[tvm] 14/23: Add README for tvm-graph-rt

Posted by jr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jroesch pushed a commit to branch ci-docker-staging
in repository https://gitbox.apache.org/repos/asf/tvm.git

commit b540eefd0dabeded73d4585b744b73581131a80b
Author: Jared Roesch <jr...@octoml.ai>
AuthorDate: Tue Feb 23 10:46:38 2021 -0800

    Add README for tvm-graph-rt
---
 rust/tvm-graph-rt/README.md | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/rust/tvm-graph-rt/README.md b/rust/tvm-graph-rt/README.md
new file mode 100644
index 0000000..d224910
--- /dev/null
+++ b/rust/tvm-graph-rt/README.md
@@ -0,0 +1,3 @@
+# tvm-graph-rt
+
+An implementation of TVM's graph runtime in Rust. See `tvm` crate for more documentation.

[tvm] 23/23: WIP

Posted by jr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jroesch pushed a commit to branch ci-docker-staging
in repository https://gitbox.apache.org/repos/asf/tvm.git

commit 21b15f8488d661a615c47d3d7870c682501db0b7
Author: Jared Roesch <ro...@gmail.com>
AuthorDate: Tue Mar 30 20:28:09 2021 -0700

    WIP
---
 docker/install/ubuntu1804_install_llvm.sh | 2 +-
 docker/install/ubuntu_install_core.sh     | 2 +-
 tests/scripts/test.sh                     | 4 ++++
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/docker/install/ubuntu1804_install_llvm.sh b/docker/install/ubuntu1804_install_llvm.sh
index 292fdde..06b9805 100755
--- a/docker/install/ubuntu1804_install_llvm.sh
+++ b/docker/install/ubuntu1804_install_llvm.sh
@@ -42,4 +42,4 @@ echo deb-src http://apt.llvm.org/bionic/ llvm-toolchain-bionic main\
      >> /etc/apt/sources.list.d/llvm.list
 
 wget -q -O - http://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
-apt-get update && apt-get install -y llvm-9 llvm-10 llvm-11 clang-9 clang-10 clang-11
+apt-get update && apt-get install -y llvm-4.0 llvm-9 llvm-8 llvm-7 clang-9 libclang-9-dev clang-8 libclang-8-dev libclang-7-dev
diff --git a/docker/install/ubuntu_install_core.sh b/docker/install/ubuntu_install_core.sh
index e7104eb..6f9d791 100755
--- a/docker/install/ubuntu_install_core.sh
+++ b/docker/install/ubuntu_install_core.sh
@@ -24,7 +24,7 @@ set -o pipefail
 apt-get update && apt-get install -y --no-install-recommends \
         git make libgtest-dev cmake wget unzip libtinfo-dev libz-dev\
         libcurl4-openssl-dev libssl-dev libopenblas-dev g++ sudo \
-        apt-transport-https graphviz
+        apt-transport-https graphviz pkg-config
 
 
 cd /usr/src/gtest && cmake CMakeLists.txt && make && cp *.a /usr/lib
diff --git a/tests/scripts/test.sh b/tests/scripts/test.sh
new file mode 100644
index 0000000..1f1dc99
--- /dev/null
+++ b/tests/scripts/test.sh
@@ -0,0 +1,4 @@
+cd build
+cmake ..
+cd ..
+make -j

[tvm] 22/23: Tweak CI

Posted by jr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jroesch pushed a commit to branch ci-docker-staging
in repository https://gitbox.apache.org/repos/asf/tvm.git

commit 8f8333f9402d4e6224a165dfc3643ae32e68caa7
Author: Jared Roesch <ro...@gmail.com>
AuthorDate: Tue Mar 30 13:53:21 2021 -0700

    Tweak CI
---
 docker/install/ubuntu_install_core.sh | 6 +++---
 docker/install/ubuntu_install_llvm.sh | 2 +-
 rust/tvm-sys/Cargo.toml               | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/docker/install/ubuntu_install_core.sh b/docker/install/ubuntu_install_core.sh
index bb40b05..e7104eb 100755
--- a/docker/install/ubuntu_install_core.sh
+++ b/docker/install/ubuntu_install_core.sh
@@ -6,9 +6,9 @@
 # to you under the Apache License, Version 2.0 (the
 # "License"); you may not use this file except in compliance
 # with the License.  You may obtain a copy of the License at
-# 
+#
 #   http://www.apache.org/licenses/LICENSE-2.0
-# 
+#
 # Unless required by applicable law or agreed to in writing,
 # software distributed under the License is distributed on an
 # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -23,7 +23,7 @@ set -o pipefail
 # install libraries for building c++ core on ubuntu
 apt-get update && apt-get install -y --no-install-recommends \
         git make libgtest-dev cmake wget unzip libtinfo-dev libz-dev\
-        libcurl4-openssl-dev libopenblas-dev g++ sudo \
+        libcurl4-openssl-dev libssl-dev libopenblas-dev g++ sudo \
         apt-transport-https graphviz
 
 
diff --git a/docker/install/ubuntu_install_llvm.sh b/docker/install/ubuntu_install_llvm.sh
index 46607b0..09908ba 100755
--- a/docker/install/ubuntu_install_llvm.sh
+++ b/docker/install/ubuntu_install_llvm.sh
@@ -46,4 +46,4 @@ echo deb-src http://apt.llvm.org/xenial/ llvm-toolchain-xenial main\
      >> /etc/apt/sources.list.d/llvm.list
 
 wget -q -O - http://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
-apt-get update && apt-get install -y llvm-4.0 llvm-9 llvm-8 llvm-7 clang-9 clang-8 clang-7
+apt-get update && apt-get install -y llvm-4.0 llvm-9 llvm-8 llvm-7 clang-9 libclang-9-dev clang-8 libclang-8-dev libclang-7-dev
diff --git a/rust/tvm-sys/Cargo.toml b/rust/tvm-sys/Cargo.toml
index bca3e2b..c7ee98f 100644
--- a/rust/tvm-sys/Cargo.toml
+++ b/rust/tvm-sys/Cargo.toml
@@ -35,6 +35,6 @@ ndarray = "0.12"
 enumn = "^0.1"
 
 [build-dependencies]
-bindgen = { version="0.57", default-features=false }
+bindgen = { version="0.57", default-features = false, features = ["runtime"] }
 anyhow = "^1.0"
 tvm-build = "0.1"

[tvm] 13/23: Tweak versions for publishing

Posted by jr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jroesch pushed a commit to branch ci-docker-staging
in repository https://gitbox.apache.org/repos/asf/tvm.git

commit c281b2d40e796f8b52ccd21b206d35a0e402e9e4
Author: Jared Roesch <jr...@octoml.ai>
AuthorDate: Tue Feb 23 10:45:10 2021 -0800

    Tweak versions for publishing
---
 rust/tvm-graph-rt/Cargo.toml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rust/tvm-graph-rt/Cargo.toml b/rust/tvm-graph-rt/Cargo.toml
index 922f3e4..c8db44e 100644
--- a/rust/tvm-graph-rt/Cargo.toml
+++ b/rust/tvm-graph-rt/Cargo.toml
@@ -38,7 +38,7 @@ nom = "5.0"
 num_cpus = "1.10"
 serde = { version = "^1.0", features = ["derive"] }
 serde_json = "^1.0"
-tvm-sys = { version = "0.1.0-alpha", path = "../tvm-sys" }
+tvm-sys = { version = "0.1.1-alpha", path = "../tvm-sys" }
 tvm-macros = { version = "0.1.1-alpha", path = "../tvm-macros" }
 
 [target.'cfg(not(any(target_arch = "wasm32", target_env = "sgx")))'.dependencies]

[tvm] 20/23: Clean up build

Posted by jr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jroesch pushed a commit to branch ci-docker-staging
in repository https://gitbox.apache.org/repos/asf/tvm.git

commit 6b8c29582c1b0a86d92803748bfcbf3658f06f94
Author: Jared Roesch <ro...@gmail.com>
AuthorDate: Fri Mar 26 15:13:32 2021 -0700

    Clean up build
---
 rust/tvm-sys/build.rs      | 14 +++++++-------
 tests/scripts/task_rust.sh | 14 ++++++--------
 2 files changed, 13 insertions(+), 15 deletions(-)

diff --git a/rust/tvm-sys/build.rs b/rust/tvm-sys/build.rs
index 5a62f22..d80bd95 100644
--- a/rust/tvm-sys/build.rs
+++ b/rust/tvm-sys/build.rs
@@ -38,6 +38,7 @@ fn find_using_tvm_path<P: AsRef<Path>>(tvm_path: P) -> Result<TVMInstall> {
     })
 }
 
+#[allow(unused)]
 fn if_unset<K: AsRef<std::ffi::OsStr>, V: AsRef<std::ffi::OsStr>>(k: K, v: V) -> Result<()> {
     match std::env::var(k.as_ref()) {
         Ok(other) if other != "" => {
@@ -53,14 +54,8 @@ fn if_unset<K: AsRef<std::ffi::OsStr>, V: AsRef<std::ffi::OsStr>>(k: K, v: V) ->
     Ok(())
 }
 
-fn set_env_vars() -> Result<()> {
-    if_unset("LIBCLANG_PATH", "/opt/homebrew/opt/llvm/lib")?;
-    if_unset("LLVM_CONFIG_PATH", "/opt/homebrew/opt/llvm/bin/llvm-config")
-}
-
 /// Find a TVM installation using TVM build by either first installing or detecting.
 fn find_using_tvm_build() -> Result<TVMInstall> {
-    set_env_vars()?;
     let mut build_config = BuildConfig::default();
     build_config.repository = Some("https://github.com/apache/tvm".to_string());
     build_config.branch = Some(option_env!("TVM_BRANCH").unwrap_or("main").into());
@@ -82,11 +77,16 @@ fn main() -> Result<()> {
         _ => find_using_tvm_build(),
     }?;
 
+    // If the TVM_HOME environment variable changed, the LLVM_CONFIG_PATH environment variable
+    // changed, the build directory or headers have changed we need to rebuild the Rust bindings.
     println!("cargo:rerun-if-env-changed=TVM_HOME");
+    println!("cargo:rerun-if-env-changed=LLVM_CONFIG_PATH");
+    println!("cargo:rerun-if-changed={}", build_path.display());
+    println!("cargo:rerun-if-changed={}/include", source_path.display());
 
     if cfg!(feature = "static-linking") {
         println!("cargo:rustc-link-lib=static=tvm");
-        // TODO move this to tvm-build as library_path?
+        // TODO(@jroesch): move this to tvm-build as library_path?
         println!(
             "cargo:rustc-link-search=native={}/build",
             build_path.display()
diff --git a/tests/scripts/task_rust.sh b/tests/scripts/task_rust.sh
index c40585b..9ddd1f2 100755
--- a/tests/scripts/task_rust.sh
+++ b/tests/scripts/task_rust.sh
@@ -45,18 +45,16 @@ cargo fmt -- --check
 cd $RUST_DIR/tvm-sys
 # First we test w/o the bindings feature on.
 cargo build
-cargo test --tests
+cargo test --features static-linking --tests
 
 # Second we test w/ the bindings feature on.
-cargo build --features bindings
-cargo test --features bindings --tests
+cargo build --features dynamic-linking
+cargo test --features dynamic-linking --tests
 
 # Next we test the runtime API.
 cd $RUST_DIR/tvm-rt
-
 # Build and run the tests.
-cargo build
-cargo test --tests
+cargo test
 
 # Next we test the graph executor crate.
 cd $RUST_DIR/tvm-graph-rt
@@ -89,11 +87,10 @@ cd -
 # and compiler bindings.
 cd $RUST_DIR/tvm
 
-cargo test --tests -- --test-threads=1
+cargo test
 
 # run basic tests on cpu
 cd tests/basics
-cargo build --features cpu
 cargo run --features cpu
 # uncomment when have more CI resources
 # cargo build --features gpu
@@ -101,6 +98,7 @@ cargo run --features cpu
 # fi
 cd -
 
+# TODO(@jroesch): I believe this is no longer true, refactor in follow up PR.
 # run callback tests separately: https://discuss.tvm.ai/t/are-global-functions-need-to-be-accessed-in-separate-processes/1075
 cd tests/callback
 cargo build

[tvm] 11/23: Add descp for tvm-sys

Posted by jr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jroesch pushed a commit to branch ci-docker-staging
in repository https://gitbox.apache.org/repos/asf/tvm.git

commit 8e373c848f3880fa5ce51c7981aa11b9d38d5828
Author: Jared Roesch <jr...@octoml.ai>
AuthorDate: Mon Feb 22 23:10:39 2021 -0800

    Add descp for tvm-sys
---
 rust/tvm-sys/Cargo.toml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/rust/tvm-sys/Cargo.toml b/rust/tvm-sys/Cargo.toml
index e9f8786..06b04f9 100644
--- a/rust/tvm-sys/Cargo.toml
+++ b/rust/tvm-sys/Cargo.toml
@@ -21,6 +21,7 @@ version = "0.1.0-alpha"
 authors = ["TVM Contributors"]
 license = "Apache-2.0"
 edition = "2018"
+description = "Low level bindings to TVM's cross language API."
 
 [features]
 default = ["dynamic-linking"]

[tvm] 16/23: Fix caps

Posted by jr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jroesch pushed a commit to branch ci-docker-staging
in repository https://gitbox.apache.org/repos/asf/tvm.git

commit 9dee4995dbfd69f5a589f9249e8d109f949d1cb1
Author: Jared Roesch <jr...@octoml.ai>
AuthorDate: Tue Feb 23 14:08:13 2021 -0800

    Fix caps
---
 rust/tvm/README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rust/tvm/README.md b/rust/tvm/README.md
index c49c9e2..b1bb468 100644
--- a/rust/tvm/README.md
+++ b/rust/tvm/README.md
@@ -55,4 +55,4 @@ Please follow the TVM [install](https://tvm.apache.org/docs/install/index.html)
 
 ### Disclaimers
 
-*Apache TVM is a top level project from the apache software foundation. Please refer to the official Apache TVM website for Apache source releases. Apache TVM, Apache, the Apache feather, and the Apache TVM project logo are either trademarks or registered trademarks of the Apache Software Foundation.*
+*Apache TVM is a top level project from the Apache software foundation. Please refer to the official Apache TVM website for Apache source releases. Apache TVM, Apache, the Apache feather, and the Apache TVM project logo are either trademarks or registered trademarks of the Apache Software Foundation.*

[tvm] 03/23: Update build.rs to use new tvm-build version

Posted by jr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jroesch pushed a commit to branch ci-docker-staging
in repository https://gitbox.apache.org/repos/asf/tvm.git

commit 1939a4d5eb0965b9f2c11e042dc2dcb00797f1f5
Author: Jared Roesch <jr...@octoml.ai>
AuthorDate: Sat Feb 20 01:09:58 2021 -0800

    Update build.rs to use new tvm-build version
---
 rust/tvm-sys/build.rs | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/rust/tvm-sys/build.rs b/rust/tvm-sys/build.rs
index 0638f71..78ff84e 100644
--- a/rust/tvm-sys/build.rs
+++ b/rust/tvm-sys/build.rs
@@ -58,8 +58,8 @@ fn find_using_tvm_build() -> Result<TVMInstall> {
     build_config.repository = Some("https://github.com/jroesch/tvm".to_string());
     build_config.branch = Some("rust-tvm-build".to_string());
     let build_result = tvm_build::build(build_config)?;
-    let source_path = build_result.revision_path.join("source");
-    let build_path = build_result.revision_path.join("build");
+    let source_path = build_result.revision.source_path();
+    let build_path = build_result.revision.build_path();
     Ok(TVMInstall {
         source_path,
         build_path,
@@ -76,13 +76,14 @@ fn main() -> Result<()> {
 
     if cfg!(feature = "static-linking") {
         println!("cargo:rustc-link-lib=static=tvm");
-        println!("cargo:rustc-link-search=native={}", build_path.display());
+        // TODO move this to tvm-build as library_path?
+        println!("cargo:rustc-link-search=native={}/build", build_path.display());
 
     }
 
     if cfg!(feature = "dynamic-linking") {
         println!("cargo:rustc-link-lib=dylib=tvm");
-        println!("cargo:rustc-link-search=native={}", build_path.display());
+        println!("cargo:rustc-link-search=native={}/build", build_path.display());
     }
 
     let runtime_api = source_path.join("include/tvm/runtime/c_runtime_api.h");

[tvm] 21/23: Turn docs back on

Posted by jr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jroesch pushed a commit to branch ci-docker-staging
in repository https://gitbox.apache.org/repos/asf/tvm.git

commit 74932d023033f85431bf7675a8614b0955226052
Author: Jared Roesch <ro...@gmail.com>
AuthorDate: Fri Mar 26 15:14:11 2021 -0700

    Turn docs back on
---
 tests/scripts/task_python_docs.sh | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/tests/scripts/task_python_docs.sh b/tests/scripts/task_python_docs.sh
index 1eb75be..459b680 100755
--- a/tests/scripts/task_python_docs.sh
+++ b/tests/scripts/task_python_docs.sh
@@ -74,8 +74,7 @@ cd ..
 
 # Rust doc
 cd rust
-# Temp disable rust doc build
-# cargo doc --workspace --no-deps
+cargo doc --workspace --no-deps
 cd ..
 
 # Prepare the doc dir
@@ -85,7 +84,7 @@ rm -f _docs/.buildinfo
 mkdir -p _docs/api
 mv docs/doxygen/html _docs/api/doxygen
 mv jvm/core/target/site/apidocs _docs/api/javadoc
-# mv rust/target/doc _docs/api/rust
+mv rust/target/doc _docs/api/rust
 mv web/dist/docs _docs/api/typedoc
 
 echo "Start creating the docs tarball.."

[tvm] 10/23: Fix path

Posted by jr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jroesch pushed a commit to branch ci-docker-staging
in repository https://gitbox.apache.org/repos/asf/tvm.git

commit 309eff02e46e23212083f4aa40424a980c1e701e
Author: Jared Roesch <jr...@octoml.ai>
AuthorDate: Mon Feb 22 23:08:49 2021 -0800

    Fix path
---
 rust/tvm-sys/build.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rust/tvm-sys/build.rs b/rust/tvm-sys/build.rs
index 560ab86..107d813 100644
--- a/rust/tvm-sys/build.rs
+++ b/rust/tvm-sys/build.rs
@@ -95,7 +95,7 @@ fn main() -> Result<()> {
     let dlpack_include = format!("-I{}/3rdparty/dlpack/include/", source_path);
     let tvm_include = format!("-I{}/include/", source_path);
 
-    let out_file = PathBuf::from(concat!(env!("OUT_DIR"), "/c_runtime_api.rs"));
+    let out_file = PathBuf::from(std::env::var("OUT_DIR")?).join("c_runtime_api.rs");
 
     // @see rust-bindgen#550 for `blacklist_type`
     bindgen::Builder::default()

[tvm] 05/23: Add docs

Posted by jr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jroesch pushed a commit to branch ci-docker-staging
in repository https://gitbox.apache.org/repos/asf/tvm.git

commit ab1bc811230f6b4df84ce353d17be7611db4ddde
Author: Jared Roesch <jr...@octoml.ai>
AuthorDate: Mon Feb 22 22:49:23 2021 -0800

    Add docs
---
 rust/tvm-graph-rt/Cargo.toml | 2 +-
 rust/tvm-macros/Cargo.toml   | 2 +-
 rust/tvm-rt/Cargo.toml       | 2 +-
 rust/tvm-sys/Cargo.toml      | 2 +-
 rust/tvm/Cargo.toml          | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/rust/tvm-graph-rt/Cargo.toml b/rust/tvm-graph-rt/Cargo.toml
index 5c49239..f81853f 100644
--- a/rust/tvm-graph-rt/Cargo.toml
+++ b/rust/tvm-graph-rt/Cargo.toml
@@ -17,7 +17,7 @@
 
 [package]
 name = "tvm-graph-rt"
-version = "0.1.0"
+version = "0.1.0-alpha"
 license = "Apache-2.0"
 description = "A static graph executor for TVM."
 repository = "https://github.com/apache/tvm"
diff --git a/rust/tvm-macros/Cargo.toml b/rust/tvm-macros/Cargo.toml
index 37275d6..4300cb3 100644
--- a/rust/tvm-macros/Cargo.toml
+++ b/rust/tvm-macros/Cargo.toml
@@ -17,7 +17,7 @@
 
 [package]
 name = "tvm-macros"
-version = "0.1.1"
+version = "0.1.1-alpha"
 license = "Apache-2.0"
 description = "Procedural macros of the TVM crate."
 repository = "https://github.com/apache/tvm"
diff --git a/rust/tvm-rt/Cargo.toml b/rust/tvm-rt/Cargo.toml
index 03d12d4..3ca2a90 100644
--- a/rust/tvm-rt/Cargo.toml
+++ b/rust/tvm-rt/Cargo.toml
@@ -17,7 +17,7 @@
 
 [package]
 name = "tvm-rt"
-version = "0.1.0"
+version = "0.1.0-alpha"
 license = "Apache-2.0"
 description = "Rust bindings for the TVM runtime API."
 repository = "https://github.com/apache/tvm"
diff --git a/rust/tvm-sys/Cargo.toml b/rust/tvm-sys/Cargo.toml
index 0c89023..e9f8786 100644
--- a/rust/tvm-sys/Cargo.toml
+++ b/rust/tvm-sys/Cargo.toml
@@ -17,7 +17,7 @@
 
 [package]
 name = "tvm-sys"
-version = "0.1.0"
+version = "0.1.0-alpha"
 authors = ["TVM Contributors"]
 license = "Apache-2.0"
 edition = "2018"
diff --git a/rust/tvm/Cargo.toml b/rust/tvm/Cargo.toml
index 9438f34..5a02925 100644
--- a/rust/tvm/Cargo.toml
+++ b/rust/tvm/Cargo.toml
@@ -17,7 +17,7 @@
 
 [package]
 name = "tvm"
-version = "0.1.0"
+version = "0.1.1-alpha"
 license = "Apache-2.0"
 description = "Rust frontend support for TVM"
 repository = "https://github.com/apache/tvm"

[tvm] 07/23: Fix Cargo verisions for pre-release

Posted by jr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jroesch pushed a commit to branch ci-docker-staging
in repository https://gitbox.apache.org/repos/asf/tvm.git

commit cabc9a7726f1321747353e73020792fde63df535
Author: Jared Roesch <jr...@octoml.ai>
AuthorDate: Mon Feb 22 22:56:56 2021 -0800

    Fix Cargo verisions for pre-release
---
 rust/tvm-graph-rt/Cargo.toml | 4 ++--
 rust/tvm-rt/Cargo.toml       | 4 ++--
 rust/tvm/Cargo.toml          | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/rust/tvm-graph-rt/Cargo.toml b/rust/tvm-graph-rt/Cargo.toml
index f81853f..922f3e4 100644
--- a/rust/tvm-graph-rt/Cargo.toml
+++ b/rust/tvm-graph-rt/Cargo.toml
@@ -38,8 +38,8 @@ nom = "5.0"
 num_cpus = "1.10"
 serde = { version = "^1.0", features = ["derive"] }
 serde_json = "^1.0"
-tvm-sys = { version = "0.1", path = "../tvm-sys" }
-tvm-macros = { version = "0.1", path = "../tvm-macros" }
+tvm-sys = { version = "0.1.0-alpha", path = "../tvm-sys" }
+tvm-macros = { version = "0.1.1-alpha", path = "../tvm-macros" }
 
 [target.'cfg(not(any(target_arch = "wasm32", target_env = "sgx")))'.dependencies]
 libloading = "0.5"
diff --git a/rust/tvm-rt/Cargo.toml b/rust/tvm-rt/Cargo.toml
index 3ca2a90..831a16b 100644
--- a/rust/tvm-rt/Cargo.toml
+++ b/rust/tvm-rt/Cargo.toml
@@ -38,14 +38,14 @@ blas = ["ndarray/blas"]
 thiserror = "^1.0"
 ndarray = "0.12"
 num-traits = "0.2"
-tvm-macros = { version = "0.1", path = "../tvm-macros" }
+tvm-macros = { version = "0.1.1-alpha", path = "../tvm-macros" }
 paste = "0.1"
 mashup = "0.1"
 once_cell = "^1.3.1"
 memoffset = "0.5.6"
 
 [dependencies.tvm-sys]
-version = "0.1"
+version = "0.1.0-alpha"
 default-features = false
 path = "../tvm-sys/"
 
diff --git a/rust/tvm/Cargo.toml b/rust/tvm/Cargo.toml
index 5a02925..ca32226 100644
--- a/rust/tvm/Cargo.toml
+++ b/rust/tvm/Cargo.toml
@@ -36,7 +36,7 @@ blas = ["ndarray/blas"]
 python = ["pyo3"]
 
 [dependencies.tvm-rt]
-version = "0.1"
+version = "0.1.0-alpha"
 default-features = false
 path = "../tvm-rt/"
 
@@ -46,7 +46,7 @@ anyhow = "^1.0"
 lazy_static = "1.1"
 ndarray = "0.12"
 num-traits = "0.2"
-tvm-macros = { version = "*", path = "../tvm-macros/" }
+tvm-macros = { version = "0.1.1-alpha", path = "../tvm-macros/" }
 paste = "0.1"
 mashup = "0.1"
 once_cell = "^1.3.1"

[tvm] 15/23: Conform to Apache branding guidelines

Posted by jr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jroesch pushed a commit to branch ci-docker-staging
in repository https://gitbox.apache.org/repos/asf/tvm.git

commit dd7cc316367ac7ecd2eb5b1d1b344e798ea1cdf0
Author: Jared Roesch <jr...@octoml.ai>
AuthorDate: Tue Feb 23 13:56:23 2021 -0800

    Conform to Apache branding guidelines
---
 rust/tvm/README.md | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/rust/tvm/README.md b/rust/tvm/README.md
index b518f93..c49c9e2 100644
--- a/rust/tvm/README.md
+++ b/rust/tvm/README.md
@@ -17,7 +17,7 @@
 
 # TVM
 
-This crate provides an idiomatic Rust API for [TVM](https://github.com/apache/tvm).
+This crate provides an idiomatic Rust API for [Apache TVM](https://github.com/apache/tvm).
 The code works on **Stable Rust** and is tested against `rustc 1.47`.
 
 You can find the API Documentation [here](https://tvm.apache.org/docs/api/rust/tvm/index.html).
@@ -52,3 +52,7 @@ and usage is welcome and encouraged. If you want to discuss design issues check
 Please follow the TVM [install](https://tvm.apache.org/docs/install/index.html) instructions, `export TVM_HOME=/path/to/tvm` and add `libtvm_runtime` to your `LD_LIBRARY_PATH`.
 
 *Note:* To run the end-to-end examples and tests, `tvm` and `topi` need to be added to your `PYTHONPATH` or it's automatic via an Anaconda environment when it is installed individually.
+
+### Disclaimers
+
+*Apache TVM is a top level project from the apache software foundation. Please refer to the official Apache TVM website for Apache source releases. Apache TVM, Apache, the Apache feather, and the Apache TVM project logo are either trademarks or registered trademarks of the Apache Software Foundation.*

[tvm] 08/23: Add README

Posted by jr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jroesch pushed a commit to branch ci-docker-staging
in repository https://gitbox.apache.org/repos/asf/tvm.git

commit a8391af4bff2e25a9f4494b21544dc62c877265b
Author: Jared Roesch <jr...@octoml.ai>
AuthorDate: Mon Feb 22 22:58:33 2021 -0800

    Add README
---
 rust/tvm-macros/README.md | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/rust/tvm-macros/README.md b/rust/tvm-macros/README.md
new file mode 100644
index 0000000..8f35a28
--- /dev/null
+++ b/rust/tvm-macros/README.md
@@ -0,0 +1,3 @@
+# tvm-macros
+
+The procedural macro implementations for TVM crates, see `tvm` crate for more documentation.

[tvm] 12/23: Tweak versions for publishing

Posted by jr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jroesch pushed a commit to branch ci-docker-staging
in repository https://gitbox.apache.org/repos/asf/tvm.git

commit 0b593de286daf4f10361af31f601d9c62975d6c2
Author: Jared Roesch <jr...@octoml.ai>
AuthorDate: Mon Feb 22 23:34:50 2021 -0800

    Tweak versions for publishing
---
 rust/tvm-rt/Cargo.toml  | 2 +-
 rust/tvm-sys/Cargo.toml | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/rust/tvm-rt/Cargo.toml b/rust/tvm-rt/Cargo.toml
index 831a16b..eb49558 100644
--- a/rust/tvm-rt/Cargo.toml
+++ b/rust/tvm-rt/Cargo.toml
@@ -45,7 +45,7 @@ once_cell = "^1.3.1"
 memoffset = "0.5.6"
 
 [dependencies.tvm-sys]
-version = "0.1.0-alpha"
+version = "0.1.1-alpha"
 default-features = false
 path = "../tvm-sys/"
 
diff --git a/rust/tvm-sys/Cargo.toml b/rust/tvm-sys/Cargo.toml
index 06b04f9..bca3e2b 100644
--- a/rust/tvm-sys/Cargo.toml
+++ b/rust/tvm-sys/Cargo.toml
@@ -17,7 +17,7 @@
 
 [package]
 name = "tvm-sys"
-version = "0.1.0-alpha"
+version = "0.1.1-alpha"
 authors = ["TVM Contributors"]
 license = "Apache-2.0"
 edition = "2018"

[tvm] 18/23: Remove warning

Posted by jr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jroesch pushed a commit to branch ci-docker-staging
in repository https://gitbox.apache.org/repos/asf/tvm.git

commit 6d639ba9dabb73c4f89eff43c3548ee6ed75a598
Author: Jared Roesch <jr...@octoml.ai>
AuthorDate: Fri Mar 26 14:40:27 2021 -0700

    Remove warning
---
 rust/tvm/src/compiler/graph_rt.rs | 1 -
 1 file changed, 1 deletion(-)

diff --git a/rust/tvm/src/compiler/graph_rt.rs b/rust/tvm/src/compiler/graph_rt.rs
index 61409ba..6b58733 100644
--- a/rust/tvm/src/compiler/graph_rt.rs
+++ b/rust/tvm/src/compiler/graph_rt.rs
@@ -26,7 +26,6 @@ use thiserror::Error;
 
 use crate::ir::IRModule;
 use crate::python;
-use crate::runtime::IsObjectRef;
 use crate::runtime::{map::Map, Function, Module as RtModule, NDArray, String};
 
 #[derive(Error, Debug)]

[tvm] 17/23: Add header

Posted by jr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jroesch pushed a commit to branch ci-docker-staging
in repository https://gitbox.apache.org/repos/asf/tvm.git

commit b8613d61988b10d7a82736c2ccbaa28cf6e243b7
Author: Jared Roesch <jr...@octoml.ai>
AuthorDate: Fri Mar 26 14:36:42 2021 -0700

    Add header
---
 rust/tvm-graph-rt/README.md | 17 +++++++++++++++++
 rust/tvm-macros/README.md   | 17 +++++++++++++++++
 rust/tvm-sys/README.md      | 17 +++++++++++++++++
 3 files changed, 51 insertions(+)

diff --git a/rust/tvm-graph-rt/README.md b/rust/tvm-graph-rt/README.md
index d224910..f1355b0 100644
--- a/rust/tvm-graph-rt/README.md
+++ b/rust/tvm-graph-rt/README.md
@@ -1,3 +1,20 @@
+<!--- Licensed to the Apache Software Foundation (ASF) under one -->
+<!--- or more contributor license agreements.  See the NOTICE file -->
+<!--- distributed with this work for additional information -->
+<!--- regarding copyright ownership.  The ASF licenses this file -->
+<!--- to you under the Apache License, Version 2.0 (the -->
+<!--- "License"); you may not use this file except in compliance -->
+<!--- with the License.  You may obtain a copy of the License at -->
+
+<!---   http://www.apache.org/licenses/LICENSE-2.0 -->
+
+<!--- Unless required by applicable law or agreed to in writing, -->
+<!--- software distributed under the License is distributed on an -->
+<!--- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -->
+<!--- KIND, either express or implied.  See the License for the -->
+<!--- specific language governing permissions and limitations -->
+<!--- under the License. -->
+
 # tvm-graph-rt
 
 An implementation of TVM's graph runtime in Rust. See `tvm` crate for more documentation.
diff --git a/rust/tvm-macros/README.md b/rust/tvm-macros/README.md
index 8f35a28..8a7c4b3 100644
--- a/rust/tvm-macros/README.md
+++ b/rust/tvm-macros/README.md
@@ -1,3 +1,20 @@
+<!--- Licensed to the Apache Software Foundation (ASF) under one -->
+<!--- or more contributor license agreements.  See the NOTICE file -->
+<!--- distributed with this work for additional information -->
+<!--- regarding copyright ownership.  The ASF licenses this file -->
+<!--- to you under the Apache License, Version 2.0 (the -->
+<!--- "License"); you may not use this file except in compliance -->
+<!--- with the License.  You may obtain a copy of the License at -->
+
+<!---   http://www.apache.org/licenses/LICENSE-2.0 -->
+
+<!--- Unless required by applicable law or agreed to in writing, -->
+<!--- software distributed under the License is distributed on an -->
+<!--- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -->
+<!--- KIND, either express or implied.  See the License for the -->
+<!--- specific language governing permissions and limitations -->
+<!--- under the License. -->
+
 # tvm-macros
 
 The procedural macro implementations for TVM crates, see `tvm` crate for more documentation.
diff --git a/rust/tvm-sys/README.md b/rust/tvm-sys/README.md
index f509c98..735a943 100644
--- a/rust/tvm-sys/README.md
+++ b/rust/tvm-sys/README.md
@@ -1,3 +1,20 @@
+<!--- Licensed to the Apache Software Foundation (ASF) under one -->
+<!--- or more contributor license agreements.  See the NOTICE file -->
+<!--- distributed with this work for additional information -->
+<!--- regarding copyright ownership.  The ASF licenses this file -->
+<!--- to you under the Apache License, Version 2.0 (the -->
+<!--- "License"); you may not use this file except in compliance -->
+<!--- with the License.  You may obtain a copy of the License at -->
+
+<!---   http://www.apache.org/licenses/LICENSE-2.0 -->
+
+<!--- Unless required by applicable law or agreed to in writing, -->
+<!--- software distributed under the License is distributed on an -->
+<!--- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -->
+<!--- KIND, either express or implied.  See the License for the -->
+<!--- specific language governing permissions and limitations -->
+<!--- under the License. -->
+
 # tvm-sys
 
 The low level bindings to TVM's C APIs for interacting with the runtime,

[tvm] 09/23: Move generated code to OUT_DIR

Posted by jr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jroesch pushed a commit to branch ci-docker-staging
in repository https://gitbox.apache.org/repos/asf/tvm.git

commit 09ff91475706a826636e7f04beb68447fd1a67e8
Author: Jared Roesch <jr...@octoml.ai>
AuthorDate: Mon Feb 22 23:04:07 2021 -0800

    Move generated code to OUT_DIR
---
 rust/tvm-sys/build.rs   | 4 +++-
 rust/tvm-sys/src/lib.rs | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/rust/tvm-sys/build.rs b/rust/tvm-sys/build.rs
index c917328..560ab86 100644
--- a/rust/tvm-sys/build.rs
+++ b/rust/tvm-sys/build.rs
@@ -95,6 +95,8 @@ fn main() -> Result<()> {
     let dlpack_include = format!("-I{}/3rdparty/dlpack/include/", source_path);
     let tvm_include = format!("-I{}/include/", source_path);
 
+    let out_file = PathBuf::from(concat!(env!("OUT_DIR"), "/c_runtime_api.rs"));
+
     // @see rust-bindgen#550 for `blacklist_type`
     bindgen::Builder::default()
         .header(runtime_api.display().to_string())
@@ -108,7 +110,7 @@ fn main() -> Result<()> {
         .derive_default(true)
         .generate()
         .map_err(|()| anyhow::anyhow!("bindgen failed to generate the Rust bindings for the C API"))?
-        .write_to_file(PathBuf::from("src/c_runtime_api.rs"))
+        .write_to_file(out_file)
         .context("failed to write the generated Rust binding to disk")?;
 
     Ok(())
diff --git a/rust/tvm-sys/src/lib.rs b/rust/tvm-sys/src/lib.rs
index 8ed6f37..f874e67 100644
--- a/rust/tvm-sys/src/lib.rs
+++ b/rust/tvm-sys/src/lib.rs
@@ -32,7 +32,7 @@ pub mod ffi {
 
     use std::os::raw::{c_char, c_int, c_void};
 
-    include!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/c_runtime_api.rs"));
+    include!(concat!(env!("OUT_DIR"), "/c_runtime_api.rs"));
 
     pub type BackendPackedCFunc = extern "C" fn(
         args: *const TVMValue,

[tvm] 02/23: Fixes for version bump

Posted by jr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jroesch pushed a commit to branch ci-docker-staging
in repository https://gitbox.apache.org/repos/asf/tvm.git

commit 5651bd62ad698587ee4eeb8c157192d90a0d3cc0
Author: Jared Roesch <jr...@octoml.ai>
AuthorDate: Thu Feb 18 22:49:57 2021 -0800

    Fixes for version bump
---
 rust/tvm-rt/Cargo.toml         |   4 +-
 rust/tvm-rt/src/ndarray.rs     |   4 +-
 rust/tvm-sys/Cargo.toml        |   8 +--
 rust/tvm-sys/build.rs          | 114 +++++++++++++++++++++++++----------------
 rust/tvm-sys/src/byte_array.rs |   8 +--
 5 files changed, 85 insertions(+), 53 deletions(-)

diff --git a/rust/tvm-rt/Cargo.toml b/rust/tvm-rt/Cargo.toml
index 13c0537..03d12d4 100644
--- a/rust/tvm-rt/Cargo.toml
+++ b/rust/tvm-rt/Cargo.toml
@@ -30,8 +30,8 @@ edition = "2018"
 
 [features]
 default = ["dynamic-linking"]
-dynamic-linking = ["tvm-sys/bindings"]
-static-linking = []
+dynamic-linking = ["tvm-sys/dynamic-linking"]
+static-linking = ["tvm-sys/static-linking"]
 blas = ["ndarray/blas"]
 
 [dependencies]
diff --git a/rust/tvm-rt/src/ndarray.rs b/rust/tvm-rt/src/ndarray.rs
index 4c48ce5..0e2d283 100644
--- a/rust/tvm-rt/src/ndarray.rs
+++ b/rust/tvm-rt/src/ndarray.rs
@@ -287,7 +287,7 @@ impl NDArray {
         check_call!(ffi::TVMArrayCopyFromBytes(
             self.as_raw_dltensor(),
             data.as_ptr() as *mut _,
-            data.len() * mem::size_of::<T>()
+            (data.len() * mem::size_of::<T>()) as _,
         ));
     }
 
@@ -296,7 +296,7 @@ impl NDArray {
         check_call!(ffi::TVMArrayCopyToBytes(
             self.as_raw_dltensor(),
             data.as_ptr() as *mut _,
-            self.size(),
+            self.size() as _,
         ));
     }
 
diff --git a/rust/tvm-sys/Cargo.toml b/rust/tvm-sys/Cargo.toml
index 2952aa4..6075421 100644
--- a/rust/tvm-sys/Cargo.toml
+++ b/rust/tvm-sys/Cargo.toml
@@ -23,8 +23,9 @@ license = "Apache-2.0"
 edition = "2018"
 
 [features]
-default = []
-bindings = []
+default = ["dynamic-linking"]
+static-linking = []
+dynamic-linking = []
 
 [dependencies]
 thiserror = "^1.0"
@@ -33,5 +34,6 @@ ndarray = "0.12"
 enumn = "^0.1"
 
 [build-dependencies]
-bindgen = { version="0.51", default-features=false }
+bindgen = { version="0.57", default-features=false }
 anyhow = "^1.0"
+tvm-build = { git = "https://github.com/octoml/tvm-build", branch = "main" }
diff --git a/rust/tvm-sys/build.rs b/rust/tvm-sys/build.rs
index 1590234..0638f71 100644
--- a/rust/tvm-sys/build.rs
+++ b/rust/tvm-sys/build.rs
@@ -19,65 +19,93 @@
 
 extern crate bindgen;
 
-use std::env;
-use std::path::PathBuf;
+use std::path::{Path, PathBuf};
 
 use anyhow::{Context, Result};
+use tvm_build::BuildConfig;
+
+fn find_using_tvm_path<P: AsRef<Path>>(tvm_path: P) -> Result<TVMInstall> {
+    Ok(TVMInstall {
+        source_path: tvm_path.as_ref().into(),
+        build_path: tvm_path.as_ref().into(),
+    })
+}
+
+fn if_unset<K: AsRef<std::ffi::OsStr>, V: AsRef<std::ffi::OsStr>>(k: K, v: V) -> Result<()> {
+    match std::env::var(k.as_ref()) {
+        Ok(other) if other != "" => {
+            println!("cargo:warning=Using existing environment variable setting {:?}={:?}", k.as_ref(), v.as_ref());
+        }
+        _ => std::env::set_var(k, v)
+    }
+
+    Ok(())
+}
+
+fn set_env_vars() -> Result<()> {
+    if_unset("LIBCLANG_PATH", "/opt/homebrew/opt/llvm/lib")?;
+    if_unset("LLVM_CONFIG_PATH", "/opt/homebrew/opt/llvm/bin/llvm-config")
+}
+
+struct TVMInstall {
+    source_path: PathBuf,
+    build_path: PathBuf,
+}
+
+fn find_using_tvm_build() -> Result<TVMInstall> {
+    set_env_vars()?;
+    let mut build_config = BuildConfig::default();
+    build_config.repository = Some("https://github.com/jroesch/tvm".to_string());
+    build_config.branch = Some("rust-tvm-build".to_string());
+    let build_result = tvm_build::build(build_config)?;
+    let source_path = build_result.revision_path.join("source");
+    let build_path = build_result.revision_path.join("build");
+    Ok(TVMInstall {
+        source_path,
+        build_path,
+    })
+}
 
 fn main() -> Result<()> {
-    let tvm_home = option_env!("TVM_HOME")
-        .map::<Result<String>, _>(|s: &str| Ok(str::to_string(s)))
-        .unwrap_or_else(|| {
-            let crate_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR"))
-                .canonicalize()
-                .with_context(|| {
-                    format!(
-                        "failed to cannonicalize() CARGO_MANIFEST_DIR={}",
-                        env!("CARGO_MANIFEST_DIR")
-                    )
-                })?;
-
-            Ok(crate_dir
-                .parent()
-                .with_context(|| {
-                    format!(
-                        "failed to find parent of CARGO_MANIFEST_DIR={}",
-                        env!("CARGO_MANIFEST_DIR")
-                    )
-                })?
-                .parent()
-                .with_context(|| {
-                    format!(
-                        "failed to find the parent of the parent of CARGO MANIFEST_DIR={}",
-                        env!("CARGO_MANIFEST_DIR")
-                    )
-                })?
-                .to_str()
-                .context("failed to convert to strings")?
-                .to_string())
-        })?;
-
-    if cfg!(feature = "bindings") {
-        println!("cargo:rerun-if-env-changed=TVM_HOME");
+    let TVMInstall { source_path, build_path } = match option_env!("TVM_HOME") {
+        Some(tvm_path) if tvm_path != "" => find_using_tvm_path(tvm_path),
+        _ => find_using_tvm_build(),
+    }?;
+
+    println!("cargo:rerun-if-env-changed=TVM_HOME");
+
+    if cfg!(feature = "static-linking") {
+        println!("cargo:rustc-link-lib=static=tvm");
+        println!("cargo:rustc-link-search=native={}", build_path.display());
+
+    }
+
+    if cfg!(feature = "dynamic-linking") {
         println!("cargo:rustc-link-lib=dylib=tvm");
-        println!("cargo:rustc-link-search=native={}/build", tvm_home);
+        println!("cargo:rustc-link-search=native={}", build_path.display());
     }
 
+    let runtime_api = source_path.join("include/tvm/runtime/c_runtime_api.h");
+    let backend_api = source_path.join("include/tvm/runtime/c_backend_api.h");
+    let source_path = source_path.display().to_string();
+    let dlpack_include = format!("-I{}/3rdparty/dlpack/include/", source_path);
+    let tvm_include = format!("-I{}/include/", source_path);
+
     // @see rust-bindgen#550 for `blacklist_type`
     bindgen::Builder::default()
-        .header(format!("{}/include/tvm/runtime/c_runtime_api.h", tvm_home))
-        .header(format!("{}/include/tvm/runtime/c_backend_api.h", tvm_home))
-        .clang_arg(format!("-I{}/3rdparty/dlpack/include/", tvm_home))
-        .clang_arg(format!("-I{}/include/", tvm_home))
+        .header(runtime_api.display().to_string())
+        .header(backend_api.display().to_string())
+        .clang_arg(dlpack_include)
+        .clang_arg(tvm_include)
         .blacklist_type("max_align_t")
         .layout_tests(false)
         .derive_partialeq(true)
         .derive_eq(true)
         .derive_default(true)
         .generate()
-        .map_err(|()| anyhow::anyhow!("failed to generate bindings"))?
+        .map_err(|()| anyhow::anyhow!("bindgen failed to generate the Rust bindings for the C API"))?
         .write_to_file(PathBuf::from("src/c_runtime_api.rs"))
-        .context("failed to write bindings")?;
+        .context("failed to write the generated Rust binding to disk")?;
 
     Ok(())
 }
diff --git a/rust/tvm-sys/src/byte_array.rs b/rust/tvm-sys/src/byte_array.rs
index 0f02771..b1b75fc 100644
--- a/rust/tvm-sys/src/byte_array.rs
+++ b/rust/tvm-sys/src/byte_array.rs
@@ -41,12 +41,14 @@ pub struct ByteArray {
 impl ByteArray {
     /// Gets the underlying byte-array
     pub fn data(&self) -> &'static [u8] {
-        unsafe { std::slice::from_raw_parts(self.array.data as *const u8, self.array.size) }
+        unsafe { std::slice::from_raw_parts(
+            self.array.data as *const u8,
+            self.array.size as _) }
     }
 
     /// Gets the length of the underlying byte-array
     pub fn len(&self) -> usize {
-        self.array.size
+        self.array.size as _
     }
 
     /// Converts the underlying byte-array to `Vec<u8>`
@@ -66,7 +68,7 @@ impl<T: AsRef<[u8]>> From<T> for ByteArray {
         ByteArray {
             array: TVMByteArray {
                 data: arg.as_ptr() as *const c_char,
-                size: arg.len(),
+                size: arg.len() as _,
             },
         }
     }