From 4bedccc768c965d0ef49112d00f732e038fbb4dc Mon Sep 17 00:00:00 2001 From: liuqi Date: Tue, 13 Feb 2018 14:02:01 +0800 Subject: [PATCH] Fix source converter bug: use half type for cpu runtime. --- build_mace_run.sh | 1 + build_production_code.sh | 1 + generate_model_code.sh | 2 ++ 3 files changed, 4 insertions(+) diff --git a/build_mace_run.sh b/build_mace_run.sh index 1b53a294..93c97150 100644 --- a/build_mace_run.sh +++ b/build_mace_run.sh @@ -49,6 +49,7 @@ else --copt="-D_GLIBCXX_USE_C99_MATH_TR1" \ --copt="-Werror=return-type" \ --copt="-DMACE_MODEL_TAG=${MODEL_TAG}" \ + --define openmp=true \ $PRODUCTION_MODE_BUILD_FLAGS \ $HEXAGON_MODE_BUILD_FLAG || exit 1 fi diff --git a/build_production_code.sh b/build_production_code.sh index 68f32fff..5e845009 100644 --- a/build_production_code.sh +++ b/build_production_code.sh @@ -28,6 +28,7 @@ build_target() --copt="-std=c++11" \ --copt="-D_GLIBCXX_USE_C99_MATH_TR1" \ --copt="-Werror=return-type" \ + --define openmp=true \ --copt="-DMACE_OBFUSCATE_LITERALS" || exit 1 } diff --git a/generate_model_code.sh b/generate_model_code.sh index 501deea7..1e48cb55 100644 --- a/generate_model_code.sh +++ b/generate_model_code.sh @@ -9,6 +9,7 @@ mkdir -p ${MODEL_CODEGEN_DIR} if [ ${DSP_MODE} ]; then DSP_MODE_FLAG="--dsp_mode=${DSP_MODE}" fi + bazel-bin/lib/python/tools/tf_converter --input=${TF_MODEL_FILE_PATH} \ --output=${MODEL_CODEGEN_DIR}/model.cc \ --input_node=${TF_INPUT_NODE} \ @@ -18,5 +19,6 @@ bazel-bin/lib/python/tools/tf_converter --input=${TF_MODEL_FILE_PATH} \ --output_type=source \ --template=${LIBMACE_SOURCE_DIR}/lib/python/tools/model.template \ --model_tag=${MODEL_TAG} \ + --input_shape=${INPUT_SHAPE} \ ${DSP_MODE_FLAG} \ --obfuscate=True || exit 1 -- GitLab