You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by le...@apache.org on 2022/08/16 10:35:15 UTC

[tvm] branch ci-docker-staging updated (1beb0c19c5 -> e0bd10a716)

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

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


 discard 1beb0c19c5 Add #12130 PR for testing.
 discard ff30307397 Update TensorFlow to release 2.9
     add 39ffe0a5ce [TVMScript] Add object path tracing to StructuralEqual (#12101)
     add 49587cfcea [ci] Add retries to S3 uploads/downloads (#12221)
     add 6f831137c9 [microTVM] Refactor pytest fixtures (#12207)
     add df29e82629 [TIR][CUDA] Fix sub-warp reduction using "max" (#12275)
     add 46a8498ba9 [MetaSchedule] Enhance Conv2d NCHW Winograd Schedule Rules (#12127)
     add 2e02cf7cbe [LLVM] Create LLVM scope object for use with LLVM libraries (#12140)
     add c515241026 fix type bug about topi test unitest (#12285)
     add 3f304c8bc5 [microTVM] Arduino: Fix f-strings on flash warning/error messages (#12175)
     add 9f360a0403 [ETHOSN] Only use mock inference when whole graph is offloaded (#12296)
     add 3731a8ca45 [ETHOSN] Get buffer sizes from the compiled network (#12160)
     add 78b3fc26a0 [ci][tvmbot] Enable re-run for GitHub Actions (#12295)
     add 359a642e92 [TVMScript] Make classes derived from ObjectPath non-nullable (#12304)
     add cfa55251b2 [Relay][Frontend][Onnx] Add RNN operation for ONNX frontend (#12213)
     add 4158738574 initial commit (#12301)
     add 2866f315f9 [FQ2I] Add attrs to adaptive_avg_pool1d (#12290)
     add 5d0367a137 [QNN] Add qnn op for abs to fix wrong scale on quantize (#12287)
     add 485bfaf1ea [ci][docker] Add retries for docker pull (#12306)
     add 4231ebb715 [TVMScript] TracedObject class that simplifies tracing ObjectPaths (#12299)
     add ca46f21f51 [CI] Increase CPU Intergration tests shards to speedup runtime (#12316)
     add 8a0911c429 [TIR] Add tir::builtin::assume (#12267)
     add 0973248858 [TVMScript] Add source_paths to Doc (#12324)
     add 2249256cef [microTVM][CI] Rename ci_qemu to ci_cortexm (#12281)
     add 5821c1240e [TIR] Add DeclBuffer IR node and functors (#12300)
     add 1f97f1fbd5 [microTVM][ARM] Keep microtvm testing only in QEMU Image (#11809)
     add 2a7af612f7 [TIR][Schedule] Support annotate dict typed value (#12288)
     add c4aab62c6d [TIR] Add tir::builtin::undef (#12266)
     add fc411dc6fa Pass that removes reshapes post LowerTE (#12215)
     add 9b86009553 [OpenCL] Use size_t instead of int64_t for OpenCL timer count (#12328)
     add b4e36c61fc [CI] Increase the number of shards for Cortex-M from 4 to 8. (#12334)
     add 8e133b1990 [CI][Docker] Removes Dockerfile.ci_qemu as it was moved to Dockerfile.ci_cortexm (#12329)
     add 6ebb0fd1ad [ETHOSN] Fix output tensor ordering (#12317)
     add b79f9501fd [Relay][Op] Multinomial (#12284)
     add 7f800e41de [CI] Deduplicate and clean XML test reports (#12332)
     add 6026a5e185 [ci] Fix aws s3 cp command in the Jenkinsfile (#12341)
     add ef39e46a1d [microTVM][Zephyr] Fix missing BOARD in CMakeCache file (#12338)
     add d6be6940bd [BYOC-DNNL] Bug Fix (#12314)
     add bd763d3c23 [Topi] add x86 schedule for batch_norm (#12321)
     add 151d6ab8ac [FIX,ROOFLINE] Only save tir functions for roofline (#12339)
     add 5fe756a965 [MetaSchedule][Bugfix] Feature: Strides of buffer access (#12331)
     add 6d87828806 [TIR] Simplify indices in InjectVirtualThread (#12259)
     add d4dff5dfd6 [COMMUNITY] Yuanjing Shi -> Reviewer (#12345)
     add 0c3c08372a [hexagon][topi] add sliced max_pool2 (#12169)
     add 4c4fcee4c2 [UMA] UMA v1.0 (#12087)
     add 52d6b59a39 [AutoTVM][Fix] Fix wrong axis names of data_vec (#12303)
     add 23b203ed3d [Hexagon] Minor changes/fixes in codegen_hexagon.cc (#12308)
     add 0aab92b40b [Node] fix typos in include/tvm/node/functor.h
     add aea82c6417 [MetaSchedule] Extend tune_tir to support tuning of specific blocks. (#12342)
     add 811584992c Infer the value of shape expr to avoid dynamic (#12313)
     add 0c281b7064 [FIX,STORAGE REWRITE] Rewrite buffers in let statements (#12349)
     add a6c3b1f6c3 [TIR] Add int8 CUDA tensor core intrinsics (#12354)
     add 1a98ea2e4f [TIR] Minor fix to tensor intrin description (#12356)
     add fae79bbc3e [TVMScript] Printer Registry (#12237)
     add 22102063dc [ci] De-duplicate retry functions (#12325)
     add 5d72bc1a20 [ci][tvmbot] Ignore irrelevant Actions jobs (#12351)
     add 7f100158a5 [DOCS] Fix tvm.build API doc layout
     add 4280d673f1 [skip ci] [CI] Re-generate Jenkinsfile (#12360)
     add 22ba659438 [BYOC-DNNL] add partition test on sum pattern (#12357)
     add cd6d19f481 [ci][tvmbot] Fix authorization filtering (#12310)
     add 06ac5cde84 [testing] Remove wrapper from @slow (#11566)
     add 1a3d36a28d [ci] Test pytest-forked boxing (#12312)
     add f5f5a75ae9 [TVMScript] Text underlining in DocPrinter based on Doc's source_paths (#12344)
     add ecfd9692a0 Unify name mangling in TVM (#12066)
     add 52152e0be6 Build and test TVM under minimal configuration (#12178)
     add 48354ded38 [Hexagon] Add skip option for RPC server initialization (#12368)
     add 7e1444111e [skip ci][ci] Fix Jenkinsfile (#12387)
     add 99f5e921a5 Update C++ standard to C++17 (#12337)
     add de12486271 [ci][docker] Tag tlcpackstaging images to tlcpack (#11832)
     add e8de88e4f5 [BYOC] [DNNL] enable in-place post-op sum in dnnl json runtime (#12371)
     add 5deb95a947 [Adreno][OpenCL] Get rid of extra memory copy (#12286)
     add 3cb57d20a0 [TVMScript] Printer Frame (#12366)
     add e3e65ce581 Add Python function to get type index by class (#12393)
     add 702cb43f0b [Target] Fix C5 Target Tag to Include CascadeLake Archs (#12385)
     add 22dcf4490d [PyTorch] Fix pad_common for float pad_value (#12134)
     add a1c371f46c [PyTorch] Fix all_any_common with no default input (#12395)
     add f4120e87ef Add needs-triage label to CI Problem template (#12386)
     add d874a8ed52 [microNPU] Reorder copies and computes based on the cycle count (#11591)
     add 1de32b587b [Target] Add Target Parser for Arm(R) Cortex(R) M-Profile CPUs (#12319)
     add 369e8b2830 [ci] Default to n=2 for test parallelism (#12376)
     add c3c7c4ccc3 [Profiler] Fix graph_executor_debug hang (#12382)
     add db1ed779f8 [docs] Update minimum compiler requirements for building from source (#12405)
     add 779a7ada4f Add sort_by_time flag to debug_executor.run method (#12402)
     add 3eb673478b [LowerVTCMAlloc] Move LowerVtcmAlloc to after StorageRewrite (#12364)
     add 57a02f7e26 Update hexagon max_concurrency to be at most equal to the number of HVX units available. (#12394)
     add 478b672f2b [skip ci] Revert "[ci] Default to n=2 for test parallelism (#12376)" (#12413)
     add 1737308397 [WIP][Pylint] Making frontend tests pylint compliant (#12028)
     add 96cac7501d [MetaSchedule] Filter vector_load_lens based on buffer dtype (#12408)
     add 036aa722ae [TIR] Add pass ManifestSharedMemoryLocalStage (#12355)
     add d33a332283 [TVMScript] Printer VarTable (#12336)
     add 8dd621e564 [TIR] Expose ScriptComplete in header (#12419)
     add d8846ec975 [TOPI][OP]change float multiplication of resize op to integer division (#12315)
     add 33bf708755 [Fix] Fix precision issue in FFI converting `int/float` to `PrimExpr` (#12417)
     add 0ac5dd7f64 [Fix] Fix errors in error checking and reporting (#12423)
     add 24d9d398bb Add `operator()` to `support::With` (#12418)
     add 8ec7a0a460 [TIR] Fix assert for tensorcore int8 intrinsics (#12365)
     add 9d4df89833 [TIR] Allow converting `BufferRegion` to vectorized `BufferLoad` (#12420)
     add 57a3b26343 [Fix] Fix `dtype` in Cache-Read/Write (#12421)
     add e3d0305881 [TIR] Avoid `import *` in TIR tensor intrinsic registration (#12424)
     add e111984117 [TIR] Allow `tir.Buffer` converted to `BufferLoad/BufferRegion` with `__getitem__` (#12422)
     add d805ae3bd9 [TIR] Expose: `call_packed_lowered`, `call_cpacked_lowered` (#12425)
     add bb513866ad [TIR] Expose Stack-related TVM builtins in Python (#12429)
     add 849b2f9709 [CI][AArch64] Enable ONNX installation in ci_arm image (#12438)
     add 25c4a73b1d Add ci_riscv image, update all to 20220810-060142-fae79bbc3. (#12369)
     add 55f1d7e2c4 [TIR][UX] allow override when register TensorIntrin (#12439)
     add 71d772fcf6 Zephyr: Add support for FVP (#12125)
     add ecbe4ca0ed [MetaSchedule] Add logging of usage of tensor intrinsics (#12445)
     add c477c763c3 [TIR] Expose Misc TIR operations to python (#12435)
     add 09a4ac48ed [ETHOSN] Add support for Requantize (#12384)
     new 4c194155d4 Update TensorFlow to release 2.9
     new e0bd10a716 Add #12130 PR for testing.

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   (1beb0c19c5)
            \
             N -- N -- N   refs/heads/ci-docker-staging (e0bd10a716)

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 2 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:
 .github/ISSUE_TEMPLATE/ci-problem.md               |    1 +
 .github/workflows/tvmbot.yml                       |    2 +-
 CMakeLists.txt                                     |   19 +-
 CONTRIBUTORS.md                                    |    1 +
 Jenkinsfile                                        | 3070 +++++++++++++++++---
 .../android_camera/app/src/main/jni/Application.mk |    2 +-
 .../android_deploy/app/src/main/jni/Application.mk |    2 +-
 apps/android_rpc/app/src/main/jni/Application.mk   |    2 +-
 apps/bundle_deploy/Makefile                        |    2 +-
 apps/dso_plugin_module/Makefile                    |    2 +-
 apps/extension/Makefile                            |    2 +-
 apps/howto_deploy/Makefile                         |    2 +-
 apps/howto_deploy/tvm_runtime_pack.cc              |    2 +-
 .../template_project/microtvm_api_server.py        |    4 +-
 .../reference-vm/base-box/base_box_provision.sh    |    2 +-
 apps/microtvm/reference-vm/rebuild_tvm.sh          |    2 +-
 .../template_project/CMakeLists.txt.template       |    2 +-
 .../fvp-hack/FVP_Corstone_SSE-300_Ethos-U55}       |   43 +-
 .../zephyr/template_project/microtvm_api_server.py |  339 ++-
 .../src/host_driven/fvp/semihost.c                 |   87 +
 .../src/host_driven/fvp/semihost.h                 |   35 +-
 .../zephyr/template_project/src/host_driven/main.c |   42 +-
 apps/microtvm/zephyr_cmsisnn/README.md             |    4 +-
 apps/rocm_rpc/Makefile                             |    2 +-
 apps/tf_tvmdsoop/CMakeLists.txt                    |    2 +-
 .../uma/_template}/__init__.py                     |   13 +-
 apps/uma/_template/backend.py                      |   45 +
 .../__init__.py => apps/uma/_template/codegen.py   |   15 +-
 apps/uma/_template/conv2dnchw.cc                   |   96 +
 apps/uma/_template/passes.py                       |  136 +
 .../__init__.py => apps/uma/_template/patterns.py  |   12 +-
 apps/uma/_template/run.py                          |   82 +
 .../rebuild_tvm.sh => uma/_template/strategies.py} |   42 +-
 apps/uma/uma_cli.py                                |   98 +
 ci/jenkins/Build.groovy.j2                         |   35 +-
 ci/jenkins/Deploy.groovy.j2                        |   63 +-
 ci/jenkins/Jenkinsfile.j2                          |   20 +-
 ci/jenkins/Prepare.groovy.j2                       |   28 +-
 ci/jenkins/Test.groovy.j2                          |   38 +-
 ci/jenkins/generate.py                             |    6 +-
 ci/jenkins/macros.j2                               |   90 +-
 cmake/config.cmake                                 |    3 +
 cmake/modules/LibInfo.cmake                        |    1 +
 cmake/modules/Zephyr.cmake                         |    2 +
 .../__init__.py => cmake/modules/contrib/UMA.cmake |   13 +-
 cmake/utils/Summary.cmake                          |    7 +
 conda/build-environment.yaml                       |    2 +-
 conda/recipe/build.sh                              |    6 +-
 conda/recipe/meta.yaml                             |    6 +-
 conftest.py                                        |   11 +-
 docker/Dockerfile.ci_arm                           |    4 +
 .../{Dockerfile.ci_qemu => Dockerfile.ci_cortexm}  |    0
 docker/Dockerfile.ci_cpu                           |    9 -
 .../{Dockerfile.ci_arm => Dockerfile.ci_minimal}   |   53 +-
 docker/build.sh                                    |    2 +-
 .../install/ubuntu1804_manual_install_llvm.sh      |   38 +-
 docker/install/ubuntu_install_qemu.sh              |   82 -
 docs/conf.py                                       |    1 +
 docs/install/from_source.rst                       |    6 +-
 gallery/tutorial/uma.py                            |  292 ++
 golang/Makefile                                    |    2 +-
 include/tvm/driver/driver_api.h                    |   12 +-
 include/tvm/ir/expr.h                              |    4 +-
 include/tvm/ir/global_var_supply.h                 |  125 +
 include/tvm/ir/module.h                            |   17 +-
 include/tvm/ir/name_supply.h                       |  123 +
 include/tvm/meta_schedule/space_generator.h        |    2 +-
 include/tvm/node/functor.h                         |    4 +-
 include/tvm/node/object_path.h                     |   19 +-
 include/tvm/node/reflection.h                      |    6 +
 include/tvm/node/structural_equal.h                |  157 +-
 include/tvm/relay/attrs/random.h                   |   10 +
 include/tvm/relay/transform.h                      |   11 +
 include/tvm/runtime/profiling.h                    |    6 +-
 include/tvm/script/printer/doc.h                   |   11 +-
 include/tvm/script/printer/doc_printer.h           |   11 +-
 include/tvm/script/printer/frame.h                 |  140 +
 include/tvm/script/printer/traced_object.h         |  484 +++
 include/tvm/script/printer/traced_object_functor.h |  183 ++
 include/tvm/script/printer/var_table.h             |  144 +
 include/tvm/support/with.h                         |    2 +
 include/tvm/target/target_kind.h                   |    5 +
 include/tvm/tir/builtin.h                          |   17 +
 include/tvm/tir/function.h                         |    3 +-
 include/tvm/tir/stmt.h                             |   37 +
 include/tvm/tir/stmt_functor.h                     |    4 +
 include/tvm/tir/transform.h                        |    6 +
 python/setup.py                                    |    2 +-
 python/tvm/_ffi/__init__.py                        |    2 +-
 python/tvm/_ffi/_ctypes/object.py                  |   11 +-
 python/tvm/_ffi/_cython/object.pxi                 |    8 +-
 python/tvm/_ffi/registry.py                        |   21 +-
 python/tvm/contrib/debugger/debug_executor.py      |   55 +-
 python/tvm/contrib/graph_executor.py               |    7 +
 python/tvm/contrib/hexagon/pytest_plugin.py        |   21 +-
 python/tvm/driver/build_module.py                  |    3 +-
 python/tvm/ir/base.py                              |   34 +-
 python/tvm/ir/supply.py                            |  141 +
 python/tvm/meta_schedule/default_config.py         |   11 +-
 .../space_generator/post_order_apply.py            |   12 +-
 python/tvm/meta_schedule/testing/schedule_rule.py  |   10 +-
 python/tvm/meta_schedule/tune.py                   |   27 +
 python/tvm/micro/testing/evaluation.py             |    5 +-
 .../tvm/micro/testing/pytest_plugin.py             |   69 +-
 .../relay/backend/contrib/ethosu/tir/compiler.py   |    1 +
 .../tvm/relay/backend/contrib/ethosu/tir/passes.py |   35 +-
 .../backend/contrib/uma}/__init__.py               |   14 +-
 .../backend/contrib/uma/api}/__init__.py           |   12 +-
 .../backend/contrib/uma/api/_ffi_api.py}           |   11 +-
 .../tvm/relay/backend/contrib/uma/api/codegen.py   |   64 +
 python/tvm/relay/backend/contrib/uma/api/lower.py  |  165 ++
 .../relay/backend/contrib/uma/api/partitioner.py   |  122 +
 python/tvm/relay/backend/contrib/uma/api/utils.py  |   73 +
 python/tvm/relay/backend/contrib/uma/backend.py    |  293 ++
 python/tvm/relay/frontend/onnx.py                  |  326 ++-
 python/tvm/relay/frontend/pytorch.py               |   37 +-
 python/tvm/relay/frontend/tflite.py                |   18 +-
 python/tvm/relay/op/contrib/dnnl.py                |   48 +-
 python/tvm/relay/op/contrib/ethosn.py              |   14 +
 python/tvm/relay/op/random/_kernel.py              |    2 +
 python/tvm/relay/op/random/kernel.py               |   41 +
 python/tvm/relay/op/strategy/adreno.py             |   18 +
 python/tvm/relay/op/strategy/generic.py            |   22 +
 python/tvm/relay/op/strategy/x86.py                |   12 +
 python/tvm/relay/qnn/op/__init__.py                |    3 +-
 python/tvm/relay/qnn/op/legalizations.py           |    3 +
 python/tvm/relay/qnn/op/qnn.py                     |   38 +
 .../transform/fake_quantization_to_integer.py      |   30 +-
 python/tvm/runtime/__init__.py                     |    1 +
 python/tvm/runtime/module.py                       |    6 +
 python/tvm/runtime/object_path.py                  |   16 +
 python/tvm/runtime/vm.py                           |    7 +
 python/tvm/script/printer/doc.py                   |   27 +-
 python/tvm/script/printer/doc_printer.py           |   22 +-
 python/tvm/script/printer/frame.py                 |   81 +
 python/tvm/script/printer/var_table.py             |  118 +
 python/tvm/script/tir/__init__.py                  |   12 +-
 python/tvm/script/tir/__init__.pyi                 |   12 +
 python/tvm/script/tir/intrin.py                    |   89 +-
 python/tvm/script/tir/scope_handler.py             |   85 +-
 python/tvm/script/tir/ty.py                        |   15 +-
 python/tvm/target/target.py                        |    2 +-
 python/tvm/te/operation.py                         |   14 +-
 python/tvm/testing/aot.py                          |   12 +-
 python/tvm/testing/utils.py                        |   13 +-
 python/tvm/tir/__init__.py                         |    6 +-
 python/tvm/tir/buffer.py                           |   41 +-
 python/tvm/tir/function.py                         |   10 +-
 python/tvm/tir/op.py                               |  170 ++
 python/tvm/tir/schedule/_type_checker.py           |   34 +
 python/tvm/tir/schedule/schedule.py                |   11 +-
 python/tvm/tir/stmt.py                             |   20 +
 python/tvm/tir/tensor_intrin/__init__.py           |    6 +-
 python/tvm/tir/tensor_intrin/arm_cpu.py            |    3 +-
 python/tvm/tir/tensor_intrin/cuda.py               |   69 +-
 python/tvm/tir/tensor_intrin/x86.py                |    2 -
 python/tvm/tir/transform/transform.py              |   33 +
 python/tvm/topi/adreno/__init__.py                 |    1 +
 python/tvm/topi/adreno/conv2d_nchw.py              |   29 +-
 python/tvm/topi/adreno/conv2d_nhwc.py              |   29 +-
 python/tvm/topi/adreno/depthwise_conv2d_nchw.py    |   10 +-
 python/tvm/topi/adreno/depthwise_conv2d_nhwc.py    |   10 +-
 python/tvm/topi/adreno/injective.py                |   66 +
 python/tvm/topi/adreno/utils.py                    |   23 +-
 python/tvm/topi/cuda/conv2d_winograd.py            |   10 +-
 python/tvm/topi/generic/conv2d.py                  |    4 +-
 python/tvm/topi/hexagon/slice_ops/__init__.py      |    1 +
 python/tvm/topi/hexagon/slice_ops/max_pool2d.py    |  196 ++
 python/tvm/topi/image/resize.py                    |   65 +-
 python/tvm/topi/random/kernel.py                   |   56 +
 python/tvm/topi/scatter.py                         |    2 +-
 python/tvm/topi/x86/nn.py                          |   30 +
 python/tvm/utils/roofline/__init__.py              |   13 +-
 src/auto_scheduler/feature.cc                      |    4 +-
 src/contrib/hybrid/codegen_hybrid.cc               |  106 +-
 src/contrib/hybrid/codegen_hybrid.h                |   10 +-
 src/driver/driver_api.cc                           |   26 +-
 src/ir/expr.cc                                     |   15 +
 src/ir/global_var_supply.cc                        |  115 +
 src/ir/module.cc                                   |   23 +-
 src/ir/name_supply.cc                              |  108 +
 .../feature_extractor/per_store_feature.cc         |    4 +-
 .../schedule_rule/multi_level_tiling.cc            |   30 +-
 .../schedule_rule/multi_level_tiling.h             |    2 +
 .../multi_level_tiling_tensor_core.cc              |    7 +-
 .../multi_level_tiling_with_intrin.cc              |    3 +
 src/meta_schedule/schedule_rule/winograd.cc        |  101 +
 .../space_generator/post_order_apply.cc            |   30 +-
 src/node/reflection.cc                             |   44 +
 src/node/structural_equal.cc                       |  237 +-
 src/node/structural_hash.cc                        |  162 +-
 src/printer/text_printer.h                         |    1 +
 src/printer/tir_text_printer.cc                    |   12 +
 src/printer/tvmscript_printer.cc                   |   27 +
 src/relay/backend/aot_executor_codegen.cc          |    7 +-
 src/relay/backend/contrib/ethosn/codegen.cc        |   56 +
 src/relay/backend/contrib/ethosn/codegen_ethosn.h  |   14 +
 src/relay/backend/contrib/ethosn/ethosn_api.cc     |   35 +
 src/relay/backend/contrib/ethosn/ethosn_api.h      |    8 +
 src/relay/backend/contrib/uma/relay_to_tir.cc      |  175 ++
 src/relay/backend/contrib/uma/targets.cc           |   80 +
 src/relay/backend/contrib/uma/tir_to_runtime.cc    |   82 +
 src/relay/backend/graph_executor_codegen.cc        |   22 +-
 src/relay/backend/task_extraction.cc               |    4 +-
 src/relay/backend/te_compiler.cc                   |   74 +-
 src/relay/backend/te_compiler.h                    |    4 +-
 src/relay/backend/te_compiler_cache.cc             |   71 +-
 src/relay/backend/te_compiler_cache.h              |    8 +-
 src/relay/ir/dataflow_matcher.cc                   |   12 +-
 src/relay/op/random/kernel.cc                      |   46 +
 src/relay/qnn/op/batch_matmul.cc                   |   20 +-
 src/relay/qnn/op/unary_elementwise_op.cc           |    3 +
 src/relay/transforms/annotate_texture_storage.cc   |  152 +-
 .../transforms/auto_scheduler_layout_rewrite.cc    |    3 +-
 .../transforms/meta_schedule_layout_rewrite.cc     |    3 +-
 src/relay/transforms/partition_graph.cc            |    7 +-
 src/relay/transforms/pattern_utils.h               |    5 +
 src/relay/transforms/remove_standalone_reshapes.cc |  120 +
 src/runtime/contrib/dnnl/dnnl_json_runtime.cc      |   35 +-
 src/runtime/contrib/dnnl/dnnl_tensor_requisite.h   |   25 +
 src/runtime/contrib/ethosn/ethosn_device.cc        |   44 +-
 src/runtime/contrib/ethosn/ethosn_device.h         |    8 +-
 src/runtime/contrib/ethosn/ethosn_runtime.cc       |   14 +-
 src/runtime/contrib/ethosn/ethosn_runtime.h        |    4 +
 src/runtime/crt/common/crt_runtime_api.c           |   16 +-
 .../graph_executor/debug/graph_executor_debug.cc   |   55 +-
 src/runtime/opencl/opencl_common.h                 |    8 +-
 src/runtime/opencl/opencl_device_api.cc            |   33 +-
 src/runtime/profiling.cc                           |   12 +-
 src/runtime/rpc/rpc_module.cc                      |   33 +-
 src/runtime/threading_backend.cc                   |   20 +-
 src/script/printer/base_doc_printer.cc             |  261 +-
 src/script/printer/base_doc_printer.h              |   64 +-
 src/script/printer/doc.cc                          |    4 +
 src/script/printer/frame.cc                        |   50 +
 src/script/printer/python_doc_printer.cc           |   16 +-
 src/script/printer/traced_object_functor.cc        |   75 +
 src/script/printer/var_table.cc                    |  108 +
 src/support/libinfo.cc                             |    1 +
 src/target/llvm/codegen_amdgpu.cc                  |   30 +-
 src/target/llvm/codegen_arm.cc                     |    5 +-
 src/target/llvm/codegen_blob.cc                    |   24 +-
 src/target/llvm/codegen_blob.h                     |   15 +-
 src/target/llvm/codegen_cpu.cc                     |   94 +-
 src/target/llvm/codegen_cpu.h                      |   10 +-
 src/target/llvm/codegen_hexagon.cc                 |  127 +-
 src/target/llvm/codegen_llvm.cc                    |  142 +-
 src/target/llvm/codegen_llvm.h                     |   29 +-
 src/target/llvm/codegen_nvptx.cc                   |   33 +-
 src/target/llvm/codegen_x86_64.cc                  |    8 +-
 src/target/llvm/llvm_common.cc                     |  211 --
 src/target/llvm/llvm_common.h                      |   89 -
 src/target/llvm/llvm_instance.cc                   |  365 +++
 src/target/llvm/llvm_instance.h                    |  266 ++
 src/target/llvm/llvm_module.cc                     |  672 ++---
 src/target/llvm/llvm_module.h                      |    1 -
 .../doc_printer.h => src/target/parsers/cpu.cc     |   36 +-
 .../doc_printer.h => src/target/parsers/cpu.h      |   35 +-
 src/target/parsers/mprofile.cc                     |  131 +
 .../doc_printer.h => src/target/parsers/mprofile.h |   36 +-
 src/target/source/codegen_c.cc                     |   56 +-
 src/target/source/codegen_c.h                      |    1 +
 src/target/source/codegen_c_host.cc                |   14 +-
 src/target/source/codegen_cuda.cc                  |   14 +-
 src/target/source/codegen_metal.cc                 |    8 +-
 src/target/source/codegen_source_base.cc           |   28 +-
 src/target/source/codegen_source_base.h            |   11 +-
 src/target/tag.cc                                  |   23 +-
 src/target/target_kind.cc                          |    7 +-
 src/te/operation/create_primfunc.cc                |   23 +-
 src/tir/analysis/deep_equal.cc                     |   13 +-
 src/tir/contrib/ethosu/passes.cc                   |  158 +-
 src/tir/ir/expr.cc                                 |   18 +-
 src/tir/ir/function.cc                             |    8 +-
 src/tir/ir/script/script_complete.cc               |    5 +-
 .../tir/ir/script/script_complete.h                |   32 +-
 src/tir/ir/stmt.cc                                 |   23 +
 src/tir/ir/stmt_functor.cc                         |   14 +
 src/tir/op/builtin.cc                              |    8 +
 src/tir/op/op.cc                                   |    2 +
 src/tir/schedule/concrete_schedule.cc              |   15 +
 src/tir/schedule/instruction_traits.h              |   24 +
 src/tir/schedule/primitive/cache_read_write.cc     |    2 +-
 src/tir/schedule/trace.cc                          |    8 +
 src/tir/transforms/inject_virtual_thread.cc        |   28 +-
 src/tir/transforms/lower_thread_allreduce.cc       |   14 +-
 .../manifest_shared_memory_local_stage.cc          |  287 ++
 src/tir/transforms/remove_assume.cc                |   69 +
 src/tir/transforms/remove_store_undef.cc           |  179 ++
 src/tir/transforms/split_host_device.cc            |   12 +-
 src/tir/transforms/storage_rewrite.cc              |   14 +-
 tests/cpp/build_module_test.cc                     |    7 +-
 tests/cpp/c_codegen_test.cc                        |    6 +-
 tests/cpp/ir_functor_test.cc                       |    6 +-
 tests/cpp/name_supply_test.cc                      |  129 +
 tests/cpp/target/parsers/mprofile_test.cc          |  218 ++
 tests/cpp/traced_object_test.cc                    |  268 ++
 ...tvmscript_printer_traced_object_functor_test.cc |  171 ++
 tests/cpp/tvmscript_printer_var_table_test.cc      |  158 +
 tests/lint/check_file_type.py                      |    3 +-
 tests/lint/pylint.sh                               |   13 +
 tests/micro/.gitignore                             |    2 +
 tests/micro/arduino/conftest.py                    |   45 +-
 .../micro/arduino/test_arduino_error_detection.py  |    9 +-
 tests/micro/arduino/test_arduino_rpc_server.py     |   29 +-
 tests/micro/arduino/test_arduino_workflow.py       |   13 +-
 tests/micro/arduino/test_utils.py                  |    4 +-
 tests/micro/common/conftest.py                     |   31 +-
 tests/micro/common/test_autotune.py                |    2 +-
 tests/micro/zephyr/conftest.py                     |   69 +-
 tests/micro/zephyr/test_zephyr.py                  |  103 +-
 tests/micro/zephyr/test_zephyr_aot_exec.py         |   20 +-
 .../zephyr/test_zephyr_aot_exec_standalone.py      |   28 +-
 tests/micro/zephyr/test_zephyr_armv7m.py           |   16 +-
 .../python/ci/sample_prs/pr10786-ignore-jobs.json  |  130 +
 tests/python/ci/test_ci.py                         |    4 +-
 .../python/ci/{test_mergebot.py => test_tvmbot.py} |   21 +-
 tests/python/contrib/test_cmsisnn/test_conv2d.py   |    1 +
 tests/python/contrib/test_cmsisnn/test_pooling.py  |    8 +-
 .../contrib/test_cmsisnn/test_remove_reshapes.py   |  169 ++
 tests/python/contrib/test_dnnl.py                  |   39 +-
 .../contrib/test_ethosn/test_fullyconnected.py     |   95 +-
 tests/python/contrib/test_ethosn/test_networks.py  |   20 +-
 .../python/contrib/test_ethosn/test_requantize.py  |   86 +
 .../python/contrib/test_ethosn/test_topologies.py  |  110 +-
 .../test_ethosu/test_copy_compute_reordering.py    |  210 ++
 tests/python/contrib/test_ethosu/test_networks.py  |   10 +-
 .../test_hexagon/topi/test_max_pool2d_slice.py     |  389 +++
 tests/python/contrib/test_uma/test_partition.py    |   97 +
 tests/python/contrib/test_uma/test_target.py       |   85 +
 .../test_uma/test_uma_lowering_with_umalower.py    |  121 +
 tests/python/contrib/test_uma/test_uma_pipeline.py |  136 +
 tests/python/contrib/test_uma/test_uma_utils.py    |   87 +
 .../test_uma/test_uma_vanilla_accelerator.py       |   56 +
 tests/python/driver/tvmc/test_target_options.py    |    2 +-
 tests/python/frontend/caffe/test_forward.py        |   79 +-
 tests/python/frontend/caffe2/model_zoo/__init__.py |    2 +-
 .../python/frontend/caffe2/model_zoo/squeezenet.py |   10 +-
 tests/python/frontend/caffe2/test_forward.py       |   26 +-
 tests/python/frontend/coreml/model_zoo/__init__.py |    8 +-
 tests/python/frontend/coreml/test_forward.py       |  194 +-
 tests/python/frontend/darknet/test_forward.py      |   37 +-
 tests/python/frontend/keras/test_forward.py        |  743 ++---
 tests/python/frontend/oneflow/test_forward.py      |   67 +-
 .../python/frontend/oneflow/test_vision_models.py  |   10 +-
 tests/python/frontend/onnx/test_forward.py         | 1359 +++++----
 tests/python/frontend/pytorch/test_forward.py      |  546 +++-
 tests/python/frontend/tensorflow/test_forward.py   |  328 ++-
 tests/python/frontend/tflite/test_forward.py       |  384 +--
 .../test_meta_schedule_auto_tensorize.py           |    9 +-
 tests/python/relay/aot/test_crt_aot.py             |    2 +-
 tests/python/relay/aot/test_crt_aot_usmp.py        |   36 +-
 tests/python/relay/backend/test_pass_lower_te.py   |   10 +-
 .../test_pass_remove_standalone_reshapes.py        |  260 ++
 tests/python/relay/test_conv2d_nchw_texture.py     |    8 +-
 tests/python/relay/test_name_supply.py             |   72 +
 tests/python/relay/test_op_qnn_batch_matmul.py     |   64 +-
 .../test_pass_fake_quantization_to_integer.py      |    9 +-
 tests/python/relay/test_pass_partition_graph.py    |   96 +-
 tests/python/topi/python/test_topi_batch_norm.py   |    1 +
 tests/python/topi/python/test_topi_image.py        |    5 +-
 tests/python/topi/python/test_topi_prng.py         |   92 +-
 tests/python/topi/python/test_topi_upsampling.py   |   41 +
 .../unittest/test_container_structural_equal.py    |  155 +
 .../test_meta_schedule_post_order_apply.py         |   82 +-
 ...est_meta_schedule_postproc_rewrite_tensorize.py |    2 +-
 ...ta_schedule_schedule_rule_multi_level_tiling.py |   20 +-
 .../unittest/test_meta_schedule_space_cuda.py      |  164 ++
 .../unittest/test_meta_schedule_task_scheduler.py  |    1 +
 .../unittest/test_meta_schedule_tune_relay.py      |    8 +-
 .../python/unittest/test_meta_schedule_tune_tir.py |   57 +-
 .../python/unittest/test_subwarp_reduction_cuda.py |   40 +-
 tests/python/unittest/test_target_codegen_llvm.py  |   15 +-
 .../python/unittest/test_target_parser_mprofile.py |   60 +
 tests/python/unittest/test_target_target.py        |    1 -
 .../python/unittest/test_tir_op_types.py           |   36 +-
 .../python/unittest/test_tir_schedule_tensorize.py |   11 +-
 .../python/unittest/test_tir_schedule_utilities.py |    8 +-
 .../unittest/test_tir_structural_equal_hash.py     |  188 +-
 .../test_tir_transform_inject_virtual_thread.py    |   63 +-
 ...transform_manifest_shared_memory_local_stage.py |  134 +
 .../unittest/test_tir_transform_remove_assume.py}  |   47 +-
 .../unittest/test_tir_transform_remove_undef.py    |   94 +
 .../unittest/test_tir_transform_storage_rewrite.py |   24 +
 .../python/unittest/test_tvmscript_printer_doc.py  |   19 +
 .../unittest/test_tvmscript_printer_frame.py       |   53 +-
 .../unittest/test_tvmscript_printer_underlining.py |  361 +++
 .../unittest/test_tvmscript_printer_var_table.py   |   89 +
 tests/python/unittest/test_tvmscript_roundtrip.py  |   13 +
 .../unittest/test_type_annotation_checker.py       |   10 +-
 tests/scripts/ci.py                                |   19 +-
 tests/scripts/git_utils.py                         |    6 +-
 tests/scripts/github_tvmbot.py                     |  189 +-
 tests/scripts/setup-pytest-env.sh                  |   19 +-
 tests/scripts/should_run_slow_tests.py             |   24 +-
 tests/scripts/task_config_build_arm.sh             |    1 +
 ..._build_qemu.sh => task_config_build_cortexm.sh} |    2 +
 tests/scripts/task_config_build_cpu.sh             |    1 +
 tests/scripts/task_config_build_i386.sh            |    1 +
 ..._build_qemu.sh => task_config_build_minimal.sh} |   11 +-
 tests/scripts/task_cpp_unittest.sh                 |   24 +-
 tests/scripts/task_python_docs.sh                  |    2 +
 tests/scripts/task_python_integration.sh           |    8 +-
 tests/scripts/task_python_microtvm.sh              |   18 +-
 web/emcc/tvmjs_support.cc                          |   22 +-
 web/src/runtime.ts                                 |    7 +-
 406 files changed, 21022 insertions(+), 5150 deletions(-)
 copy apps/microtvm/{reference-vm/rebuild_tvm.sh => zephyr/template_project/fvp-hack/FVP_Corstone_SSE-300_Ethos-U55} (57%)
 create mode 100644 apps/microtvm/zephyr/template_project/src/host_driven/fvp/semihost.c
 copy include/tvm/script/printer/doc_printer.h => apps/microtvm/zephyr/template_project/src/host_driven/fvp/semihost.h (58%)
 copy {python/tvm/tir/tensor_intrin => apps/uma/_template}/__init__.py (81%)
 create mode 100644 apps/uma/_template/backend.py
 copy python/tvm/script/tir/__init__.py => apps/uma/_template/codegen.py (76%)
 create mode 100644 apps/uma/_template/conv2dnchw.cc
 create mode 100644 apps/uma/_template/passes.py
 copy python/tvm/script/tir/__init__.py => apps/uma/_template/patterns.py (74%)
 create mode 100644 apps/uma/_template/run.py
 copy apps/{microtvm/reference-vm/rebuild_tvm.sh => uma/_template/strategies.py} (54%)
 mode change 100755 => 100644
 create mode 100644 apps/uma/uma_cli.py
 copy python/tvm/tir/tensor_intrin/__init__.py => cmake/modules/contrib/UMA.cmake (81%)
 rename docker/{Dockerfile.ci_qemu => Dockerfile.ci_cortexm} (100%)
 copy docker/{Dockerfile.ci_arm => Dockerfile.ci_minimal} (63%)
 copy conda/build-environment.yaml => docker/install/ubuntu1804_manual_install_llvm.sh (67%)
 mode change 100644 => 100755
 delete mode 100755 docker/install/ubuntu_install_qemu.sh
 create mode 100644 gallery/tutorial/uma.py
 create mode 100644 include/tvm/ir/global_var_supply.h
 create mode 100644 include/tvm/ir/name_supply.h
 create mode 100644 include/tvm/script/printer/frame.h
 create mode 100644 include/tvm/script/printer/traced_object.h
 create mode 100644 include/tvm/script/printer/traced_object_functor.h
 create mode 100644 include/tvm/script/printer/var_table.h
 create mode 100644 python/tvm/ir/supply.py
 copy tests/micro/zephyr/conftest.py => python/tvm/micro/testing/pytest_plugin.py (53%)
 copy python/tvm/{tir/tensor_intrin => relay/backend/contrib/uma}/__init__.py (81%)
 copy python/tvm/{script/tir => relay/backend/contrib/uma/api}/__init__.py (78%)
 copy python/tvm/{tir/tensor_intrin/__init__.py => relay/backend/contrib/uma/api/_ffi_api.py} (81%)
 create mode 100644 python/tvm/relay/backend/contrib/uma/api/codegen.py
 create mode 100644 python/tvm/relay/backend/contrib/uma/api/lower.py
 create mode 100644 python/tvm/relay/backend/contrib/uma/api/partitioner.py
 create mode 100644 python/tvm/relay/backend/contrib/uma/api/utils.py
 create mode 100644 python/tvm/relay/backend/contrib/uma/backend.py
 create mode 100644 python/tvm/script/printer/frame.py
 create mode 100644 python/tvm/script/printer/var_table.py
 create mode 100644 python/tvm/topi/adreno/injective.py
 create mode 100644 python/tvm/topi/hexagon/slice_ops/max_pool2d.py
 create mode 100644 src/ir/global_var_supply.cc
 create mode 100644 src/ir/name_supply.cc
 create mode 100644 src/relay/backend/contrib/uma/relay_to_tir.cc
 create mode 100644 src/relay/backend/contrib/uma/targets.cc
 create mode 100644 src/relay/backend/contrib/uma/tir_to_runtime.cc
 create mode 100644 src/relay/transforms/remove_standalone_reshapes.cc
 create mode 100644 src/script/printer/frame.cc
 create mode 100644 src/script/printer/traced_object_functor.cc
 create mode 100644 src/script/printer/var_table.cc
 delete mode 100644 src/target/llvm/llvm_common.cc
 delete mode 100644 src/target/llvm/llvm_common.h
 create mode 100644 src/target/llvm/llvm_instance.cc
 create mode 100644 src/target/llvm/llvm_instance.h
 copy include/tvm/script/printer/doc_printer.h => src/target/parsers/cpu.cc (60%)
 copy include/tvm/script/printer/doc_printer.h => src/target/parsers/cpu.h (60%)
 create mode 100644 src/target/parsers/mprofile.cc
 copy include/tvm/script/printer/doc_printer.h => src/target/parsers/mprofile.h (60%)
 copy include/tvm/script/printer/doc_printer.h => src/tir/ir/script/script_complete.h (60%)
 create mode 100644 src/tir/transforms/manifest_shared_memory_local_stage.cc
 create mode 100644 src/tir/transforms/remove_assume.cc
 create mode 100644 src/tir/transforms/remove_store_undef.cc
 create mode 100644 tests/cpp/name_supply_test.cc
 create mode 100644 tests/cpp/target/parsers/mprofile_test.cc
 create mode 100644 tests/cpp/traced_object_test.cc
 create mode 100644 tests/cpp/tvmscript_printer_traced_object_functor_test.cc
 create mode 100644 tests/cpp/tvmscript_printer_var_table_test.cc
 create mode 100644 tests/micro/.gitignore
 create mode 100644 tests/python/ci/sample_prs/pr10786-ignore-jobs.json
 rename tests/python/ci/{test_mergebot.py => test_tvmbot.py} (90%)
 create mode 100644 tests/python/contrib/test_cmsisnn/test_remove_reshapes.py
 create mode 100644 tests/python/contrib/test_ethosn/test_requantize.py
 create mode 100644 tests/python/contrib/test_hexagon/topi/test_max_pool2d_slice.py
 create mode 100644 tests/python/contrib/test_uma/test_partition.py
 create mode 100644 tests/python/contrib/test_uma/test_target.py
 create mode 100644 tests/python/contrib/test_uma/test_uma_lowering_with_umalower.py
 create mode 100644 tests/python/contrib/test_uma/test_uma_pipeline.py
 create mode 100644 tests/python/contrib/test_uma/test_uma_utils.py
 create mode 100644 tests/python/contrib/test_uma/test_uma_vanilla_accelerator.py
 create mode 100644 tests/python/relay/backend/test_pass_remove_standalone_reshapes.py
 create mode 100644 tests/python/relay/test_name_supply.py
 create mode 100644 tests/python/unittest/test_container_structural_equal.py
 create mode 100644 tests/python/unittest/test_target_parser_mprofile.py
 copy apps/extension/Makefile => tests/python/unittest/test_tir_op_types.py (58%)
 create mode 100644 tests/python/unittest/test_tir_transform_manifest_shared_memory_local_stage.py
 copy tests/{micro/arduino/test_arduino_error_detection.py => python/unittest/test_tir_transform_remove_assume.py} (50%)
 create mode 100644 tests/python/unittest/test_tir_transform_remove_undef.py
 copy apps/rocm_rpc/Makefile => tests/python/unittest/test_tvmscript_printer_frame.py (53%)
 create mode 100644 tests/python/unittest/test_tvmscript_printer_underlining.py
 create mode 100644 tests/python/unittest/test_tvmscript_printer_var_table.py
 copy tests/scripts/{task_config_build_qemu.sh => task_config_build_cortexm.sh} (97%)
 rename tests/scripts/{task_config_build_qemu.sh => task_config_build_minimal.sh} (79%)


[tvm] 02/02: Add #12130 PR for testing.

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

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

commit e0bd10a71649a4587b8bb35b0b915121768c4e8e
Author: Leandro Nunes <le...@arm.com>
AuthorDate: Wed Aug 3 11:43:10 2022 +0100

    Add #12130 PR for testing.
    
    Change-Id: I4995377d4bb7df61cb8b92f50af01e9df623f0c4
---
 python/tvm/relay/frontend/keras.py           |  8 ++++---
 tests/python/frontend/tflite/test_forward.py | 33 +++++++++++++++++++++-------
 2 files changed, 30 insertions(+), 11 deletions(-)

diff --git a/python/tvm/relay/frontend/keras.py b/python/tvm/relay/frontend/keras.py
index 3f7a96544a..8c8a4a1ddc 100644
--- a/python/tvm/relay/frontend/keras.py
+++ b/python/tvm/relay/frontend/keras.py
@@ -635,9 +635,11 @@ def _convert_pooling(
             _op.nn.global_max_pool2d(inexpr, **global_pool_params), keras_layer, etab, data_layout
         )
     if pool_type == "GlobalAveragePooling2D":
-        return _convert_flatten(
-            _op.nn.global_avg_pool2d(inexpr, **global_pool_params), keras_layer, etab, data_layout
-        )
+        global_avg_pool2d = _op.nn.global_avg_pool2d(inexpr, **global_pool_params)
+        keep_dims = len(keras_layer.input.shape) == len(keras_layer.output.shape)
+        if keep_dims:
+            return global_avg_pool2d
+        return _convert_flatten(global_avg_pool2d, keras_layer, etab, data_layout)
     pool_h, pool_w = keras_layer.pool_size
     stride_h, stride_w = keras_layer.strides
     params = {
diff --git a/tests/python/frontend/tflite/test_forward.py b/tests/python/frontend/tflite/test_forward.py
index 9121721d8e..7267b72548 100644
--- a/tests/python/frontend/tflite/test_forward.py
+++ b/tests/python/frontend/tflite/test_forward.py
@@ -963,6 +963,10 @@ def _test_tflite2_quantized_convolution(
     input_node = subgraph.Tensors(model_input).Name().decode("utf-8")
 
     tflite_output = run_tflite_graph(tflite_model_quant, data)
+    if tf.__version__ < LooseVersion("2.9"):
+        input_node = data_in.name.replace(":0", "")
+    else:
+        input_node = "serving_default_" + data_in.name + ":0"
     tvm_output = run_tvm_graph(tflite_model_quant, data, input_node)
     tvm.testing.assert_allclose(
         np.squeeze(tvm_output[0]), np.squeeze(tflite_output[0]), rtol=1e-2, atol=1e-2
@@ -1997,10 +2001,12 @@ def _test_abs(data, quantized, int_quant_dtype=tf.int8):
         # TFLite 2.6.x upgrade support
         if tf.__version__ < LooseVersion("2.6.1"):
             in_node = ["serving_default_input_int8"]
-        else:
+        elif tf.__version__ < LooseVersion("2.9"):
             in_node = (
                 ["serving_default_input_int16"] if int_quant_dtype == tf.int16 else ["tfl.quantize"]
             )
+        else:
+            in_node = "serving_default_input"
 
         tvm_output = run_tvm_graph(tflite_model_quant, data, in_node)
         tvm.testing.assert_allclose(
@@ -2028,8 +2034,10 @@ def _test_rsqrt(data, quantized, int_quant_dtype=tf.int8):
             tf.math.rsqrt, data, int_quant_dtype=int_quant_dtype
         )
         tflite_output = run_tflite_graph(tflite_model_quant, data)
-        in_node = ["tfl.quantize"]
-
+        if tf.__version__ < LooseVersion("2.9"):
+            in_node = ["tfl.quantize"]
+        else:
+            in_node = "serving_default_input"
         tvm_output = run_tvm_graph(tflite_model_quant, data, in_node)
         tvm.testing.assert_allclose(
             np.squeeze(tvm_output[0]), np.squeeze(tflite_output[0]), rtol=1e-5, atol=1e-2
@@ -2110,7 +2118,10 @@ def _test_cos(data, quantized, int_quant_dtype=tf.int8):
             tf.math.cos, data, int_quant_dtype=int_quant_dtype
         )
         tflite_output = run_tflite_graph(tflite_model_quant, data)
-        in_node = ["tfl.quantize"]
+        if tf.__version__ < LooseVersion("2.9"):
+            in_node = ["tfl.quantize"]
+        else:
+            in_node = "serving_default_input"
         tvm_output = run_tvm_graph(tflite_model_quant, data, in_node)
         tvm.testing.assert_allclose(
             np.squeeze(tvm_output[0]), np.squeeze(tflite_output[0]), rtol=1e-5, atol=1e-2
@@ -3024,7 +3035,6 @@ def _test_quantize_dequantize(data):
     add = tf.keras.layers.Add()([data_in, relu])
     concat = tf.keras.layers.Concatenate(axis=0)([relu, add])
     keras_model = tf.keras.models.Model(inputs=data_in, outputs=concat)
-    input_name = data_in.name.split(":")[0]
 
     # To create quantized values with dynamic range of activations, needs representative dataset
     def representative_data_gen():
@@ -3034,7 +3044,11 @@ def _test_quantize_dequantize(data):
     tflite_model_quant = _quantize_keras_model(keras_model, representative_data_gen, True, True)
 
     tflite_output = run_tflite_graph(tflite_model_quant, data)
-    tvm_output = run_tvm_graph(tflite_model_quant, data, input_name)
+    if tf.__version__ < LooseVersion("2.9"):
+        in_node = data_in.name.split(":")[0]
+    else:
+        in_node = "serving_default_" + data_in.name + ":0"
+    tvm_output = run_tvm_graph(tflite_model_quant, data, in_node)
     tvm.testing.assert_allclose(
         np.squeeze(tvm_output[0]), np.squeeze(tflite_output[0]), rtol=1e-5, atol=1e-2
     )
@@ -3051,7 +3065,6 @@ def _test_quantize_dequantize_const(data):
     add = tf.keras.layers.Add()([data, relu])
     concat = tf.keras.layers.Concatenate(axis=0)([relu, add])
     keras_model = tf.keras.models.Model(inputs=data_in, outputs=concat)
-    input_name = data_in.name.split(":")[0]
 
     # To create quantized values with dynamic range of activations, needs representative dataset
     def representative_data_gen():
@@ -3061,7 +3074,11 @@ def _test_quantize_dequantize_const(data):
     tflite_model_quant = _quantize_keras_model(keras_model, representative_data_gen, True, True)
 
     tflite_output = run_tflite_graph(tflite_model_quant, data)
-    tvm_output = run_tvm_graph(tflite_model_quant, data, input_name)
+    if tf.__version__ < LooseVersion("2.9"):
+        in_node = data_in.name.split(":")[0]
+    else:
+        in_node = "serving_default_" + data_in.name + ":0"
+    tvm_output = run_tvm_graph(tflite_model_quant, data, in_node)
     tvm.testing.assert_allclose(
         np.squeeze(tvm_output[0]), np.squeeze(tflite_output[0]), rtol=1e-5, atol=1e-2
     )


[tvm] 01/02: Update TensorFlow to release 2.9

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

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

commit 4c194155d45c41a8774be1e4923113e5e600e13b
Author: Leandro Nunes <le...@arm.com>
AuthorDate: Mon May 23 11:55:08 2022 +0100

    Update TensorFlow to release 2.9
    
    Change-Id: I082bda0b84785abe75df2d6966793df022f14755
---
 cmake/modules/contrib/TFLite.cmake                 |  2 ++
 docker/Dockerfile.ci_cpu                           |  7 +++++++
 docker/Dockerfile.ci_gpu                           |  3 +++
 docker/install/ubuntu_install_cmake_source.sh      |  4 ++--
 docker/install/ubuntu_install_python_package.sh    |  2 +-
 docker/install/ubuntu_install_tensorflow.sh        |  5 ++---
 .../install/ubuntu_install_tensorflow_aarch64.sh   | 23 ++--------------------
 docker/install/ubuntu_install_tflite.sh            | 13 ++++++++++--
 tests/scripts/task_config_build_cpu.sh             |  2 +-
 9 files changed, 31 insertions(+), 30 deletions(-)

diff --git a/cmake/modules/contrib/TFLite.cmake b/cmake/modules/contrib/TFLite.cmake
index 3159710909..b8d6a0daff 100644
--- a/cmake/modules/contrib/TFLite.cmake
+++ b/cmake/modules/contrib/TFLite.cmake
@@ -38,8 +38,10 @@ if(NOT USE_TFLITE STREQUAL "OFF")
     set(USE_TFLITE ${USE_TENSORFLOW_PATH}/tensorflow/lite/tools/make/gen/*/lib)
   endif()
   find_library(TFLITE_CONTRIB_LIB libtensorflow-lite.a ${USE_TFLITE})
+  file(GLOB_RECURSE TFLITE_DEPS "${USE_TFLITE}/*.a")
 
   list(APPEND TVM_RUNTIME_LINKER_LIBS ${TFLITE_CONTRIB_LIB})
+  list(APPEND TVM_RUNTIME_LINKER_LIBS ${TFLITE_DEPS})
 
   if (NOT USE_FLATBUFFERS_PATH STREQUAL "none")
     include_directories(${USE_FLATBUFFERS_PATH}/include)
diff --git a/docker/Dockerfile.ci_cpu b/docker/Dockerfile.ci_cpu
index 013ebfb59e..02508948ac 100644
--- a/docker/Dockerfile.ci_cpu
+++ b/docker/Dockerfile.ci_cpu
@@ -40,6 +40,9 @@ RUN bash /install/ubuntu_install_python_package.sh
 COPY install/ubuntu1804_install_llvm.sh /install/ubuntu1804_install_llvm.sh
 RUN bash /install/ubuntu1804_install_llvm.sh
 
+COPY install/ubuntu_install_cmake_source.sh /install/ubuntu_install_cmake_source.sh
+RUN bash /install/ubuntu_install_cmake_source.sh
+
 COPY install/ubuntu_install_dnnl.sh /install/ubuntu_install_dnnl.sh
 RUN bash /install/ubuntu_install_dnnl.sh
 
@@ -143,3 +146,7 @@ ENV PATH /opt/sccache:$PATH
 # Libxsmm deps
 COPY install/ubuntu_install_libxsmm.sh /install
 RUN bash /install/ubuntu_install_libxsmm.sh
+
+# Hacky workaround (do not push to GitHub) to install the right Numpy version
+# just a new comment
+RUN pip install numpy --upgrade
diff --git a/docker/Dockerfile.ci_gpu b/docker/Dockerfile.ci_gpu
index f04d8515b8..6f02ab97c0 100644
--- a/docker/Dockerfile.ci_gpu
+++ b/docker/Dockerfile.ci_gpu
@@ -32,6 +32,9 @@ RUN apt-get update --fix-missing
 COPY install/ubuntu_install_core.sh /install/ubuntu_install_core.sh
 RUN bash /install/ubuntu_install_core.sh
 
+COPY install/ubuntu_install_cmake_source.sh /install/ubuntu_install_cmake_source.sh
+RUN bash /install/ubuntu_install_cmake_source.sh
+
 COPY install/ubuntu_install_googletest.sh /install/ubuntu_install_googletest.sh
 RUN bash /install/ubuntu_install_googletest.sh
 
diff --git a/docker/install/ubuntu_install_cmake_source.sh b/docker/install/ubuntu_install_cmake_source.sh
index 18335c98c4..e90ca3d8f1 100755
--- a/docker/install/ubuntu_install_cmake_source.sh
+++ b/docker/install/ubuntu_install_cmake_source.sh
@@ -20,8 +20,8 @@ set -e
 set -u
 set -o pipefail
 
-v=3.14
-version=3.14.7
+v=3.22
+version=3.22.4
 wget https://cmake.org/files/v${v}/cmake-${version}.tar.gz
 tar xvf cmake-${version}.tar.gz
 cd cmake-${version}
diff --git a/docker/install/ubuntu_install_python_package.sh b/docker/install/ubuntu_install_python_package.sh
index 3fc310c47e..9fee9d0142 100755
--- a/docker/install/ubuntu_install_python_package.sh
+++ b/docker/install/ubuntu_install_python_package.sh
@@ -28,7 +28,7 @@ pip3 install --upgrade \
     cython \
     decorator \
     mypy \
-    numpy~=1.19.5 \
+    numpy==1.21.* \
     orderedset \
     packaging \
     Pillow==9.1.0 \
diff --git a/docker/install/ubuntu_install_tensorflow.sh b/docker/install/ubuntu_install_tensorflow.sh
index 17d2b31d9b..2225b7aef3 100755
--- a/docker/install/ubuntu_install_tensorflow.sh
+++ b/docker/install/ubuntu_install_tensorflow.sh
@@ -21,6 +21,5 @@ set -u
 set -o pipefail
 
 pip3 install \
-    "h5py==3.1.0" \
-    keras==2.6 \
-    tensorflow==2.6.5
+    keras==2.9 \
+    tensorflow==2.9.1
diff --git a/docker/install/ubuntu_install_tensorflow_aarch64.sh b/docker/install/ubuntu_install_tensorflow_aarch64.sh
index 59cc5b4814..09efe5db57 100755
--- a/docker/install/ubuntu_install_tensorflow_aarch64.sh
+++ b/docker/install/ubuntu_install_tensorflow_aarch64.sh
@@ -21,27 +21,8 @@ set -euxo pipefail
 # Build dependencies
 apt-install-and-clear -y --no-install-recommends libhdf5-dev
 
-# Downloading Tensorflow and installing it manually is needed
-# just as a temporary workaround while we move to a newer
-# version (>2.7) that is hosted in the official PyPI repository.
-linaro_repo="https://snapshots.linaro.org/ldcg/python/tensorflow-manylinux/43/tensorflow-aarch64"
-tensorflow_package="tensorflow_aarch64-2.6.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl"
-tmpdir=$(mktemp -d)
-
-cleanup()
-{
-  rm -rf "$tmpdir"
-}
-
-trap cleanup 0
-
-cd "${tmpdir}"
-wget -q "${linaro_repo}/${tensorflow_package}"
-
 # We're only using the TensorFlow wheel snapshot here as the
 # h5py wheel tries to use the wrong .so file
 pip3 install \
-    ${tensorflow_package} \
-    "h5py==3.1.0" \
-    keras==2.6 \
-    "protobuf<4"
+    keras==2.9 \
+    tensorflow-aarch64==2.9.1
diff --git a/docker/install/ubuntu_install_tflite.sh b/docker/install/ubuntu_install_tflite.sh
index 8a394302fd..4b73c202bc 100755
--- a/docker/install/ubuntu_install_tflite.sh
+++ b/docker/install/ubuntu_install_tflite.sh
@@ -18,6 +18,7 @@
 
 set -e
 set -u
+set -x
 set -o pipefail
 
 # The tflite version should have matched versions to the tensorflow
@@ -38,8 +39,16 @@ pip3 install flatbuffers
 # The library is built at:
 # tensorflow/tensorflow/lite/tools/make/gen/*/lib/libtensorflow-lite.a.
 git clone https://github.com/tensorflow/tensorflow --branch=v${TENSORFLOW_VERSION} --depth 1
-./tensorflow/tensorflow/lite/tools/make/download_dependencies.sh
-./tensorflow/tensorflow/lite/tools/make/build_lib.sh
+
+mkdir -p /opt/tflite
+cd /opt/tflite
+cmake \
+  -DTFLITE_ENABLE_XNNPACK=OFF \
+  /tensorflow/tensorflow/lite
+
+cmake --build .
+cd -
+
 
 # Setup tflite from schema
 mkdir tflite
diff --git a/tests/scripts/task_config_build_cpu.sh b/tests/scripts/task_config_build_cpu.sh
index 9dc5c62efa..bc95e866e3 100755
--- a/tests/scripts/task_config_build_cpu.sh
+++ b/tests/scripts/task_config_build_cpu.sh
@@ -37,7 +37,7 @@ echo set\(CMAKE_CXX_FLAGS -Werror\) >> config.cmake
 echo set\(HIDE_PRIVATE_SYMBOLS ON\) >> config.cmake
 echo set\(USE_VTA_TSIM ON\) >> config.cmake
 echo set\(USE_VTA_FSIM ON\) >> config.cmake
-echo set\(USE_TFLITE ON\) >> config.cmake
+echo set\(USE_TFLITE \"/opt/tflite\"\) >> config.cmake
 echo set\(USE_TENSORFLOW_PATH \"/tensorflow\"\) >> config.cmake
 echo set\(USE_FLATBUFFERS_PATH \"/flatbuffers\"\) >> config.cmake
 echo set\(USE_ETHOSN /opt/arm/ethosn-driver\) >> config.cmake