From 401002860bfeb27e5c769693cadac27f235a1418 Mon Sep 17 00:00:00 2001 From: Bin Li Date: Thu, 22 Aug 2019 17:53:35 +0800 Subject: [PATCH] Fix dynamic linking and DSP code/code --- .gitlab-ci.yml | 3 ++- mace/tools/BUILD.bazel | 1 - tools/python/encrypt.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ce199ed0..e10a2c63 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -155,7 +155,8 @@ dynamic_linking_test: DEVICE_CONF_FILE=generic-mobile-devices/devices.yml fi - if [ -z "$TARGET_SOCS" ]; then TARGET_SOCS=random; fi - - python tools/converter.py convert --config=${CONF_FILE} --target_socs=$TARGET_SOCS --model_graph_format=file --model_data_format=file --cl_mem_type=buffer + - python tools/converter.py convert --config=${CONF_FILE} --target_socs=$TARGET_SOCS --model_graph_format=file --model_data_format=file --cl_mem_type=buffer || exit 1; + - python tools/converter.py run --config=${CONF_FILE} --target_socs=$TARGET_SOCS --device_yml=${DEVICE_CONF_FILE} --round=1 --validate --model_graph_format=file --model_data_format=file --mace_lib_type=dynamic || exit 1; - rm -rf mace-models only: - triggers diff --git a/mace/tools/BUILD.bazel b/mace/tools/BUILD.bazel index 95d1f386..df620200 100644 --- a/mace/tools/BUILD.bazel +++ b/mace/tools/BUILD.bazel @@ -49,7 +49,6 @@ cc_binary( ]), linkstatic = 0, deps = [ - ":statistics", "//external:gflags_nothreads", "//mace/codegen:generated_mace_engine_factory", "//mace/codegen:generated_models", diff --git a/tools/python/encrypt.py b/tools/python/encrypt.py index 1ea78d96..79440f45 100644 --- a/tools/python/encrypt.py +++ b/tools/python/encrypt.py @@ -134,7 +134,7 @@ def save_model_to_code(namespace, model, params, model_checksum, try: device = cvt.DeviceType[device.upper()] except: # noqa - if device.upper == "DSP": + if device.upper() == "DSP": device = cvt.DeviceType.HEXAGON else: device = cvt.DeviceType.CPU @@ -145,7 +145,7 @@ def save_model_to_code(namespace, model, params, model_checksum, end=min(start + 10, op_size), net=model, tag=namespace, - device=device, + device=device.value, ) with open(output + "/op" + str(counter) + ".cc", "w") as f: f.write(source) -- GitLab