提交 612f3d4e 编写于 作者: 叶剑武

Merge branch 'fix-asan' into 'master'

Fix the setting of address_sanitizer.

See merge request !810
...@@ -11,6 +11,8 @@ mace { ...@@ -11,6 +11,8 @@ mace {
# api for static library of models # api for static library of models
*mace*logging*LogMessage*; *mace*logging*LogMessage*;
*mace*NetDef*; *mace*NetDef*;
*mace*MemoryType*;
*mace*DataType*;
*mace*MemoryArena*; *mace*MemoryArena*;
*mace*InputInfo*; *mace*InputInfo*;
*mace*OutputInfo*; *mace*OutputInfo*;
......
...@@ -977,7 +977,8 @@ def build_quantize_stat(configs): ...@@ -977,7 +977,8 @@ def build_quantize_stat(configs):
build_tmp_binary_dir) build_tmp_binary_dir)
def build_example(configs, target_abi, enable_openmp, mace_lib_type): def build_example(configs, target_abi, enable_openmp, address_sanitizer,
mace_lib_type):
library_name = configs[YAMLKeyword.library_name] library_name = configs[YAMLKeyword.library_name]
hexagon_mode = get_hexagon_mode(configs) hexagon_mode = get_hexagon_mode(configs)
...@@ -997,6 +998,7 @@ def build_example(configs, target_abi, enable_openmp, mace_lib_type): ...@@ -997,6 +998,7 @@ def build_example(configs, target_abi, enable_openmp, mace_lib_type):
enable_openmp=enable_openmp, enable_openmp=enable_openmp,
enable_opencl=get_opencl_mode(configs), enable_opencl=get_opencl_mode(configs),
hexagon_mode=hexagon_mode, hexagon_mode=hexagon_mode,
address_sanitizer=address_sanitizer,
symbol_hidden=symbol_hidden) symbol_hidden=symbol_hidden)
if os.path.exists(LIB_CODEGEN_DIR): if os.path.exists(LIB_CODEGEN_DIR):
...@@ -1025,6 +1027,7 @@ def build_example(configs, target_abi, enable_openmp, mace_lib_type): ...@@ -1025,6 +1027,7 @@ def build_example(configs, target_abi, enable_openmp, mace_lib_type):
enable_openmp=enable_openmp, enable_openmp=enable_openmp,
enable_opencl=get_opencl_mode(configs), enable_opencl=get_opencl_mode(configs),
hexagon_mode=hexagon_mode, hexagon_mode=hexagon_mode,
address_sanitizer=address_sanitizer,
extra_args=build_arg) extra_args=build_arg)
target_bin = "/".join(sh_commands.bazel_target_to_bin(example_target)) target_bin = "/".join(sh_commands.bazel_target_to_bin(example_target))
...@@ -1395,6 +1398,7 @@ def run_mace(flags): ...@@ -1395,6 +1398,7 @@ def run_mace(flags):
if flags.example: if flags.example:
build_example(configs, target_abi, build_example(configs, target_abi,
not flags.disable_openmp, not flags.disable_openmp,
flags.address_sanitizer,
flags.mace_lib_type) flags.mace_lib_type)
else: else:
build_mace_run(configs, target_abi, build_mace_run(configs, target_abi,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册