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/07/26 13:38:00 UTC

[tvm] branch ci-docker-staging updated (8ae520b1be -> 112c37eda3)

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 8ae520b1be This is PR #12130.
 discard 15cf56e7df [TFLite][CI] Update TensorFlow dependency to 2.9.1
     add 75ec1cffa9 [TVMC] Workspace Pools Parameters (#11427)
     add 19e5ec6576 [hexagon][testing] sequential input tensors (#12168)
     add 21d54f9880 [PyTorch] Add aten::numpy_T (#12179)
     add ca2ec5429b [CI][docker] Add comment (#11953)
     add 9963b59ffa fix typo (#12183)
     add 9bef7de9f0 [Doc] Fix link error in pipeline executor tutorial (#12185)
     add ea6ea42757 TVM Vertical Integration with PyTorch (#11911)
     add eada707a70 [Fix] Fix some errors in unittests (#12170)
     new bd4c900925 [TFLite][CI] Update TensorFlow dependency to 2.9.1
     new 2bcf79b059 This is PR #12130.
     new 112c37eda3 Update Jenkins ci_arm, ci_cpu, ci_gpu, ci_qemu to use 20220725-085822-8ae520b1b

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   (8ae520b1be)
            \
             N -- N -- N   refs/heads/ci-docker-staging (112c37eda3)

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 3 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:
 Jenkinsfile                                        |  10 +-
 apps/pt_tvmdsoop/tests/test_as_torch.py            | 257 +++++++++++++
 apps/pt_tvmdsoop/tests/test_optimize_torch.py      | 161 ++++++++
 ci/jenkins/Jenkinsfile.j2                          |   8 +-
 docker/bash.sh                                     |   3 +
 .../work_with_relay/using_pipeline_executor.py     |   2 +-
 include/tvm/ir/memory_pools.h                      |   1 +
 python/tvm/contrib/torch/__init__.py               |  12 +-
 python/tvm/contrib/torch/as_torch.py               | 124 +++++++
 python/tvm/contrib/torch/optimize_torch.py         | 198 ++++++++++
 python/tvm/driver/tvmc/compiler.py                 |  30 +-
 python/tvm/driver/tvmc/workspace_pools.py          | 237 ++++++++++++
 python/tvm/ir/memory_pools.py                      |   2 +-
 python/tvm/relay/frontend/pytorch.py               |  14 +-
 python/tvm/script/parser.py                        |  16 +-
 src/contrib/torch/base64.h                         |  75 ++++
 .../torch/pt_call_tvm/RuntimeModuleWrapper.cc      | 259 +++++++++++++
 src/relay/backend/contrib/cmsisnn/target.cc        |   4 +-
 src/relay/ir/indexed_graph.cc                      |   2 +-
 tests/python/contrib/test_hexagon/pytest_util.py   |  33 +-
 tests/python/driver/tvmc/test_command_line.py      |  22 ++
 tests/python/driver/tvmc/test_compiler.py          |  22 ++
 tests/python/driver/tvmc/test_workspace_pools.py   | 404 +++++++++++++++++++++
 tests/python/frontend/pytorch/test_forward.py      |  12 +
 tests/python/unittest/test_arith_domain_touched.py |   8 +-
 .../test_tir_analysis_calculate_workspace.py       |   2 +-
 .../test_tir_analysis_get_block_access_region.py   |   2 -
 .../unittest/test_tir_schedule_transform_layout.py |   2 +-
 .../test_tir_transform_compact_buffer_region.py    |  22 +-
 ...test_tir_transform_renormalize_split_pattern.py |   4 +-
 .../unittest/test_tir_transform_storage_flatten.py |   2 +-
 .../test_tir_usmp_analysis_extract_bufferinfo.py   |   2 +-
 tests/python/unittest/test_tir_usmp_utils.py       |   2 +-
 tests/python/unittest/test_tvmscript_roundtrip.py  |  22 +-
 .../python/unittest/test_tvmscript_syntax_sugar.py |   2 +-
 35 files changed, 1912 insertions(+), 66 deletions(-)
 create mode 100644 apps/pt_tvmdsoop/tests/test_as_torch.py
 create mode 100644 apps/pt_tvmdsoop/tests/test_optimize_torch.py
 create mode 100644 python/tvm/contrib/torch/as_torch.py
 create mode 100644 python/tvm/contrib/torch/optimize_torch.py
 create mode 100644 python/tvm/driver/tvmc/workspace_pools.py
 create mode 100644 src/contrib/torch/base64.h
 create mode 100644 src/contrib/torch/pt_call_tvm/RuntimeModuleWrapper.cc
 create mode 100644 tests/python/driver/tvmc/test_workspace_pools.py


[tvm] 03/03: Update Jenkins ci_arm, ci_cpu, ci_gpu, ci_qemu to use 20220725-085822-8ae520b1b

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 112c37eda35ed32f0c8aaf02e7e458a0e3d3935a
Author: Leandro Nunes <le...@arm.com>
AuthorDate: Tue Jul 26 14:37:02 2022 +0100

    Update Jenkins ci_arm, ci_cpu, ci_gpu, ci_qemu to use 20220725-085822-8ae520b1b
---
 Jenkinsfile               | 10 +++++-----
 ci/jenkins/Jenkinsfile.j2 |  8 ++++----
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index c2f6407333..058f18531f 100755
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -45,17 +45,17 @@
 // '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-07-15T13:35:24.676914
+// Generated at 2022-07-26T14:34:48.559792
 
 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:20220715-060127-37f9d3c49'
-ci_gpu = 'tlcpack/ci-gpu:20220715-060127-37f9d3c49'
-ci_cpu = 'tlcpack/ci-cpu:20220715-060127-37f9d3c49'
+ci_gpu = 'tlcpackstaging/ci-gpu:20220725-085822-8ae520b1b'
+ci_cpu = 'tlcpackstaging/ci-cpu:20220725-085822-8ae520b1b'
 ci_wasm = 'tlcpack/ci-wasm:20220715-060127-37f9d3c49'
 ci_i386 = 'tlcpack/ci-i386:20220715-060127-37f9d3c49'
-ci_qemu = 'tlcpack/ci-qemu:20220630-060117-558ba99c7'
-ci_arm = 'tlcpack/ci-arm:20220715-060127-37f9d3c49'
+ci_qemu = 'tlcpackstaging/ci-qemu:20220725-085822-8ae520b1b'
+ci_arm = 'tlcpackstaging/ci-arm:20220725-085822-8ae520b1b'
 ci_hexagon = 'tlcpack/ci-hexagon:20220715-060127-37f9d3c49'
 // <--- End of regex-scanned config.
 
diff --git a/ci/jenkins/Jenkinsfile.j2 b/ci/jenkins/Jenkinsfile.j2
index 45b7565bf5..779f45fbd1 100644
--- a/ci/jenkins/Jenkinsfile.j2
+++ b/ci/jenkins/Jenkinsfile.j2
@@ -52,12 +52,12 @@ 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:20220715-060127-37f9d3c49'
-ci_gpu = 'tlcpack/ci-gpu:20220715-060127-37f9d3c49'
-ci_cpu = 'tlcpack/ci-cpu:20220715-060127-37f9d3c49'
+ci_gpu = 'tlcpackstaging/ci-gpu:20220725-085822-8ae520b1b'
+ci_cpu = 'tlcpackstaging/ci-cpu:20220725-085822-8ae520b1b'
 ci_wasm = 'tlcpack/ci-wasm:20220715-060127-37f9d3c49'
 ci_i386 = 'tlcpack/ci-i386:20220715-060127-37f9d3c49'
-ci_qemu = 'tlcpack/ci-qemu:20220630-060117-558ba99c7'
-ci_arm = 'tlcpack/ci-arm:20220715-060127-37f9d3c49'
+ci_qemu = 'tlcpackstaging/ci-qemu:20220725-085822-8ae520b1b'
+ci_arm = 'tlcpackstaging/ci-arm:20220725-085822-8ae520b1b'
 ci_hexagon = 'tlcpack/ci-hexagon:20220715-060127-37f9d3c49'
 // <--- End of regex-scanned config.
 


[tvm] 01/03: [TFLite][CI] Update TensorFlow dependency to 2.9.1

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 bd4c900925f6a29ac95fd1e17bf6c07903e43230
Author: Leandro Nunes <le...@arm.com>
AuthorDate: Mon May 23 11:55:08 2022 +0100

    [TFLite][CI] Update TensorFlow dependency to 2.9.1
    
    This updates the TF version to be used in TVM CI to 2.9.1,
    which brings improvements so that more platforms are supported by
    official packages.
    
    ethos-u-vela dependency is also updated, from version 3.2.0 to 3.4.0
    so that it is closer to the TensorFlow version being proposed here.
    
    This PR updates the Docker images scripting to install TF and TFLite.
---
 cmake/modules/contrib/TFLite.cmake                  |  2 ++
 docker/Dockerfile.ci_cpu                            |  4 ++++
 docker/Dockerfile.ci_gpu                            |  3 +++
 docker/Dockerfile.ci_qemu                           |  3 +++
 docker/install/ubuntu_install_cmake_source.sh       |  4 ++--
 docker/install/ubuntu_install_python_package.sh     |  2 +-
 docker/install/ubuntu_install_tensorflow.sh         |  5 ++---
 docker/install/ubuntu_install_tensorflow_aarch64.sh | 11 ++---------
 docker/install/ubuntu_install_tflite.sh             | 13 +++++++++++--
 docker/install/ubuntu_install_vela.sh               |  2 +-
 tests/scripts/task_config_build_cpu.sh              |  2 +-
 11 files changed, 32 insertions(+), 19 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 2dc075d29b..28a7d89154 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
 
@@ -152,3 +155,4 @@ ENV PATH /opt/sccache:$PATH
 # Libxsmm deps
 COPY install/ubuntu_install_libxsmm.sh /install
 RUN bash /install/ubuntu_install_libxsmm.sh
+
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/Dockerfile.ci_qemu b/docker/Dockerfile.ci_qemu
index 63089f3d65..06e6bd1154 100644
--- a/docker/Dockerfile.ci_qemu
+++ b/docker/Dockerfile.ci_qemu
@@ -26,6 +26,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 8fa9d0c058..fca4bb68e7 100755
--- a/docker/install/ubuntu_install_python_package.sh
+++ b/docker/install/ubuntu_install_python_package.sh
@@ -27,7 +27,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..c01b8d4aac 100755
--- a/docker/install/ubuntu_install_tensorflow_aarch64.sh
+++ b/docker/install/ubuntu_install_tensorflow_aarch64.sh
@@ -21,11 +21,6 @@ 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()
@@ -36,12 +31,10 @@ cleanup()
 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.0 \
+    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/docker/install/ubuntu_install_vela.sh b/docker/install/ubuntu_install_vela.sh
index c72d118233..9e32889cd4 100755
--- a/docker/install/ubuntu_install_vela.sh
+++ b/docker/install/ubuntu_install_vela.sh
@@ -20,4 +20,4 @@ set -e
 set -u
 set -o pipefail
 
-pip3 install ethos-u-vela==3.2.0
+pip3 install ethos-u-vela==3.4.0
diff --git a/tests/scripts/task_config_build_cpu.sh b/tests/scripts/task_config_build_cpu.sh
index 84213be860..e4fac84055 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


[tvm] 02/03: This is PR #12130.

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 2bcf79b059cb124f2e035a9ba06386d975bd9925
Author: Leandro Nunes <le...@arm.com>
AuthorDate: Fri Jul 22 16:41:03 2022 +0100

    This is PR #12130.
---
 python/tvm/relay/frontend/keras.py           |  8 ++++---
 tests/python/frontend/tflite/test_forward.py | 35 +++++++++++++++++++++-------
 2 files changed, 31 insertions(+), 12 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 6acc8554b4..709ed3f2bf 100644
--- a/tests/python/frontend/tflite/test_forward.py
+++ b/tests/python/frontend/tflite/test_forward.py
@@ -935,7 +935,11 @@ def _test_tflite2_quantized_convolution(
     )
 
     tflite_output = run_tflite_graph(tflite_model_quant, data)
-    tvm_output = run_tvm_graph(tflite_model_quant, data, data_in.name.replace(":0", ""))
+    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
     )
@@ -1934,10 +1938,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(
@@ -1965,8 +1971,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
@@ -2047,7 +2055,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
@@ -2955,7 +2966,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():
@@ -2965,7 +2975,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
     )
@@ -2982,7 +2996,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():
@@ -2992,7 +3005,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
     )