Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Disable NNPACK build and fix error on Android SDK installaion #17337

Merged
merged 4 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions cmake/modules/contrib/TFLite.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down
5 changes: 0 additions & 5 deletions docker/Dockerfile.ci_adreno
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 0 additions & 8 deletions docker/Dockerfile.ci_cpu
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -129,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
Expand Down
4 changes: 0 additions & 4 deletions docker/Dockerfile.ci_gpu
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 0 additions & 6 deletions docker/Dockerfile.ci_hexagon
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions docker/Dockerfile.demo_vitis_ai
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 7 additions & 7 deletions docker/install/ubuntu_install_androidsdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions docker/install/ubuntu_install_java.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
2 changes: 0 additions & 2 deletions tests/scripts/task_config_build_cpu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions tests/scripts/task_config_build_gpu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading