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/04/11 09:51:13 UTC

[tvm] branch ci-docker-staging updated (e3b66d15e1 -> ef2137bc39)

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 e3b66d15e1 validating a new cpu image
     add c2744704be Update Docker image with tag 20220404-055909-fcdf4636d (#10889)
     add 7803fe6e79 [skip ci][ci] Fix black version (#10893)
     add 2844654d08 [Hexagon] Select qaic executable based on Ubuntu version (#10891)
     add 98580a2a0b [BYOC][TRT] Add DFPattern support for TRT backend (#10759)
     add 4b3b86c2c3 Fix submodule URLs. (#10888)
     add 7f52cc4c0e Handle uint8 in ConstantNode visitor in LowerToTECompute (#10894)
     add a6e620937b [RUNTIME] Api to get number of runtime threads (#10896)
     add ceed331606 [LLVM] Support CodeGenBlob for large >2GB models on x86 (#10882)
     add 41cfd3d92d [TIR] Fix int32 vs int64 mismatch in For construct. (#10595)
     add e9b3ea5983 [TIR] Fix check for multiple axis separators (#10845)
     add 64dd05b0c0 [microNPU] Flatten after allocates have been removed in HoistAllocates pass (#10890)
     add 5ec061f976 [QNN] Add per-channel quantization to add/subtract/multiply (#10718)
     add f096ad80cf [COMMUNITY] Mehrdad Hessar -> Committer (#10901)
     add 05caa7a186 Update rpc_module.cc (#10881)
     add 6dada8025b [Hexagon] Generalized HexagonBuffer::CopyTo/CopyFrom (#10878)
     add 138fafffdb Handle float16 in ConstantNode visitor in LowerToTECompute (#10902)
     add c91e356a5d Add python installation script for Ubuntu 20.04 (#10841)
     add 8f664f50fc [QNN] Fix qnn.dequantize scale and zp shape (#10880)
     add 3266ab1b4a [MetaSchedule] Add utility API to ease using manual schedules  (#10876)
     add 62bcecc039 Install gdb by default, sort packages (#10913)
     add b714f17f27 [COMMUNITY] new committer -- gromero (#10911)
     add bf9308a8d6 [ONNX] Add imports for Gelu, BiasGelu (#10898)
     add 96f701fd66 [ci] Don't diff Python files when checking formatting (#10895)
     add 60c766f96a [ci] Look for any tags in issues before adding new tags (#10685)
     add d7d8fdbc9c [CMSIS-NN] Aligned scale computation with TFLM to fix numerical mismatch (#10817)
     add fc736ed6dc [ETHOSN] Improved handling of 5d reshapes (#10860)
     add 591a0009c4 [Hexagon] Use single allocation to back 2-d arrays (#10903)
     add 9bd19bb9ac [docs][ci] Add CI reproducability docs (#10912)
     add 8e438683a4 [ci] Roll out teams-tagging to everyone (#10739)
     add 6cbb0f6718 [build] Update libinfo and add lint rule (#10774)
     add e09e9398e7 [ci] Add a tag to generated Jenkinsfile (#10825)
     add de4d35c229 [skip ci][ci] Remove inplace flag from black script (#10918)
     add bad24dd16a [Hexagon][LLVM][CodeGen] Make CodeGenHexagon a subclass of CodeGenCPU (#10908)
     add 5ca528c847 [skip ci][ci] Fix stale test in teams tagging (#10920)
     add 27c59109c4 [Hexagon] Refactor to keep HexagonBuffer private to the device api (#10910)
     add 534205baba [TIR] Check dynamic shared memory in VerifyGPUCode (#10923)
     add af8569c913 [CI] Updated argument parsing of optional arguments in ci.py (#10906)
     add 6b4d351e9b [TRT] Minor fixes on TRT python interface (#10917)
     add aff4e96f88 [CMSIS-NN] Re-enabled skipped tests (#10928)
     add c7c76d1940 [ci] Add sccache to remaining Docker images (#10751)
     add 00c830ece0 relax reorder primitive's  affineness check (#10887)
     add e97a3ebfc4 [microNPU] Fix bug in microNPU demo app (#10930)
     add 05bb482526 [microNPU] Set output tolerance of codegen and network tests to 0 (#10675)
     add 5f1f8f3421 [MetaSchedule][Refactor] Clarify Integration Logic (#10927)
     add c092700d27 [Hexagon] Add unit tests executing 2-d VTCM usage (#10904)
     add 46675996e5 [Hexagon] Register basic strategies and schedules for common operators (#10919)
     add 19784c8c83 [TVMScript] Fixing T.buffer with typed positional arguments other than int32 (#10892)
     add fc0473885f [TIR] VNNI and ARM dot product intrinsic for tensorization (#10925)
     add 8ca9b896f7 [QNN] Fix per-channel broadcast with invalid axes (#10936)
     add 24e2586da2 [MetaSchedule][Minor] Fix Integer Overflow in Tuning Statistics (#10935)
     add 1ae2a27842 [CI] Run frontend tests for aarch64 in CI (#10869)
     add 4c171efbc8 [CI][Docker]Update Hexagon docker image to Ubuntu 20.04 (#10932)
     add 0c17f07aa7 [ci] Remove hardcoded test shards (#10743)
     add 81d72e3d63 [CUDNN] Add cuDNN as a Relay partitioning target (BYOC) (#10871)
     add bf7a27b9bf [Hexagon] Cleanup, remove obsolete comment (#10931)
     add c5bd181c3d [FQ2I] Add abs to FQ2I (#10922)
     add 45f3d4a521 [BYOC-DNNL] enable conv3d->bn folding (#10837)
     new ef2137bc39 [CI] Bump black version to 22.3.0

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   (e3b66d15e1)
            \
             N -- N -- N   refs/heads/ci-docker-staging (ef2137bc39)

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 1 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:
 .gitmodules                                        |  10 +-
 CONTRIBUTORS.md                                    |   2 +
 Jenkinsfile                                        | 307 ++++++++++---
 apps/microtvm/ethosu/convert_image.py              |   3 +-
 apps/microtvm/ethosu/run_demo.sh                   |   4 +-
 apps/topi_recipe/gemm/android_gemm_square.py       |   2 +-
 cmake/modules/HexagonSDK.cmake                     |  57 ++-
 cmake/modules/LibInfo.cmake                        | 105 +++--
 conftest.py                                        |  75 ++++
 docker/Dockerfile.ci_hexagon                       |  33 +-
 docker/Dockerfile.ci_i386                          |  11 +
 docker/Dockerfile.ci_lint                          |   2 +-
 docker/Dockerfile.ci_wasm                          |  11 +
 ...tall_python.sh => ubuntu2004_install_python.sh} |   9 +-
 docker/install/ubuntu_install_arduino.sh           |   0
 docker/install/ubuntu_install_boost.sh             |   0
 docker/install/ubuntu_install_caffe.sh             |   0
 docker/install/ubuntu_install_cmake_source.sh      |   0
 docker/install/ubuntu_install_core.sh              |  37 +-
 docker/install/ubuntu_install_hexagon.sh           |   0
 docker/install/ubuntu_install_libxsmm.sh           |   0
 docker/install/ubuntu_install_oneflow.sh           |   0
 docker/install/ubuntu_install_paddle.sh            |   0
 docker/install/ubuntu_install_papi.sh              |   0
 docker/install/ubuntu_install_rust.sh              |  11 +-
 docker/install/ubuntu_install_sccache.sh           |   0
 docker/install/ubuntu_install_universal.sh         |   0
 docker/install/ubuntu_install_verilator.sh         |   0
 .../install/ubuntu_install_vitis_ai_packages_ci.sh |   0
 docker/install/ubuntu_install_wasmtime.sh          |   0
 docker/install/ubuntu_install_zephyr.sh            |   0
 docs/contribute/ci.rst                             |   8 +-
 docs/contribute/code_guide.rst                     |  16 +-
 docs/contribute/code_review.rst                    |  21 +-
 docs/contribute/committer_guide.rst                |   5 +
 docs/contribute/community.rst                      |   5 +-
 docs/contribute/document.rst                       |   8 +-
 docs/contribute/error_handling.rst                 |   5 +
 docs/contribute/git_howto.rst                      |   4 +
 docs/contribute/index.rst                          |   6 +-
 docs/contribute/pull_request.rst                   | 109 +++--
 docs/contribute/release_process.rst                |   8 +-
 include/tvm/meta_schedule/apply_history_best.h     |  83 ++++
 include/tvm/meta_schedule/extracted_task.h         |  68 +++
 include/tvm/meta_schedule/integration.h            | 190 --------
 include/tvm/relay/qnn/attrs.h                      |  19 +
 .../tvm/runtime/builtin_fp16.h                     |  17 +-
 include/tvm/runtime/threading_backend.h            |   6 +
 jenkins/Jenkinsfile.j2                             | 222 ++++------
 jenkins/generate.py                                |  15 +-
 jenkins/macros.j2                                  |  49 ++
 python/tvm/autotvm/task/space.py                   |   2 +-
 python/tvm/contrib/cutlass/conv2d_operation.py     |   6 +-
 python/tvm/contrib/cutlass/gemm_operation.py       |   8 +-
 python/tvm/contrib/debugger/debug_result.py        |   2 +-
 python/tvm/meta_schedule/__init__.py               |   4 +-
 python/tvm/meta_schedule/apply_history_best.py     | 100 +++++
 python/tvm/meta_schedule/cost_model/xgb_model.py   |   2 +-
 python/tvm/meta_schedule/extracted_task.py         |  66 +++
 python/tvm/meta_schedule/integration.py            | 247 -----------
 python/tvm/meta_schedule/relay_integration.py      |  91 ++++
 python/tvm/meta_schedule/testing/__init__.py       |   9 +-
 python/tvm/meta_schedule/testing/relay_workload.py |   2 +-
 .../testing/tune_relay_meta_schedule.py            |   5 +-
 python/tvm/meta_schedule/testing/utils.py          |  69 ++-
 python/tvm/meta_schedule/tune.py                   |  15 +-
 python/tvm/micro/contrib/stm32/emitter.py          |  32 +-
 python/tvm/relay/frontend/caffe.py                 |   2 +-
 python/tvm/relay/frontend/onnx.py                  |  43 ++
 python/tvm/relay/frontend/paddlepaddle.py          |   2 +-
 python/tvm/relay/frontend/pytorch.py               |   2 +-
 python/tvm/relay/op/contrib/cublas.py              |  54 +--
 python/tvm/relay/op/contrib/cudnn.py               |  89 ++++
 python/tvm/relay/op/contrib/te_target.py           |  70 +++
 python/tvm/relay/op/contrib/tensorrt.py            | 246 +++++++++--
 python/tvm/relay/op/op_attrs.py                    |   5 +
 python/tvm/relay/op/strategy/hexagon.py            |  91 +++-
 python/tvm/relay/qnn/op/canonicalizations.py       |   2 +-
 python/tvm/relay/qnn/op/qnn.py                     |  63 ++-
 python/tvm/relay/quantize/_calibrate.py            |   2 +-
 python/tvm/relay/testing/tf.py                     |   2 +-
 .../transform/fake_quantization_to_integer.py      |  16 +
 python/tvm/relay/transform/transform.py            |  18 +
 python/tvm/runtime/__init__.py                     |   2 +-
 python/tvm/runtime/module.py                       |  11 +
 python/tvm/script/tir/__init__.pyi                 |   4 +-
 python/tvm/script/tir/scope_handler.py             |  18 +-
 python/tvm/script/tir/special_stmt.py              |   9 +-
 python/tvm/script/tir/ty.py                        |   3 +
 python/tvm/support.py                              |  26 ++
 python/tvm/te/hybrid/parser.py                     |   8 +-
 python/tvm/testing/utils.py                        |   2 +-
 python/tvm/tir/ir_builder.py                       |  22 +-
 python/tvm/tir/schedule/_type_checker.py           |   1 -
 .../_ctypes => tir/tensor_intrin}/__init__.py      |   5 +-
 python/tvm/tir/tensor_intrin/arm_cpu.py            | 142 ++++++
 python/tvm/tir/tensor_intrin/x86.py                |  75 ++++
 python/tvm/topi/cuda/scan.py                       |   4 +-
 python/tvm/topi/cuda/sort.py                       |   2 +-
 python/tvm/topi/gpu/dense.py                       |   4 +-
 python/tvm/topi/hexagon/__init__.py                |   5 +
 .../{generic/extern.py => hexagon/batch_matmul.py} |  20 +-
 python/tvm/topi/hexagon/conv2d.py                  |  32 +-
 .../topi/{generic/extern.py => hexagon/dense.py}   |  20 +-
 .../{generic/extern.py => hexagon/injective.py}    |  24 +-
 .../topi/{generic/extern.py => hexagon/pooling.py} |  27 +-
 .../topi/{generic/extern.py => hexagon/reduce.py}  |  20 +-
 python/tvm/topi/random/kernel.py                   |   4 +-
 python/tvm/topi/testing/correlation_nchw_python.py |   2 +-
 .../{integration.cc => apply_history_best.cc}      |  90 ++--
 .../extracted_task.cc}                             |  47 +-
 src/meta_schedule/task_scheduler/gradient_based.cc |   6 +-
 src/meta_schedule/utils.h                          |   1 +
 .../backend/contrib/cmsisnn/generate_constants.cc  |  10 +-
 src/relay/backend/contrib/ethosn/ethosn_api.cc     |   5 +
 src/relay/backend/task_extraction.cc               |   7 +-
 src/relay/backend/te_compiler_cache.cc             |  28 +-
 src/relay/qnn/op/add.cc                            |  10 +-
 src/relay/qnn/op/dequantize.cc                     |  15 +-
 src/relay/qnn/op/mul.cc                            | 138 ++++--
 src/relay/qnn/op/op_common.h                       |  81 +++-
 src/relay/qnn/op/subtract.cc                       |  10 +-
 src/relay/qnn/utils.h                              |   4 +-
 src/relay/transforms/fold_scale_axis.cc            | 108 +++--
 src/relay/transforms/inline_composites.cc          | 119 +++++
 src/relay/transforms/pattern_utils.h               |  18 +-
 src/runtime/contrib/dnnl/dnnl_json_runtime.cc      |   7 +-
 src/runtime/hexagon/hexagon/hexagon_buffer.cc      | 151 ++++---
 src/runtime/hexagon/hexagon/hexagon_buffer.h       |  36 ++
 src/runtime/hexagon/hexagon/hexagon_common.cc      |  71 +--
 src/runtime/hexagon/hexagon/hexagon_common.h       |  14 -
 .../hexagon/hexagon/hexagon_device_api_v2.cc       |  63 ++-
 .../hexagon/hexagon/hexagon_device_api_v2.h        |  27 +-
 src/runtime/hexagon/rpc/hexagon/rpc_server.cc      |   2 +-
 src/runtime/hexagon/rpc/simulator/rpc_server.cc    |   2 +-
 src/runtime/rpc/rpc_module.cc                      |   2 +-
 src/runtime/thread_pool.cc                         |   7 +
 src/support/libinfo.cc                             | 105 +++--
 src/support/table_printer.h                        |   6 +
 src/target/llvm/codegen_blob.cc                    |  12 +
 src/target/llvm/codegen_hexagon.cc                 | 491 +--------------------
 src/te/operation/op_utils.cc                       |   2 +-
 src/tir/analysis/verify_gpu_code.cc                |   6 +-
 src/tir/contrib/ethosu/passes.cc                   |  16 +-
 src/tir/ir/buffer.cc                               |   2 +-
 src/tir/ir/stmt.cc                                 |  20 +
 src/tir/schedule/analysis.h                        |  11 +
 src/tir/schedule/analysis/analysis.cc              |  50 ++-
 src/tir/schedule/primitive/cache_read_write.cc     |   2 +-
 src/tir/schedule/primitive/loop_transformation.cc  |  21 +-
 src/tir/transforms/vectorize_loop.cc               |   3 +-
 tests/cpp/runtime/hexagon_buffer.cc                | 231 +++++++++-
 tests/lint/check_cmake_options.py                  |  80 ++++
 tests/lint/git-black.sh                            |  74 ++--
 tests/lint/python_format.sh                        |  22 -
 tests/python/ci/test_ci.py                         |  52 ++-
 .../contrib/test_arm_compute_lib/test_add.py       |   4 +
 tests/python/contrib/test_cmsisnn/test_conv2d.py   |  42 +-
 .../contrib/test_cmsisnn/test_fully_connected.py   |   1 -
 .../contrib/test_cmsisnn/test_invalid_graphs.py    |   2 -
 tests/python/contrib/test_cmsisnn/utils.py         | 132 +++++-
 tests/python/contrib/test_cudnn.py                 |  68 +++
 tests/python/contrib/test_ethosn/test_reshape.py   |  72 +--
 .../contrib/test_ethosu/cascader/conftest.py       |   6 +-
 tests/python/contrib/test_ethosu/infra.py          |  30 +-
 tests/python/contrib/test_ethosu/test_codegen.py   |  31 +-
 .../contrib/test_ethosu/test_hoist_allocates.py    |  17 +-
 tests/python/contrib/test_ethosu/test_networks.py  |  58 +--
 .../python/contrib/test_hexagon/infrastructure.py  |  34 ++
 .../test_hexagon/test_2d_physical_buffers.py       | 129 ++++--
 tests/python/contrib/test_hexagon/test_launcher.py |   8 -
 tests/python/frontend/caffe/test_forward.py        |   4 +-
 tests/python/frontend/onnx/test_forward.py         |  58 +++
 tests/python/frontend/pytorch/test_forward.py      |   2 +-
 tests/python/relay/test_op_grad_level1.py          |  12 +-
 tests/python/relay/test_op_qnn_add.py              |  24 +
 tests/python/relay/test_op_qnn_dequantize.py       |  14 +
 .../test_pass_fake_quantization_to_integer.py      | 108 ++++-
 tests/python/relay/test_pass_fold_scale_axis.py    | 178 ++++++++
 tests/python/relay/test_pass_inline_composites.py  | 165 +++++++
 tests/python/topi/python/test_topi_prng.py         |   4 +-
 tests/python/topi/python/test_topi_transform.py    |   4 +-
 .../unittest/test_arith_canonical_simplify.py      |   2 +-
 .../unittest/test_auto_scheduler_compute_dag.py    |  10 +-
 .../python/unittest/test_auto_scheduler_feature.py |   4 +-
 tests/python/unittest/test_autotvm_space.py        |   2 +-
 tests/python/unittest/test_format_si_prefix.py     |   2 +-
 .../unittest/test_meta_schedule_integration.py     |  22 +-
 .../unittest/test_meta_schedule_multi_anchor.py    |  42 +-
 .../unittest/test_meta_schedule_tune_relay.py      | 139 ++----
 .../python/unittest/test_meta_schedule_tune_tir.py | 121 -----
 .../test_runtime_module_based_interface.py         |  14 +
 .../python/unittest/test_target_codegen_c_host.py  |   2 +-
 tests/python/unittest/test_target_codegen_rocm.py  |   2 +-
 .../unittest/test_tir_analysis_verify_gpu_code.py  |   9 +-
 tests/python/unittest/test_tir_buffer.py           |   2 +-
 tests/python/unittest/test_tir_ir_builder.py       |   2 +-
 tests/python/unittest/test_tir_schedule_reorder.py |  89 ++++
 .../python/unittest/test_tir_schedule_tensorize.py |  66 ++-
 .../python/unittest/test_tir_transform_ir_utils.py |   4 +-
 .../unittest/test_tir_transform_narrow_datatype.py |  52 +--
 .../unittest/test_tir_transform_vectorize.py       |  12 +-
 .../unittest/test_tir_usmp_algo_hill_climb.py      |  11 +-
 tests/python/unittest/test_transform_layout.py     |   6 +
 .../python/unittest/test_tvmscript_syntax_sugar.py |  37 ++
 tests/scripts/ci.py                                |  35 +-
 tests/scripts/git_skip_ci_globs.py                 |   1 -
 tests/scripts/github_tag_teams.py                  |  26 +-
 tests/scripts/task_lint.sh                         |   5 +-
 tests/scripts/task_mypy.sh                         |   4 +-
 tests/scripts/task_python_frontend.sh              |  64 +--
 tests/scripts/task_python_unittest.sh              |   1 +
 .../python/integration/test_benchmark_gemm.py      |  18 +-
 .../integration/test_benchmark_topi_conv2d.py      |   2 +-
 .../test_benchmark_topi_conv2d_transpose.py        |   2 +-
 .../integration/test_benchmark_topi_dense.py       |   2 +-
 .../test_benchmark_topi_group_conv2d.py            |   2 +-
 217 files changed, 5143 insertions(+), 2565 deletions(-)
 copy docker/install/{ubuntu1804_install_python.sh => ubuntu2004_install_python.sh} (87%)
 mode change 100644 => 100755 docker/install/ubuntu_install_arduino.sh
 mode change 100644 => 100755 docker/install/ubuntu_install_boost.sh
 mode change 100644 => 100755 docker/install/ubuntu_install_caffe.sh
 mode change 100644 => 100755 docker/install/ubuntu_install_cmake_source.sh
 mode change 100644 => 100755 docker/install/ubuntu_install_hexagon.sh
 mode change 100644 => 100755 docker/install/ubuntu_install_libxsmm.sh
 mode change 100644 => 100755 docker/install/ubuntu_install_oneflow.sh
 mode change 100644 => 100755 docker/install/ubuntu_install_paddle.sh
 mode change 100644 => 100755 docker/install/ubuntu_install_papi.sh
 mode change 100644 => 100755 docker/install/ubuntu_install_sccache.sh
 mode change 100644 => 100755 docker/install/ubuntu_install_universal.sh
 mode change 100644 => 100755 docker/install/ubuntu_install_verilator.sh
 mode change 100644 => 100755 docker/install/ubuntu_install_vitis_ai_packages_ci.sh
 mode change 100644 => 100755 docker/install/ubuntu_install_wasmtime.sh
 mode change 100644 => 100755 docker/install/ubuntu_install_zephyr.sh
 create mode 100644 include/tvm/meta_schedule/apply_history_best.h
 create mode 100644 include/tvm/meta_schedule/extracted_task.h
 delete mode 100644 include/tvm/meta_schedule/integration.h
 copy src/contrib/rust_extension.cc => include/tvm/runtime/builtin_fp16.h (71%)
 create mode 100644 python/tvm/meta_schedule/apply_history_best.py
 create mode 100644 python/tvm/meta_schedule/extracted_task.py
 delete mode 100644 python/tvm/meta_schedule/integration.py
 create mode 100644 python/tvm/meta_schedule/relay_integration.py
 create mode 100644 python/tvm/relay/op/contrib/cudnn.py
 create mode 100644 python/tvm/relay/op/contrib/te_target.py
 copy python/tvm/{_ffi/_ctypes => tir/tensor_intrin}/__init__.py (87%)
 create mode 100644 python/tvm/tir/tensor_intrin/arm_cpu.py
 create mode 100644 python/tvm/tir/tensor_intrin/x86.py
 copy python/tvm/topi/{generic/extern.py => hexagon/batch_matmul.py} (69%)
 copy python/tvm/topi/{generic/extern.py => hexagon/dense.py} (70%)
 copy python/tvm/topi/{generic/extern.py => hexagon/injective.py} (67%)
 copy python/tvm/topi/{generic/extern.py => hexagon/pooling.py} (63%)
 copy python/tvm/topi/{generic/extern.py => hexagon/reduce.py} (70%)
 rename src/meta_schedule/{integration.cc => apply_history_best.cc} (58%)
 copy src/{relay/op/annotation/annotation.h => meta_schedule/extracted_task.cc} (55%)
 create mode 100644 src/relay/transforms/inline_composites.cc
 create mode 100644 tests/lint/check_cmake_options.py
 delete mode 100755 tests/lint/python_format.sh
 create mode 100644 tests/python/relay/test_pass_inline_composites.py
 mode change 100644 => 100755 tests/scripts/ci.py


[tvm] 01/01: [CI] Bump black version to 22.3.0

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 ef2137bc39fbacfcc0e9dcbd4dc9bcc7e3eeb392
Author: Leandro Nunes <le...@arm.com>
AuthorDate: Mon Apr 11 10:46:17 2022 +0100

    [CI] Bump black version to 22.3.0
    
    * Make all required adjusts in the code to comply with the new version
    * Upadte ci-lint to v0.71, based on tlcpackstaging/ci_lint:20220411-060305-45f3d4a52
---
 Jenkinsfile                                        |  4 +-
 apps/topi_recipe/gemm/android_gemm_square.py       |  2 +-
 jenkins/Jenkinsfile.j2                             |  2 +-
 python/tvm/autotvm/task/space.py                   |  2 +-
 python/tvm/contrib/debugger/debug_result.py        |  2 +-
 python/tvm/relay/frontend/paddlepaddle.py          |  2 +-
 python/tvm/relay/frontend/pytorch.py               |  2 +-
 python/tvm/relay/qnn/op/canonicalizations.py       |  2 +-
 python/tvm/relay/quantize/_calibrate.py            |  2 +-
 python/tvm/relay/testing/tf.py                     |  2 +-
 python/tvm/testing/utils.py                        |  2 +-
 python/tvm/tir/schedule/_type_checker.py           |  1 -
 python/tvm/topi/gpu/dense.py                       |  4 +-
 python/tvm/topi/random/kernel.py                   |  4 +-
 python/tvm/topi/testing/correlation_nchw_python.py |  2 +-
 tests/python/contrib/test_cmsisnn/utils.py         |  2 +-
 .../contrib/test_ethosu/cascader/conftest.py       |  6 +--
 tests/python/frontend/pytorch/test_forward.py      |  2 +-
 tests/python/relay/test_op_grad_level1.py          | 12 ++---
 tests/python/topi/python/test_topi_prng.py         |  4 +-
 tests/python/topi/python/test_topi_transform.py    |  4 +-
 .../unittest/test_arith_canonical_simplify.py      |  2 +-
 .../unittest/test_auto_scheduler_compute_dag.py    | 10 ++---
 .../python/unittest/test_auto_scheduler_feature.py |  4 +-
 tests/python/unittest/test_autotvm_space.py        |  2 +-
 tests/python/unittest/test_format_si_prefix.py     |  2 +-
 .../python/unittest/test_target_codegen_c_host.py  |  2 +-
 tests/python/unittest/test_target_codegen_rocm.py  |  2 +-
 .../unittest/test_tir_transform_narrow_datatype.py | 52 +++++++++++-----------
 .../unittest/test_tir_transform_vectorize.py       |  2 +-
 .../unittest/test_tir_usmp_algo_hill_climb.py      | 11 ++---
 .../python/integration/test_benchmark_gemm.py      | 18 ++++----
 .../integration/test_benchmark_topi_conv2d.py      |  2 +-
 .../test_benchmark_topi_conv2d_transpose.py        |  2 +-
 .../integration/test_benchmark_topi_dense.py       |  2 +-
 .../test_benchmark_topi_group_conv2d.py            |  2 +-
 36 files changed, 88 insertions(+), 92 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index b0e263c513..7e21dc08eb 100755
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -45,11 +45,11 @@
 // 'python3 jenkins/generate.py'
 // Note: This timestamp is here to ensure that updates to the Jenkinsfile are
 // always rebased on main before merging:
-// Generated at 2022-04-07T13:50:22.427152
+// Generated at 2022-04-11T10:45:26.226802
 
 import org.jenkinsci.plugins.pipeline.modeldefinition.Utils
 // NOTE: these lines are scanned by docker/dev_common.sh. Please update the regex as needed. -->
-ci_lint = 'tlcpack/ci-lint:v0.69'
+ci_lint = 'tlcpack/ci-lint:v0.71'
 ci_gpu = 'tlcpack/ci-gpu:v0.84'
 ci_cpu = 'tlcpack/ci-cpu:v0.83'
 ci_wasm = 'tlcpack/ci-wasm:v0.73'
diff --git a/apps/topi_recipe/gemm/android_gemm_square.py b/apps/topi_recipe/gemm/android_gemm_square.py
index 2d50dd7e8d..5f13d88707 100644
--- a/apps/topi_recipe/gemm/android_gemm_square.py
+++ b/apps/topi_recipe/gemm/android_gemm_square.py
@@ -34,7 +34,7 @@ target = "llvm -mtriple=%s-linux-android" % arch
 
 
 def ngflops(N):
-    return 2.0 * float(N * N * N) / (10 ** 9)
+    return 2.0 * float(N * N * N) / (10**9)
 
 
 dtype = "float32"
diff --git a/jenkins/Jenkinsfile.j2 b/jenkins/Jenkinsfile.j2
index 1a61d140c3..6b306e99e7 100644
--- a/jenkins/Jenkinsfile.j2
+++ b/jenkins/Jenkinsfile.j2
@@ -51,7 +51,7 @@ import org.jenkinsci.plugins.pipeline.modeldefinition.Utils
 {% import 'jenkins/macros.j2' as m with context -%}
 
 // NOTE: these lines are scanned by docker/dev_common.sh. Please update the regex as needed. -->
-ci_lint = 'tlcpack/ci-lint:v0.69'
+ci_lint = 'tlcpack/ci-lint:v0.71'
 ci_gpu = 'tlcpack/ci-gpu:v0.84'
 ci_cpu = 'tlcpack/ci-cpu:v0.83'
 ci_wasm = 'tlcpack/ci-wasm:v0.73'
diff --git a/python/tvm/autotvm/task/space.py b/python/tvm/autotvm/task/space.py
index 8a707b8721..4d6b23162a 100644
--- a/python/tvm/autotvm/task/space.py
+++ b/python/tvm/autotvm/task/space.py
@@ -187,7 +187,7 @@ def get_pow2s(n):
     factors: list
         List of all power-of-two numbers
     """
-    return [2 ** x for x in range(math.floor(math.log2(n)) + 1)]
+    return [2**x for x in range(math.floor(math.log2(n)) + 1)]
 
 
 class SplitSpace(TransformSpace):
diff --git a/python/tvm/contrib/debugger/debug_result.py b/python/tvm/contrib/debugger/debug_result.py
index e53aa298a0..8185391e35 100644
--- a/python/tvm/contrib/debugger/debug_result.py
+++ b/python/tvm/contrib/debugger/debug_result.py
@@ -154,7 +154,7 @@ class DebugResult(object):
         """Dump the trace to the Chrome trace.json format."""
 
         def s_to_us(t):
-            return t * 10 ** 6
+            return t * 10**6
 
         starting_times = np.zeros(len(self._time_list) + 1)
         starting_times[1:] = np.cumsum([times[0] for times in self._time_list])
diff --git a/python/tvm/relay/frontend/paddlepaddle.py b/python/tvm/relay/frontend/paddlepaddle.py
index 1084826911..d85f98a847 100644
--- a/python/tvm/relay/frontend/paddlepaddle.py
+++ b/python/tvm/relay/frontend/paddlepaddle.py
@@ -658,7 +658,7 @@ def convert_gelu(g, op, block):
     x = g.get_node(op.input("X")[0])
     out = x * (
         _expr.const(0.5, dtype="float32")
-        + _op.erf(x * _expr.const(0.5 ** 0.5, dtype="float32")) * _expr.const(0.5, dtype="float32")
+        + _op.erf(x * _expr.const(0.5**0.5, dtype="float32")) * _expr.const(0.5, dtype="float32")
     )
     g.add_node(op.output("Out")[0], out)
 
diff --git a/python/tvm/relay/frontend/pytorch.py b/python/tvm/relay/frontend/pytorch.py
index 361b4f86c0..9984a4454a 100644
--- a/python/tvm/relay/frontend/pytorch.py
+++ b/python/tvm/relay/frontend/pytorch.py
@@ -827,7 +827,7 @@ class PyTorchOpConverter:
         # with tanh and third order polynomials, but this is "true" gelu
         return data * (
             _expr.const(0.5, dtype=dtype)
-            + _op.erf(data * _expr.const(0.5 ** 0.5, dtype=dtype)) * _expr.const(0.5, dtype=dtype)
+            + _op.erf(data * _expr.const(0.5**0.5, dtype=dtype)) * _expr.const(0.5, dtype=dtype)
         )
 
     def selu(self, inputs, input_types):
diff --git a/python/tvm/relay/qnn/op/canonicalizations.py b/python/tvm/relay/qnn/op/canonicalizations.py
index 95e0cb6036..1f2c57c6da 100644
--- a/python/tvm/relay/qnn/op/canonicalizations.py
+++ b/python/tvm/relay/qnn/op/canonicalizations.py
@@ -75,7 +75,7 @@ def create_integer_lookup_table(
     # inputs_quantized = np.array(range(dtype_info.min, dtype_info.max + 1)).astype(in_dtype)
 
     # First generate a list of all num_bit integer patterns
-    inputs_quantized = np.array(range(0, 2 ** num_bits), dtype=f"uint{num_bits}")
+    inputs_quantized = np.array(range(0, 2**num_bits), dtype=f"uint{num_bits}")
 
     # Reinterpret bits as the real datatype
     # Note what we are doing here is a bit tricky, the canonical view of our lookup table
diff --git a/python/tvm/relay/quantize/_calibrate.py b/python/tvm/relay/quantize/_calibrate.py
index ae3a846c11..4b2d55ebe8 100644
--- a/python/tvm/relay/quantize/_calibrate.py
+++ b/python/tvm/relay/quantize/_calibrate.py
@@ -159,7 +159,7 @@ def _set_params(mod, input_scale_func, weight_scale_func):
             def _make_const(val):
                 return _expr.const(val, "float32")
 
-            valid_range = 2 ** valid_bit
+            valid_range = 2**valid_bit
             const_params[ndom_scale] = _make_const(scale / valid_range)
             const_params[nclip_min] = _make_const(-(valid_range - 1))
             const_params[nclip_max] = _make_const((valid_range - 1))
diff --git a/python/tvm/relay/testing/tf.py b/python/tvm/relay/testing/tf.py
index b711208597..e09111a205 100644
--- a/python/tvm/relay/testing/tf.py
+++ b/python/tvm/relay/testing/tf.py
@@ -321,7 +321,7 @@ def pick_from_weight(weight, pows=1.0):
     """Identify token from Softmax output.
     This token will be mapped to word in the vocabulary.
     """
-    weight = weight ** pows
+    weight = weight**pows
     t = np.cumsum(weight)
     s = np.sum(weight)
     return int(np.searchsorted(t, 0.5 * s))
diff --git a/python/tvm/testing/utils.py b/python/tvm/testing/utils.py
index 3043dabbed..eeb9c35b4a 100644
--- a/python/tvm/testing/utils.py
+++ b/python/tvm/testing/utils.py
@@ -218,7 +218,7 @@ def check_numerical_grads(
         wrong_percentage = int(100 * len(wrong_positions) / np.prod(grad.shape))
 
         dist = np.sqrt(np.sum((ngrad - grad) ** 2))
-        grad_norm = np.sqrt(np.sum(ngrad ** 2))
+        grad_norm = np.sqrt(np.sum(ngrad**2))
 
         if not (np.isfinite(dist) and np.isfinite(grad_norm)):
             raise ValueError(
diff --git a/python/tvm/tir/schedule/_type_checker.py b/python/tvm/tir/schedule/_type_checker.py
index c815282b74..1b86c4aa30 100644
--- a/python/tvm/tir/schedule/_type_checker.py
+++ b/python/tvm/tir/schedule/_type_checker.py
@@ -57,7 +57,6 @@ if hasattr(typing, "_GenericAlias"):
                     return list(subtypes)
             return None
 
-
 elif hasattr(typing, "_Union"):
 
     class _Subtype:  # type: ignore
diff --git a/python/tvm/topi/gpu/dense.py b/python/tvm/topi/gpu/dense.py
index 4dce6eec90..5f2f36c46b 100644
--- a/python/tvm/topi/gpu/dense.py
+++ b/python/tvm/topi/gpu/dense.py
@@ -153,8 +153,8 @@ def _schedule_dense_large_batch(cfg, s, C):
     # create tuning space
     try:
         block_cand = [64, 128]
-        vthread_cand = [2 ** x for x in range(1, 7)]
-        n_thread_cand = [2 ** x for x in range(3, 7)]
+        vthread_cand = [2**x for x in range(1, 7)]
+        n_thread_cand = [2**x for x in range(3, 7)]
         cfg.define_split(
             "tile_x",
             batch,
diff --git a/python/tvm/topi/random/kernel.py b/python/tvm/topi/random/kernel.py
index 64afcf066c..11c2480d3d 100644
--- a/python/tvm/topi/random/kernel.py
+++ b/python/tvm/topi/random/kernel.py
@@ -233,7 +233,7 @@ def threefry_generate(gen, out_shape):
     for s in out_shape:
         out_len *= s
     assert (
-        out_len.value <= 2 ** 64 - 1
+        out_len.value <= 2**64 - 1
     ), f"Can only generate up to 2^64 random numbers, but {out_len} were requested."
 
     def gen_ir(gen_ptr, out_gen_ptr, out_array_ptr):
@@ -264,7 +264,7 @@ def threefry_generate(gen, out_shape):
 
         # Max value for counter should be 2**64-2 because we need to reserve a special value to
         # indicate the counter is used up.
-        with irb.if_scope(gen[7] < tir.const(2 ** 64 - 1, dtype=gen.dtype) - out_len):
+        with irb.if_scope(gen[7] < tir.const(2**64 - 1, dtype=gen.dtype) - out_len):
             for i in range(10):
                 tmp[i] = gen[i]
         with irb.else_scope():
diff --git a/python/tvm/topi/testing/correlation_nchw_python.py b/python/tvm/topi/testing/correlation_nchw_python.py
index ac12e81bc6..bab5f2dc52 100644
--- a/python/tvm/topi/testing/correlation_nchw_python.py
+++ b/python/tvm/topi/testing/correlation_nchw_python.py
@@ -103,5 +103,5 @@ def correlation_nchw_python(
                                     pad_data2[nbatch, channel, y2 + h, x2 + w],
                                 )
 
-    out /= float(kernel_size ** 2 * data1.shape[1])
+    out /= float(kernel_size**2 * data1.shape[1])
     return out
diff --git a/tests/python/contrib/test_cmsisnn/utils.py b/tests/python/contrib/test_cmsisnn/utils.py
index 18e3d4e53f..6bd375db1f 100644
--- a/tests/python/contrib/test_cmsisnn/utils.py
+++ b/tests/python/contrib/test_cmsisnn/utils.py
@@ -290,7 +290,7 @@ def generate_ref_data_tflite(model):
 
 
 def create_conv2d_tflite_model(ifm_shape, kernel_shape, strides, dilation, padding, activation):
-    """ This method prepares TFlite graph with a single Conv2d layer """
+    """This method prepares TFlite graph with a single Conv2d layer"""
     import tensorflow as tf
 
     class Model(tf.Module):
diff --git a/tests/python/contrib/test_ethosu/cascader/conftest.py b/tests/python/contrib/test_ethosu/cascader/conftest.py
index 1d55067929..74063ba343 100644
--- a/tests/python/contrib/test_ethosu/cascader/conftest.py
+++ b/tests/python/contrib/test_ethosu/cascader/conftest.py
@@ -29,7 +29,7 @@ import tvm.contrib.ethosu.cascader as cs
 def FLASH():
     return cs.MemoryRegion(
         name="FLASH",
-        size=10 ** 7,
+        size=10**7,
         read_bandwidth=4,
         write_bandwidth=4,
         read_latency=0,
@@ -42,7 +42,7 @@ def FLASH():
 def DRAM():
     return cs.MemoryRegion(
         name="DRAM",
-        size=10 ** 9,
+        size=10**9,
         read_bandwidth=8,
         write_bandwidth=8,
         read_latency=0,
@@ -55,7 +55,7 @@ def DRAM():
 def SRAM():
     return cs.MemoryRegion(
         name="SRAM",
-        size=10 ** 6,
+        size=10**6,
         read_bandwidth=16,
         write_bandwidth=16,
         read_latency=0,
diff --git a/tests/python/frontend/pytorch/test_forward.py b/tests/python/frontend/pytorch/test_forward.py
index 285d857ca6..c3fca80838 100644
--- a/tests/python/frontend/pytorch/test_forward.py
+++ b/tests/python/frontend/pytorch/test_forward.py
@@ -2193,7 +2193,7 @@ def test_vgg11_bn():
 def test_custom_conversion_map():
     def get_roi_align():
         pool_size = 5
-        n_channels = 2 * (pool_size ** 2)
+        n_channels = 2 * (pool_size**2)
         x = torch.rand(2, n_channels, 10, 10)
         rois = torch.tensor(
             [
diff --git a/tests/python/relay/test_op_grad_level1.py b/tests/python/relay/test_op_grad_level1.py
index bab709f2b8..a31191a42c 100644
--- a/tests/python/relay/test_op_grad_level1.py
+++ b/tests/python/relay/test_op_grad_level1.py
@@ -56,11 +56,11 @@ class TestUnaryOp:
         "log10": (tvm.relay.log10, lambda x, g: g * (1 / (np.log(10) * x))),
         "cosh": (tvm.relay.cosh, lambda x, g: g * (np.sinh(x))),
         "sinh": (tvm.relay.sinh, lambda x, g: g * (np.cosh(x))),
-        "asin": (tvm.relay.asin, lambda x, g: g * (1.0 / (1.0 - x ** 2) ** (1.0 / 2.0))),
-        "acos": (tvm.relay.acos, lambda x, g: g * (-1.0 / (1.0 - x ** 2.0) ** (1.0 / 2.0))),
-        "acosh": (tvm.relay.acosh, lambda x, g: g * (1.0 / (x ** 2 - 1.0) ** (1.0 / 2.0))),
-        "asinh": (tvm.relay.asinh, lambda x, g: g * (1.0 / (x ** 2 + 1.0) ** (1.0 / 2.0))),
-        "atanh": (tvm.relay.atanh, lambda x, g: g * (-1.0 / (x ** 2 - 1.0))),
+        "asin": (tvm.relay.asin, lambda x, g: g * (1.0 / (1.0 - x**2) ** (1.0 / 2.0))),
+        "acos": (tvm.relay.acos, lambda x, g: g * (-1.0 / (1.0 - x**2.0) ** (1.0 / 2.0))),
+        "acosh": (tvm.relay.acosh, lambda x, g: g * (1.0 / (x**2 - 1.0) ** (1.0 / 2.0))),
+        "asinh": (tvm.relay.asinh, lambda x, g: g * (1.0 / (x**2 + 1.0) ** (1.0 / 2.0))),
+        "atanh": (tvm.relay.atanh, lambda x, g: g * (-1.0 / (x**2 - 1.0))),
     }
 
     relay_op, ref_func = tvm.testing.parameters(*config.values(), ids=config.keys())
@@ -136,7 +136,7 @@ class TestBinaryOp:
         "add": (relay.add, lambda x, y: [np.ones_like(x), np.ones_like(y)]),
         "subtract": (relay.subtract, lambda x, y: [np.ones_like(x), -np.ones_like(y)]),
         "multiply": (relay.multiply, lambda x, y: [y, x]),
-        "divide": (relay.divide, lambda x, y: [1 / y, -x / (y ** 2)]),
+        "divide": (relay.divide, lambda x, y: [1 / y, -x / (y**2)]),
     }
 
     relay_op, ref_func = tvm.testing.parameters(*config.values(), ids=config.keys())
diff --git a/tests/python/topi/python/test_topi_prng.py b/tests/python/topi/python/test_topi_prng.py
index 60ef7b3b23..d431679444 100644
--- a/tests/python/topi/python/test_topi_prng.py
+++ b/tests/python/topi/python/test_topi_prng.py
@@ -120,14 +120,14 @@ def test_threefry_generate(target, dev):
 
     # test enough generates to go over generate limit
     gen = np.array(
-        [0, 0, 0, 0, 0, 0, 0, 2 ** 64 - 2, 1 << 63, 0], dtype="uint64"
+        [0, 0, 0, 0, 0, 0, 0, 2**64 - 2, 1 << 63, 0], dtype="uint64"
     )  # make counter large
     a, rands = threefry_generate(target, dev, gen, (2048,))
     assert gen[4] != a[4], "Overflow of counter should trigger path change"
     assert a[7] == 2048, "Overflow of counter should still update counter"
 
     # check generate with path at length limit
-    gen = np.array([0, 0, 0, 0, 0, 0, 0, 2 ** 64 - 2, 0, 0], dtype="uint64")  # make counter large
+    gen = np.array([0, 0, 0, 0, 0, 0, 0, 2**64 - 2, 0, 0], dtype="uint64")  # make counter large
     a, rands = threefry_generate(target, dev, gen, (2048,))
     assert (
         gen[0:4] != a[0:4]
diff --git a/tests/python/topi/python/test_topi_transform.py b/tests/python/topi/python/test_topi_transform.py
index 730d22cba1..180f267650 100644
--- a/tests/python/topi/python/test_topi_transform.py
+++ b/tests/python/topi/python/test_topi_transform.py
@@ -861,10 +861,10 @@ def test_reinterpret():
         (1000,), "int16", "uint16", lambda shape: np.random.randint(-1000, 1000, size=shape)
     )
     verify_reinterpret(
-        (1000,), "uint32", "int32", lambda shape: np.random.randint(0, 2 ** 32 - 1, size=shape)
+        (1000,), "uint32", "int32", lambda shape: np.random.randint(0, 2**32 - 1, size=shape)
     )
     verify_reinterpret(
-        (1000,), "uint32", "int32", lambda shape: np.random.randint(0, 2 ** 32 - 1, size=shape)
+        (1000,), "uint32", "int32", lambda shape: np.random.randint(0, 2**32 - 1, size=shape)
     )
 
 
diff --git a/tests/python/unittest/test_arith_canonical_simplify.py b/tests/python/unittest/test_arith_canonical_simplify.py
index 6dc91d7804..74c8bcb5fd 100644
--- a/tests/python/unittest/test_arith_canonical_simplify.py
+++ b/tests/python/unittest/test_arith_canonical_simplify.py
@@ -331,7 +331,7 @@ def test_simplify_cast():
     # cast(i32, i + j - 100)
     i = te.var("i", dtype="int64")
     j = te.var("j", dtype="int64")
-    ck.analyzer.update(i, tvm.arith.ConstIntBound(0, 2 ** 31 - 1))
+    ck.analyzer.update(i, tvm.arith.ConstIntBound(0, 2**31 - 1))
     ck.analyzer.update(j, tvm.arith.ConstIntBound(0, 10))
     res = tcast("int32", i + j - 100)
     ck.verify(res, res)
diff --git a/tests/python/unittest/test_auto_scheduler_compute_dag.py b/tests/python/unittest/test_auto_scheduler_compute_dag.py
index 81ee5cabbf..d3b618d675 100644
--- a/tests/python/unittest/test_auto_scheduler_compute_dag.py
+++ b/tests/python/unittest/test_auto_scheduler_compute_dag.py
@@ -47,25 +47,25 @@ def test_estimate_flop():
     N = 512
     A, B, C = matmul_auto_scheduler_test(N, N, N)
     dag = auto_scheduler.ComputeDAG([A, B, C])
-    assert abs(dag.flop_ct - 2 * N ** 3) < 0.5
+    assert abs(dag.flop_ct - 2 * N**3) < 0.5
 
     D = topi.nn.relu(C)
     dag = auto_scheduler.ComputeDAG([A, B, D])
-    assert abs(dag.flop_ct - (2 * N ** 3 + N * N)) < 0.5
+    assert abs(dag.flop_ct - (2 * N**3 + N * N)) < 0.5
 
     # should not count the comparison operations in padding
     E = topi.nn.pad(C, [1, 1])
     dag = auto_scheduler.ComputeDAG([A, B, E])
-    assert abs(dag.flop_ct - 2 * N ** 3) < 0.5
+    assert abs(dag.flop_ct - 2 * N**3) < 0.5
 
     F = te.compute((N, N), lambda i, j: E[i, j], name="F", attrs={"FLOP": 1234})
     dag = auto_scheduler.ComputeDAG([A, B, F])
-    assert abs(dag.flop_ct - (2 * N ** 3 + 1234)) < 0.5
+    assert abs(dag.flop_ct - (2 * N**3 + 1234)) < 0.5
 
     A = te.placeholder((N, N), dtype="float32", name="A")
     F = te.compute((N, N), lambda i, j: te.if_then_else(A[i, j] > 0, A[i, j], 0))
     dag = auto_scheduler.ComputeDAG([A, F])
-    assert abs(dag.flop_ct - N ** 2) < 0.5
+    assert abs(dag.flop_ct - N**2) < 0.5
 
 
 def test_stage_order():
diff --git a/tests/python/unittest/test_auto_scheduler_feature.py b/tests/python/unittest/test_auto_scheduler_feature.py
index e11496e8ca..084f23db51 100644
--- a/tests/python/unittest/test_auto_scheduler_feature.py
+++ b/tests/python/unittest/test_auto_scheduler_feature.py
@@ -78,8 +78,8 @@ def test_cpu_matmul():
     """
 
     # check touched memory in bytes, touched unique memory in bytes, reuse distance, etc.
-    assert fequal(fea_dict[c_name + ".bytes"], math.log2(512 ** 3 * 4 + 1))
-    assert fequal(fea_dict[b_name + ".unique_bytes"], math.log2(512 ** 2 * 4 + 1))
+    assert fequal(fea_dict[c_name + ".bytes"], math.log2(512**3 * 4 + 1))
+    assert fequal(fea_dict[b_name + ".unique_bytes"], math.log2(512**2 * 4 + 1))
     assert fequal(fea_dict[c_name + ".reuse_dis_iter"], math.log2(8 * 16 + 1))
     assert fequal(fea_dict[c_name + ".reuse_dis_bytes"], math.log2((8 * 16 + 8 + 16) * 4 + 1))
     assert fequal(fea_dict[c_name + ".reuse_ct"], math.log2(512 + 1))
diff --git a/tests/python/unittest/test_autotvm_space.py b/tests/python/unittest/test_autotvm_space.py
index d56ca9e072..d9f2b528e4 100644
--- a/tests/python/unittest/test_autotvm_space.py
+++ b/tests/python/unittest/test_autotvm_space.py
@@ -76,7 +76,7 @@ def test_split():
     # test overflow
     n = 25
     cfg = ConfigSpace()
-    cfg.define_split("x", cfg.axis(2 ** n), policy="factors", num_outputs=4)
+    cfg.define_split("x", cfg.axis(2**n), policy="factors", num_outputs=4)
     # count4(25) is 3276.
     assert len(cfg.space_map["x"]) == count4(n)
 
diff --git a/tests/python/unittest/test_format_si_prefix.py b/tests/python/unittest/test_format_si_prefix.py
index 4df5c2b8cd..e0276ce022 100644
--- a/tests/python/unittest/test_format_si_prefix.py
+++ b/tests/python/unittest/test_format_si_prefix.py
@@ -30,7 +30,7 @@ def test_format_si_prefix():
     for i, prefix in enumerate(SI_PREFIXES):
         integer, decimal = random.randint(0, 1000), random.randint(0, 1000)
         exp = -24 + 3 * i  # 0th prefix (yocto) is 10^-24
-        number = integer * (10 ** exp) + decimal * (10 ** (exp - 3))
+        number = integer * (10**exp) + decimal * (10 ** (exp - 3))
         expected = integer + decimal / 1000
         assert isclose(utils.format_si_prefix(number, prefix), expected)
 
diff --git a/tests/python/unittest/test_target_codegen_c_host.py b/tests/python/unittest/test_target_codegen_c_host.py
index 95cd967dd2..fc7d62b393 100644
--- a/tests/python/unittest/test_target_codegen_c_host.py
+++ b/tests/python/unittest/test_target_codegen_c_host.py
@@ -111,7 +111,7 @@ def test_reinterpret():
         fadd = m["test_reinterpret"]
         dev = tvm.cpu(0)
         n = nn
-        a = tvm.nd.array(np.random.randint(-(2 ** 30), 2 ** 30, size=n).astype(A.dtype), dev)
+        a = tvm.nd.array(np.random.randint(-(2**30), 2**30, size=n).astype(A.dtype), dev)
         b = tvm.nd.array(np.zeros(n, dtype=B.dtype), dev)
         fadd(a, b)
         tvm.testing.assert_allclose(b.numpy(), (2 + a.numpy()).view("float32"))
diff --git a/tests/python/unittest/test_target_codegen_rocm.py b/tests/python/unittest/test_target_codegen_rocm.py
index 894c8ecd0a..3e286f6ebf 100644
--- a/tests/python/unittest/test_target_codegen_rocm.py
+++ b/tests/python/unittest/test_target_codegen_rocm.py
@@ -105,7 +105,7 @@ def test_rocm_copy():
         dtype = np.random.choice(["float32", "float16", "int8", "int32"])
         logN = np.random.randint(1, 15)
         peturb = np.random.uniform(low=0.5, high=1.5)
-        check_rocm(dtype, int(peturb * (2 ** logN)))
+        check_rocm(dtype, int(peturb * (2**logN)))
 
 
 @tvm.testing.requires_rocm
diff --git a/tests/python/unittest/test_tir_transform_narrow_datatype.py b/tests/python/unittest/test_tir_transform_narrow_datatype.py
index 51c3823098..9909262a44 100644
--- a/tests/python/unittest/test_tir_transform_narrow_datatype.py
+++ b/tests/python/unittest/test_tir_transform_narrow_datatype.py
@@ -67,13 +67,13 @@ def test_basic():
     # i32 -> i32
     check(2, 2, 32, "int32")
     # i32 + i32 is not promoted to i64 even if overflow
-    check(2 ** 16, 2 ** 16, 32, "int32")
+    check(2**16, 2**16, 32, "int32")
     # i64 -> i32
     check(const(2, dtype="int64"), const(2, dtype="int64"), 32, "int32")
-    check(const(2 ** 16, dtype="int64"), const(2 ** 16, dtype="int64"), 32, "int64")
+    check(const(2**16, dtype="int64"), const(2**16, dtype="int64"), 32, "int64")
     # i32 -> i16
     check(2, 2, 16, "int16")
-    check(2 ** 10, 2 ** 10, 16, "int32")
+    check(2**10, 2**10, 16, "int32")
 
     # symbolic shape
     check(te.size_var(name="m", dtype="int32"), te.size_var(name="n", dtype="int32"), 32, "int32")
@@ -100,7 +100,7 @@ def test_thread_axis():
     # i32 -> i32
     check(2, 32, target_bits=32, target_dtype="int32")
     check(
-        2 ** 30,
+        2**30,
         32,  # i32 + i32 is not promoted to i64 even in the case of overflow
         target_bits=32,
         target_dtype="int32",
@@ -108,14 +108,14 @@ def test_thread_axis():
     # i64 -> i32
     check(const(2, dtype="int64"), const(32, dtype="int64"), target_bits=32, target_dtype="int32")
     check(
-        const(2 ** 30, dtype="int64"),
+        const(2**30, dtype="int64"),
         const(32, dtype="int64"),
         target_bits=32,
         target_dtype="int64",
     )
     # i32 -> i16
     check(2, 32, target_bits=16, target_dtype="int16")
-    check(2 ** 14, 32, target_bits=16, target_dtype="int32")
+    check(2**14, 32, target_bits=16, target_dtype="int32")
 
 
 def test_multilanes():
@@ -133,14 +133,14 @@ def test_multilanes():
         assert stmt.seq[0].loop_var.dtype == target_dtype
 
     # i32 -> i32
-    check(const(2 ** 10, dtype="int32"), 2, target_bits=32, target_dtype="int32")
-    check(const(2 ** 32, dtype="int32"), 2, target_bits=32, target_dtype="int32")
+    check(const(2**10, dtype="int32"), 2, target_bits=32, target_dtype="int32")
+    check(const(2**32, dtype="int32"), 2, target_bits=32, target_dtype="int32")
     # i64 -> i32
-    check(const(2 ** 10, dtype="int64"), 2, target_bits=32, target_dtype="int32")
-    check(const(2 ** 32, dtype="int64"), 2, target_bits=32, target_dtype="int64")
+    check(const(2**10, dtype="int64"), 2, target_bits=32, target_dtype="int32")
+    check(const(2**32, dtype="int64"), 2, target_bits=32, target_dtype="int64")
     # i32 -> i16
-    check(const(2 ** 10, dtype="int32"), 2, target_bits=16, target_dtype="int16")
-    check(const(2 ** 16, dtype="int32"), 2, target_bits=16, target_dtype="int32")
+    check(const(2**10, dtype="int32"), 2, target_bits=16, target_dtype="int16")
+    check(const(2**16, dtype="int32"), 2, target_bits=16, target_dtype="int32")
 
 
 def test_reduce():
@@ -158,7 +158,7 @@ def test_reduce():
     check(const(64, dtype="int64"), 32, "int32")
     # i32 -> i16
     check(const(64, dtype="int32"), 16, "int16")
-    check(const(2 ** 16, dtype="int32"), 16, "int32")
+    check(const(2**16, dtype="int32"), 16, "int32")
     # symbolic
     check(te.var("n", dtype="int32"), 32, "int32")
     check(te.var("n", dtype="int64"), 32, "int64")
@@ -181,10 +181,10 @@ def test_slice():
         assert stmt.body.loop_var.dtype == target_dtype
 
     # The maximum index is (2**15 * 2**15 - 1) * 2 <= 2**31 - 1
-    check(const(2 ** 15, "int64"), const(2 ** 15, "int64"), target_bits=32, target_dtype="int32")
+    check(const(2**15, "int64"), const(2**15, "int64"), target_bits=32, target_dtype="int32")
     # The maximum index is (2**15 * 2**15 - 1 + 2**15) * 2 > 2**31 - 1
     check(
-        const(2 ** 15, "int64"), const((2 ** 15 + 1), "int64"), target_bits=32, target_dtype="int64"
+        const(2**15, "int64"), const((2**15 + 1), "int64"), target_bits=32, target_dtype="int64"
     )
 
 
@@ -208,23 +208,23 @@ def test_relay_basic():
             assert stmt.body.loop_var.dtype == target_dtype
 
     check(
-        (const(2 ** 16, "int64"), const(2 ** 15 + 1, "int64")),
-        (1, const(2 ** 15 + 1, "int64")),
+        (const(2**16, "int64"), const(2**15 + 1, "int64")),
+        (1, const(2**15 + 1, "int64")),
         target_bits=32,
         target_dtype="int64",
     )
     check(
-        (const(2 ** 16, "int64"), const(2 ** 15, "int64")),
-        (1, const(2 ** 15, "int64")),
+        (const(2**16, "int64"), const(2**15, "int64")),
+        (1, const(2**15, "int64")),
         target_bits=32,
         target_dtype="int32",
     )
     check(
-        (const(2 ** 31, "int64"),), (const(2 ** 31, "int64"),), target_bits=32, target_dtype="int32"
+        (const(2**31, "int64"),), (const(2**31, "int64"),), target_bits=32, target_dtype="int32"
     )
     check(
-        (const(2 ** 31 + 1, "int64"),),
-        (const(2 ** 31 + 1, "int64"),),
+        (const(2**31 + 1, "int64"),),
+        (const(2**31 + 1, "int64"),),
         target_bits=32,
         target_dtype="int64",
     )
@@ -245,14 +245,14 @@ def test_relay_take():
         assert stmt.value.indices[0].dtype == target_dtype
 
     check(
-        (const(2 ** 16, "int64"), const(2 ** 15 + 1, "int64")),
+        (const(2**16, "int64"), const(2**15 + 1, "int64")),
         relay.const(0, dtype="int64"),
         target_bits=32,
         target_dtype="int32",
     )
     check(
-        (const(2 ** 16, "int64"), const(2 ** 15 + 1, "int64")),
-        relay.const(2 ** 31, dtype="int64"),
+        (const(2**16, "int64"), const(2**15 + 1, "int64")),
+        relay.const(2**31, dtype="int64"),
         target_bits=32,
         target_dtype="int64",
     )
@@ -271,7 +271,7 @@ def test_ramp_dtype_consistency():
     """
     n = tvm.tir.IntImm("int64", 4)
     m = tvm.tir.IntImm("int64", 2)
-    A = te.compute((n, m), lambda i, j: tvm.tir.Cast("int64", 2 ** 31 - 1) * i, name="A")
+    A = te.compute((n, m), lambda i, j: tvm.tir.Cast("int64", 2**31 - 1) * i, name="A")
     s = te.create_schedule(A.op)
     s[A].vectorize(A.op.axis[1])
     lower_sch(s, [A], 32, extra_passes=[tvm.tir.transform.VectorizeLoop()])
diff --git a/tests/python/unittest/test_tir_transform_vectorize.py b/tests/python/unittest/test_tir_transform_vectorize.py
index 5b6f7de97b..2448fffe89 100644
--- a/tests/python/unittest/test_tir_transform_vectorize.py
+++ b/tests/python/unittest/test_tir_transform_vectorize.py
@@ -220,7 +220,7 @@ def test_vectorize_while_fail():
 
 def test_vectorize_dtype_mismatch():
     n = tvm.tir.IntImm("int64", 4)
-    A = te.compute((n,), lambda i: tvm.tir.IntImm("int64", 2 ** 31 - 1) + i, name="A")
+    A = te.compute((n,), lambda i: tvm.tir.IntImm("int64", 2**31 - 1) + i, name="A")
     s = te.create_schedule(A.op)
     s[A].vectorize(A.op.axis[0])
     tvm.lower(s, [A], "llvm", simple_mode=True)
diff --git a/tests/python/unittest/test_tir_usmp_algo_hill_climb.py b/tests/python/unittest/test_tir_usmp_algo_hill_climb.py
index a5f1158a90..863b0a566c 100644
--- a/tests/python/unittest/test_tir_usmp_algo_hill_climb.py
+++ b/tests/python/unittest/test_tir_usmp_algo_hill_climb.py
@@ -45,13 +45,10 @@ def _verify_conflicts(buffer_info, pool_allocation, buffer_info_map):
 
         if conflict_pool_allocation.pool_info == pool_allocation.pool_info:
             assert conflict_pool_allocation.byte_offset != pool_allocation.byte_offset
-            l2 = (
-                max(
-                    conflict_pool_allocation.byte_offset + conflict.size_bytes,
-                    pool_allocation.byte_offset + buffer_info.size_bytes,
-                )
-                - min(conflict_pool_allocation.byte_offset, pool_allocation.byte_offset)
-            )
+            l2 = max(
+                conflict_pool_allocation.byte_offset + conflict.size_bytes,
+                pool_allocation.byte_offset + buffer_info.size_bytes,
+            ) - min(conflict_pool_allocation.byte_offset, pool_allocation.byte_offset)
             assert (
                 conflict.size_bytes + buffer_info.size_bytes <= l2
             ), 'Conflicting: \n"{} @{}"\n"{} @{}"'.format(
diff --git a/vta/tests/python/integration/test_benchmark_gemm.py b/vta/tests/python/integration/test_benchmark_gemm.py
index 3bc3520d86..6290ca436f 100644
--- a/vta/tests/python/integration/test_benchmark_gemm.py
+++ b/vta/tests/python/integration/test_benchmark_gemm.py
@@ -174,7 +174,7 @@ def test_gemm():
                     env.dma_copy,
                     print_ir,
                 )
-                gops = (num_ops / cost.mean) / float(10 ** 9)
+                gops = (num_ops / cost.mean) / float(10**9)
                 print(header)
                 print("\tTime cost = %g sec/op, %g GOPS" % (cost.mean, gops))
 
@@ -189,7 +189,7 @@ def test_gemm():
                 cost = run_schedule(
                     mock.dma_copy, mock.dma_copy, env.gemm, mock.alu, mock.dma_copy, print_ir
                 )
-                gops = (num_ops / cost.mean) / float(10 ** 9)
+                gops = (num_ops / cost.mean) / float(10**9)
                 print(header)
                 print("\tTime cost = %g sec/op, %g GOPS" % (cost.mean, gops))
 
@@ -204,7 +204,7 @@ def test_gemm():
                 cost = run_schedule(
                     mock.dma_copy, mock.dma_copy, mock.gemm, env.alu, mock.dma_copy, print_ir
                 )
-                gops = (num_ops / cost.mean) / float(10 ** 9)
+                gops = (num_ops / cost.mean) / float(10**9)
                 print(header)
                 print("\tTime cost = %g sec/op, %g GOPS" % (cost.mean, gops))
 
@@ -220,8 +220,8 @@ def test_gemm():
                 cost = run_schedule(
                     env.dma_copy, mock.dma_copy, mock.gemm, mock.alu, mock.dma_copy, print_ir
                 )
-                gops = (num_ops / cost.mean) / float(10 ** 9)
-                bandwith = (batch_size * channel * env.INP_WIDTH / cost.mean) / float(10 ** 9)
+                gops = (num_ops / cost.mean) / float(10**9)
+                bandwith = (batch_size * channel * env.INP_WIDTH / cost.mean) / float(10**9)
                 print(header)
                 print(
                     "\tTime cost = %g sec/op, %g GOPS, bandwidth=%g Gbits"
@@ -240,8 +240,8 @@ def test_gemm():
                 cost = run_schedule(
                     mock.dma_copy, env.dma_copy, mock.gemm, mock.alu, mock.dma_copy, print_ir
                 )
-                gops = (num_ops / cost.mean) / float(10 ** 9)
-                bandwith = (channel * channel * env.WGT_WIDTH / cost.mean) / float(10 ** 9)
+                gops = (num_ops / cost.mean) / float(10**9)
+                bandwith = (channel * channel * env.WGT_WIDTH / cost.mean) / float(10**9)
                 print(header)
                 print(
                     "\tTime cost = %g sec/op, %g GOPS, bandwidth=%g Gbits"
@@ -260,8 +260,8 @@ def test_gemm():
                 cost = run_schedule(
                     mock.dma_copy, mock.dma_copy, mock.gemm, mock.alu, env.dma_copy, print_ir
                 )
-                gops = (num_ops / cost.mean) / float(10 ** 9)
-                bandwith = (batch_size * channel * env.OUT_WIDTH / cost.mean) / float(10 ** 9)
+                gops = (num_ops / cost.mean) / float(10**9)
+                bandwith = (batch_size * channel * env.OUT_WIDTH / cost.mean) / float(10**9)
                 print(header)
                 print(
                     "\tTime cost = %g sec/op, %g GOPS, bandwidth=%g Gbits"
diff --git a/vta/tests/python/integration/test_benchmark_topi_conv2d.py b/vta/tests/python/integration/test_benchmark_topi_conv2d.py
index 672c113488..64f9ec2deb 100644
--- a/vta/tests/python/integration/test_benchmark_topi_conv2d.py
+++ b/vta/tests/python/integration/test_benchmark_topi_conv2d.py
@@ -283,7 +283,7 @@ def run_conv2d(env, remote, wl, target, check_correctness=True, print_ir=False,
         res_ref = res_ref.astype(env.out_dtype)
         correct = np.allclose(res_orig, res_ref)
 
-    gops = (num_ops / cost.mean) / float(10 ** 9)
+    gops = (num_ops / cost.mean) / float(10**9)
     status = "PASSED" if correct else "FAILED"
     if "arm_cpu" in target.keys:
         device = "CPU"
diff --git a/vta/tests/python/integration/test_benchmark_topi_conv2d_transpose.py b/vta/tests/python/integration/test_benchmark_topi_conv2d_transpose.py
index 65c861ba46..b0ea2fc113 100644
--- a/vta/tests/python/integration/test_benchmark_topi_conv2d_transpose.py
+++ b/vta/tests/python/integration/test_benchmark_topi_conv2d_transpose.py
@@ -270,7 +270,7 @@ def run_conv2d_transpose(
         res_ref = res_ref.astype(env.out_dtype)
         correct = np.allclose(res_orig, res_ref)
 
-    gops = (num_ops / cost.mean) / float(10 ** 9)
+    gops = (num_ops / cost.mean) / float(10**9)
     status = "PASSED" if correct else "FAILED"
     if "arm_cpu" in target.keys:
         device = "CPU"
diff --git a/vta/tests/python/integration/test_benchmark_topi_dense.py b/vta/tests/python/integration/test_benchmark_topi_dense.py
index 133cbf506e..45a400b24e 100644
--- a/vta/tests/python/integration/test_benchmark_topi_dense.py
+++ b/vta/tests/python/integration/test_benchmark_topi_dense.py
@@ -184,7 +184,7 @@ def run_gemm(
         res_ref = res_ref.astype(env.out_dtype)
         correct = np.allclose(res_orig, res_ref)
 
-    gops = (num_ops / cost.mean) / float(10 ** 9)
+    gops = (num_ops / cost.mean) / float(10**9)
     status = "PASSED" if correct else "FAILED"
     if "arm_cpu" in target.keys:
         device = "CPU"
diff --git a/vta/tests/python/integration/test_benchmark_topi_group_conv2d.py b/vta/tests/python/integration/test_benchmark_topi_group_conv2d.py
index 66de6d9a54..bc9efa05f3 100644
--- a/vta/tests/python/integration/test_benchmark_topi_group_conv2d.py
+++ b/vta/tests/python/integration/test_benchmark_topi_group_conv2d.py
@@ -277,7 +277,7 @@ def run_group_conv2d(env, remote, wl, target, check_correctness=True, print_ir=F
         res_ref = res_ref.astype(env.out_dtype)
         correct = np.allclose(res_orig, res_ref)
 
-    gops = (num_ops / cost.mean) / float(10 ** 9)
+    gops = (num_ops / cost.mean) / float(10**9)
     status = "PASSED" if correct else "FAILED"
     if "arm_cpu" in target.keys:
         device = "CPU"