diff --git a/cmake/modules/contrib/TFLite.cmake b/cmake/modules/contrib/TFLite.cmake index 31597109095a1..b8d6a0daff195 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 2dc075d29b139..28a7d89154123 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 f04d8515b8dc2..6f02ab97c09eb 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 63089f3d65f25..06e6bd115441e 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 18335c98c4035..e90ca3d8f10f2 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 8fa9d0c058b2e..fca4bb68e7820 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 17d2b31d9bc24..2225b7aef3b86 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 59cc5b4814b32..c01b8d4aac7be 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 8a394302fdd33..4b73c202bc7f7 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 84213be860dcf..e4fac84055899 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