提交 6efb1870 编写于 作者: 李寅

Merge branch 'dynamic' into 'master'

Fix dynamic linking and DSP code/code

See merge request !1184
......@@ -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
......@@ -49,7 +49,6 @@ cc_binary(
]),
linkstatic = 0,
deps = [
":statistics",
"//external:gflags_nothreads",
"//mace/codegen:generated_mace_engine_factory",
"//mace/codegen:generated_models",
......
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册