From b44586592d6ee07d5a43243b07938bf3565b5fdf Mon Sep 17 00:00:00 2001 From: liuqi Date: Fri, 14 Jun 2019 11:44:16 +0800 Subject: [PATCH] Update travis CI and remove build log for bazel. --- .travis.yml | 18 +++++++++--------- mace/codegen/tools/gen_version_source.sh | 2 +- tools/bazel.rc | 1 - tools/bazel_adb_run.py | 8 ++++---- 4 files changed, 14 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4ff853d8..3913ebc6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -62,15 +62,15 @@ jobs: - stage: Unit Test script: - echo "Ops Test On Darwin" - - python tools/bazel_adb_run.py --target="//test/ccunit:mace_cc_test" --run_target=False --enable_openmp=false --target_abis=host || exit 1; - - bazel build "//test/ccunit:mace_cc_test" --config=ios --config=optimization_darwin --define openmp=false --define quantize=true --define neon=true --config symbol_hidden || exit 1; + - python tools/bazel_adb_run.py --target="//test/ccunit:mace_cc_test" --run_target=False --target_abis=host || exit 1; + - bazel build "//test/ccunit:mace_cc_test" --config=ios --config=optimization_darwin --define quantize=true --define neon=true --config symbol_hidden || exit 1; env: TYPE=Ops-Test os: osx osx_image: xcode7.2 - stage: Unit Test script: - echo "Ops Test Without NEON" - - python tools/bazel_adb_run.py --target="//test/ccunit:mace_cc_test" --run_target=False --target_abis=armeabi-v7a,arm64-v8a,arm64 --enable_neon=false || exit 1 + - python tools/bazel_adb_run.py --target="//test/ccunit:mace_cc_test" --run_target=False --target_abis=armeabi-v7a,arm64-v8a,arm64 --enable_neon=false --enable_quantize=false || exit 1 env: TYPE=Ops-Test-Without-NEON os: linux dist: xenial @@ -90,8 +90,8 @@ jobs: osx_image: xcode7.2 - stage: Unit Test script: - - python tools/bazel_adb_run.py --target="//test/ccbenchmark:mace_cc_benchmark" --run_target=False --enable_openmp=false --target_abis=host || exit 1; - - bazel build "//test/ccbenchmark:mace_cc_benchmark" --config=ios --config=optimization_darwin --define openmp=false --define quantize=true --define neon=true --config symbol_hidden || exit 1; + - python tools/bazel_adb_run.py --target="//test/ccbenchmark:mace_cc_benchmark" --run_target=False --target_abis=host || exit 1; + - bazel build "//test/ccbenchmark:mace_cc_benchmark" --config=ios --config=optimization_darwin --define quantize=true --define neon=true --config symbol_hidden || exit 1; env: TYPE=Ops-Benchmark os: osx osx_image: xcode7.2 @@ -115,15 +115,15 @@ jobs: sudo: required - stage: Extra Test script: - - bazel build "//mace/libmace:libmace_static" --config=darwin --config=optimization_darwin --define openmp=false --define quantize=true --config symbol_hidden || exit 1; - - bazel build "//mace/libmace:libmace_dynamic" --config=darwin --config=optimization_darwin --define openmp=false --define quantize=true --config symbol_hidden || exit 1; + - bazel build "//mace/libmace:libmace_static" --config=darwin --config=optimization_darwin --define quantize=true --config symbol_hidden || exit 1; + - bazel build "//mace/libmace:libmace_dynamic" --config=darwin --config=optimization_darwin --define quantize=true --config symbol_hidden || exit 1; env: TYPE=Build-Library os: osx osx_image: xcode7.2 - stage: Extra Test script: - - bazel build "//mace/libmace:libmace_static" --config=ios --config=optimization_darwin --define openmp=false --define quantize=true --define neon=true --config symbol_hidden || exit 1; - - bazel build "//mace/libmace:libmace_dynamic" --config=ios --config=optimization_darwin --define openmp=false --define quantize=true --define neon=true --config symbol_hidden || exit 1; + - bazel build "//mace/libmace:libmace_static" --config=ios --config=optimization_darwin --define quantize=true --define neon=true --config symbol_hidden || exit 1; + - bazel build "//mace/libmace:libmace_dynamic" --config=ios --config=optimization_darwin --define quantize=true --define neon=true --config symbol_hidden || exit 1; env: TYPE=Build-Library os: osx osx_image: xcode7.2 diff --git a/mace/codegen/tools/gen_version_source.sh b/mace/codegen/tools/gen_version_source.sh index 28a29848..a8a6af78 100755 --- a/mace/codegen/tools/gen_version_source.sh +++ b/mace/codegen/tools/gen_version_source.sh @@ -22,7 +22,7 @@ fi mkdir -p $(dirname $OUTPUT_FILENAME) MACE_SOURCE_DIR=$(dirname $(dirname $(dirname $(dirname $0)))) -GIT_VERSION=$(git --git-dir=${MACE_SOURCE_DIR}/.git --work-tree=${MACE_SOURCE_DIR} describe --long --tags) +GIT_VERSION=$(git --git-dir=${MACE_SOURCE_DIR}/.git --work-tree=${MACE_SOURCE_DIR} describe --long --tags --abbrev=7) if [[ $? != 0 ]]; then GIT_VERSION=$(git describe --long --tags) diff --git a/tools/bazel.rc b/tools/bazel.rc index 5c85f453..7081296c 100644 --- a/tools/bazel.rc +++ b/tools/bazel.rc @@ -3,7 +3,6 @@ # By default, we don't distinct target and host platfroms. build --distinct_host_configuration=false -build -s build --verbose_failures build --copt=-std=c++11 build --copt=-fPIC diff --git a/tools/bazel_adb_run.py b/tools/bazel_adb_run.py index 447e07af..92f02f02 100644 --- a/tools/bazel_adb_run.py +++ b/tools/bazel_adb_run.py @@ -89,10 +89,10 @@ def parse_args(): default=True, help="Whether to use neon optimization") parser.add_argument( - "--enable_openmp", + "--enable_quantize", type=str2bool, - default=False, - help="Whether to use openmp") + default=True, + help="Whether to use quantization ops") parser.add_argument( '--address_sanitizer', action="store_true", @@ -127,7 +127,7 @@ def main(unused_args): abi=target_abi, toolchain=toolchain, enable_neon=FLAGS.enable_neon, - enable_openmp=FLAGS.enable_openmp, + enable_quantize=FLAGS.enable_quantize, address_sanitizer=FLAGS.address_sanitizer, debug_mode=FLAGS.debug_mode) if FLAGS.run_target: -- GitLab