From 0cdd615121bbb385b2334a9d1e63872b3a0f0dc6 Mon Sep 17 00:00:00 2001 From: Masahiro Hiramori Date: Sat, 14 Sep 2024 21:36:37 +0900 Subject: [PATCH 1/4] disable nnpack on ci --- docker/Dockerfile.ci_cpu | 4 ---- docker/Dockerfile.ci_gpu | 4 ---- docker/Dockerfile.demo_vitis_ai | 4 ---- tests/scripts/task_config_build_cpu.sh | 2 -- tests/scripts/task_config_build_gpu.sh | 2 -- 5 files changed, 16 deletions(-) diff --git a/docker/Dockerfile.ci_cpu b/docker/Dockerfile.ci_cpu index ae088f5c9e63..05c223597f91 100644 --- a/docker/Dockerfile.ci_cpu +++ b/docker/Dockerfile.ci_cpu @@ -77,10 +77,6 @@ COPY install/ubuntu_install_golang.sh /install/ubuntu_install_golang.sh RUN bash /install/ubuntu_install_golang.sh ENV PATH $PATH:/usr/lib/go-1.18/bin -# NNPACK deps -COPY install/ubuntu_install_nnpack.sh /install/ubuntu_install_nnpack.sh -RUN bash /install/ubuntu_install_nnpack.sh - # ANTLR deps COPY install/ubuntu_install_java.sh /install/ubuntu_install_java.sh RUN bash /install/ubuntu_install_java.sh diff --git a/docker/Dockerfile.ci_gpu b/docker/Dockerfile.ci_gpu index acb0310a41e2..8d11882098fb 100644 --- a/docker/Dockerfile.ci_gpu +++ b/docker/Dockerfile.ci_gpu @@ -133,10 +133,6 @@ RUN bash /install/ubuntu_install_wasmtime.sh COPY install/ubuntu_install_redis.sh /install/ubuntu_install_redis.sh RUN bash /install/ubuntu_install_redis.sh -# NNPACK deps -COPY install/ubuntu_install_nnpack.sh /install/ubuntu_install_nnpack.sh -RUN bash /install/ubuntu_install_nnpack.sh - # BYODT deps COPY install/ubuntu_install_universal.sh /install/ubuntu_install_universal.sh RUN bash /install/ubuntu_install_universal.sh diff --git a/docker/Dockerfile.demo_vitis_ai b/docker/Dockerfile.demo_vitis_ai index b82076dbdf9c..01b0b494bd9e 100644 --- a/docker/Dockerfile.demo_vitis_ai +++ b/docker/Dockerfile.demo_vitis_ai @@ -45,10 +45,6 @@ RUN bash /install/ubuntu_install_python_package.sh COPY install/ubuntu_install_llvm.sh /install/ubuntu_install_llvm.sh RUN bash /install/ubuntu_install_llvm.sh -# NNPACK deps -COPY install/ubuntu_install_nnpack.sh /install/ubuntu_install_nnpack.sh -RUN bash /install/ubuntu_install_nnpack.sh - ENV PATH $PATH:$CARGO_HOME/bin:/usr/lib/go-1.10/bin # ANTLR deps diff --git a/tests/scripts/task_config_build_cpu.sh b/tests/scripts/task_config_build_cpu.sh index f509aad30627..c97321e538bd 100755 --- a/tests/scripts/task_config_build_cpu.sh +++ b/tests/scripts/task_config_build_cpu.sh @@ -30,8 +30,6 @@ echo set\(USE_PROFILER ON\) >> config.cmake echo set\(USE_DNNL ON\) >> config.cmake echo set\(USE_ARM_COMPUTE_LIB ON\) >> config.cmake echo set\(USE_LLVM \"/usr/bin/llvm-config-17 --link-static\"\) >> config.cmake -echo set\(USE_NNPACK ON\) >> config.cmake -echo set\(NNPACK_PATH /NNPACK/build/\) >> config.cmake echo set\(USE_ANTLR ON\) >> config.cmake echo set\(CMAKE_CXX_FLAGS \"-Werror -Wno-error=range-loop-construct\"\) >> config.cmake echo set\(HIDE_PRIVATE_SYMBOLS ON\) >> config.cmake diff --git a/tests/scripts/task_config_build_gpu.sh b/tests/scripts/task_config_build_gpu.sh index e68e646ce178..03f90c5ad4a1 100755 --- a/tests/scripts/task_config_build_gpu.sh +++ b/tests/scripts/task_config_build_gpu.sh @@ -33,8 +33,6 @@ echo set\(USE_OPENCL_GTEST \"/googletest\"\) >> config.cmake echo set\(USE_MICRO ON\) >> config.cmake echo set\(USE_MICRO_STANDALONE_RUNTIME ON\) >> config.cmake echo set\(USE_LLVM \"/usr/bin/llvm-config-15 --link-static\"\) >> config.cmake -echo set\(USE_NNPACK ON\) >> config.cmake -echo set\(NNPACK_PATH /NNPACK/build/\) >> config.cmake echo set\(USE_RPC ON\) >> config.cmake echo set\(USE_SORT ON\) >> config.cmake echo set\(USE_GRAPH_EXECUTOR ON\) >> config.cmake From a5114e408db9ceecf75b8b35d0bdd028cc745945 Mon Sep 17 00:00:00 2001 From: Masahiro Hiramori Date: Mon, 16 Sep 2024 22:08:03 +0900 Subject: [PATCH 2/4] fix android sdk installation error --- docker/install/ubuntu_install_androidsdk.sh | 14 +++++++------- docker/install/ubuntu_install_java.sh | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docker/install/ubuntu_install_androidsdk.sh b/docker/install/ubuntu_install_androidsdk.sh index 5e7278c5d631..193a02745f3a 100755 --- a/docker/install/ubuntu_install_androidsdk.sh +++ b/docker/install/ubuntu_install_androidsdk.sh @@ -25,6 +25,8 @@ ANDROID_HOME=/opt/android-sdk-linux ASDKTOOLS_HOME=/opt/android-sdk-tools ASDKTOOLS_VERSION=3859397 ASDKTOOLS_SHA256=444e22ce8ca0f67353bda4b85175ed3731cae3ffa695ca18119cbacef1c1bea0 +COMMANDLINETOOLS_VERSION=11076708 +COMMANDLINETOOLS_SHA256=2d2d50857e4eb553af5a6dc3ad507a17adf43d115264b1afc116f95c92e5e258 ANDROID_NDK_VERSION=21.3.6528147 CMAKE_VERSION=3.6.4111459 @@ -52,11 +54,11 @@ echo "Cmake Version: ${CMAKE_VERSION}" echo "Build Tools: ${BUILD_TOOLS_VERSION}" echo "Android Platform: ${ANDROID_PLATFORM}" -wget -q http://dl.google.com/android/repository/sdk-tools-linux-${ASDKTOOLS_VERSION}.zip -O sdk-tools-linux.zip -echo "${ASDKTOOLS_SHA256} *sdk-tools-linux.zip" | sha256sum --check - -unzip sdk-tools-linux.zip -rm sdk-tools-linux.zip -mv tools "${ASDKTOOLS_HOME}/" +wget -q https://dl.google.com/android/repository/commandlinetools-linux-${COMMANDLINETOOLS_VERSION}_latest.zip -O commandlinetools-linux.zip +echo "${COMMANDLINETOOLS_SHA256} commandlinetools-linux.zip" | sha256sum --check - +unzip commandlinetools-linux.zip +rm commandlinetools-linux.zip +mv cmdline-tools/ "${ASDKTOOLS_HOME}/" # The following popular fix makes sdkmanager honour $http_proxy variables mv ${ASDKTOOLS_HOME}/bin/sdkmanager ${ASDKTOOLS_HOME}/bin/sdkmanager-vanilla cat >${ASDKTOOLS_HOME}/bin/sdkmanager <<"EOF" @@ -90,8 +92,6 @@ extras;google;market_apk_expansion extras;google;market_licensing extras;google;simulators extras;google;webdriver -extras;m2repository;com;android;support;constraint;constraint-layout;1.0.2 -extras;m2repository;com;android;support;constraint;constraint-layout-solver;1.0.2 platforms;android-26 platforms;android-${ANDROID_PLATFORM} tools diff --git a/docker/install/ubuntu_install_java.sh b/docker/install/ubuntu_install_java.sh index 5556f0d8fed5..c4a8c5f9acb5 100755 --- a/docker/install/ubuntu_install_java.sh +++ b/docker/install/ubuntu_install_java.sh @@ -20,7 +20,7 @@ set -o errexit -o nounset set -o pipefail apt-get update -apt-install-and-clear -y openjdk-8-jdk maven +apt-install-and-clear -y openjdk-17-jdk maven arch=$(uname -m) jre_arch="unknown" case $arch in @@ -36,8 +36,8 @@ case $arch in ;; esac -if [ ! -d "/usr/lib/jvm/java-8-openjdk-$jre_arch/jre" ]; then +if [ ! -d "/usr/lib/jvm/java-17-openjdk-$jre_arch" ]; then echo "error: missing openjdk for $jre_arch" >&2 exit 1 fi -echo "export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-$jre_arch/jre" >> /etc/profile +echo "export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-$jre_arch" >> /etc/profile From 68ab17be20edc629f51de5f3d6008d77cb568317 Mon Sep 17 00:00:00 2001 From: Masahiro Hiramori Date: Tue, 17 Sep 2024 00:30:22 +0900 Subject: [PATCH 3/4] port from https://github.com/octoml/relax/pull/38 --- cmake/modules/contrib/TFLite.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake/modules/contrib/TFLite.cmake b/cmake/modules/contrib/TFLite.cmake index b8d6a0daff19..255dc5fde780 100644 --- a/cmake/modules/contrib/TFLite.cmake +++ b/cmake/modules/contrib/TFLite.cmake @@ -39,6 +39,10 @@ if(NOT USE_TFLITE STREQUAL "OFF") endif() find_library(TFLITE_CONTRIB_LIB libtensorflow-lite.a ${USE_TFLITE}) file(GLOB_RECURSE TFLITE_DEPS "${USE_TFLITE}/*.a") + # the order of the next libs are important for correct build + list(REMOVE_ITEM TFLITE_DEPS "${USE_TFLITE}/_deps/clog-build/libclog.a" "${USE_TFLITE}/_deps/cpuinfo-build/libcpuinfo.a") + list(APPEND TFLITE_DEPS "${USE_TFLITE}/_deps/cpuinfo-build/libcpuinfo.a") + list(APPEND TFLITE_DEPS "${USE_TFLITE}/_deps/clog-build/libclog.a") list(APPEND TVM_RUNTIME_LINKER_LIBS ${TFLITE_CONTRIB_LIB}) list(APPEND TVM_RUNTIME_LINKER_LIBS ${TFLITE_DEPS}) From d9b963d254ace3f09d0f33fb55317d1c3c0672c2 Mon Sep 17 00:00:00 2001 From: Masahiro Hiramori Date: Tue, 17 Sep 2024 01:48:02 +0900 Subject: [PATCH 4/4] remove androidsdk from ci image --- docker/Dockerfile.ci_adreno | 5 ----- docker/Dockerfile.ci_cpu | 4 ---- docker/Dockerfile.ci_hexagon | 6 ------ 3 files changed, 15 deletions(-) diff --git a/docker/Dockerfile.ci_adreno b/docker/Dockerfile.ci_adreno index 961977c54286..30e095b27aac 100644 --- a/docker/Dockerfile.ci_adreno +++ b/docker/Dockerfile.ci_adreno @@ -20,11 +20,6 @@ FROM tlcpack/ci-gpu COPY utils/apt-install-and-clear.sh /usr/local/bin/apt-install-and-clear -# Android SDK -COPY install/ubuntu_install_androidsdk.sh /install/ubuntu_install_androidsdk.sh -RUN bash /install/ubuntu_install_androidsdk.sh 25.2.9519653 3.22.1 33.0.2 33 -ENV PATH /opt/android-sdk-linux/platform-tools:$PATH - # Clang tool for CLML source codegen RUN apt-get update && apt-install-and-clear -y clang-format-15 diff --git a/docker/Dockerfile.ci_cpu b/docker/Dockerfile.ci_cpu index 05c223597f91..17344f7dac22 100644 --- a/docker/Dockerfile.ci_cpu +++ b/docker/Dockerfile.ci_cpu @@ -125,10 +125,6 @@ RUN bash /install/ubuntu_install_ethosn_driver_stack.sh COPY install/ubuntu_install_vitis_ai_packages_ci.sh /install/ubuntu_install_vitis_ai_packages_ci.sh RUN bash /install/ubuntu_install_vitis_ai_packages_ci.sh -# Android SDK -COPY install/ubuntu_install_androidsdk.sh /install/ubuntu_install_androidsdk.sh -RUN bash /install/ubuntu_install_androidsdk.sh - # PaddlePaddle deps COPY install/ubuntu_install_paddle.sh /install/ubuntu_install_paddle.sh RUN bash /install/ubuntu_install_paddle.sh diff --git a/docker/Dockerfile.ci_hexagon b/docker/Dockerfile.ci_hexagon index 3b4c58ef43c9..1855e3a9c231 100644 --- a/docker/Dockerfile.ci_hexagon +++ b/docker/Dockerfile.ci_hexagon @@ -58,12 +58,6 @@ RUN bash /install/ubuntu_install_python_package.sh COPY install/ubuntu_install_java.sh /install/ubuntu_install_java.sh RUN bash /install/ubuntu_install_java.sh -# Android SDK -COPY install/ubuntu_install_androidsdk.sh /install/ubuntu_install_androidsdk.sh -RUN bash /install/ubuntu_install_androidsdk.sh -ENV ANDROID_HOME=/opt/android-sdk-linux -ENV PATH /opt/android-sdk-linux/platform-tools:$PATH - # Hexagon COPY install/ubuntu_install_hexagon.sh /install/ubuntu_install_hexagon.sh RUN bash /install/ubuntu_install_hexagon.sh