From 864350a2cc7e8f573322065258a658286d451e81 Mon Sep 17 00:00:00 2001 From: Raman Sarokin Date: Tue, 15 Sep 2020 11:08:10 -0700 Subject: [PATCH] Added more processor ABIs to shell scripts. PiperOrigin-RevId: 331809692 Change-Id: I1398cb15485296afca446f15119aee113d01bbcb --- tensorflow/lite/delegates/gpu/cl/run_tests.sh | 12 +++++++++--- .../delegates/gpu/cl/testing/run_delegate_testing.sh | 12 +++++++++--- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/tensorflow/lite/delegates/gpu/cl/run_tests.sh b/tensorflow/lite/delegates/gpu/cl/run_tests.sh index 16d2feb8a5a..0eed264a06f 100755 --- a/tensorflow/lite/delegates/gpu/cl/run_tests.sh +++ b/tensorflow/lite/delegates/gpu/cl/run_tests.sh @@ -64,11 +64,17 @@ trap "cleanup_device" EXIT declare -a BUILD_CONFIG abi_version=$(ADB shell getprop ro.product.cpu.abi | tr -d '\r') if [[ "$abi_version" == "armeabi-v7a" ]]; then -#"32 bit" +#"32 bit ARM" BUILD_CONFIG=( --config=android_arm -c opt --copt=-fPIE --linkopt=-pie ) -else -#"64 bit" +elif [[ "$abi_version" == "arm64-v8a" ]]; then +#"64 bit ARM" BUILD_CONFIG=( --config=android_arm64 -c opt ) +elif [[ "$abi_version" == "x86_64" ]]; then +# x86_64 +BUILD_CONFIG=( --config=android_x86_64 -c opt ) +else +echo "Error: Unknown processor ABI" +exit 1 fi targets=($(bazel query 'tests('$test_target')')) diff --git a/tensorflow/lite/delegates/gpu/cl/testing/run_delegate_testing.sh b/tensorflow/lite/delegates/gpu/cl/testing/run_delegate_testing.sh index 7b86407dbad..70d2a5cf3dc 100755 --- a/tensorflow/lite/delegates/gpu/cl/testing/run_delegate_testing.sh +++ b/tensorflow/lite/delegates/gpu/cl/testing/run_delegate_testing.sh @@ -78,11 +78,17 @@ ADB push "$model_path" "$OPENCL_DIR" declare -a BUILD_CONFIG abi_version=$(ADB shell getprop ro.product.cpu.abi | tr -d '\r') if [[ "$abi_version" == "armeabi-v7a" ]]; then -#"32 bit" +#"32 bit ARM" BUILD_CONFIG=( --config=android_arm -c opt --copt=-fPIE --linkopt=-pie ) -else -#"64 bit" +elif [[ "$abi_version" == "arm64-v8a" ]]; then +#"64 bit ARM" BUILD_CONFIG=( --config=android_arm64 -c opt ) +elif [[ "$abi_version" == "x86_64" ]]; then +# x86_64 +BUILD_CONFIG=( --config=android_x86_64 -c opt ) +else +echo "Error: Unknown processor ABI" +exit 1 fi bazel build "${BUILD_CONFIG[@]}" //$SHELL_DIR:$BINARY_NAME