提交 40100286 编写于 作者: B Bin Li

Fix dynamic linking and DSP code/code

上级 ef686ee9
...@@ -155,7 +155,8 @@ dynamic_linking_test: ...@@ -155,7 +155,8 @@ dynamic_linking_test:
DEVICE_CONF_FILE=generic-mobile-devices/devices.yml DEVICE_CONF_FILE=generic-mobile-devices/devices.yml
fi fi
- if [ -z "$TARGET_SOCS" ]; then TARGET_SOCS=random; 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 - rm -rf mace-models
only: only:
- triggers - triggers
...@@ -49,7 +49,6 @@ cc_binary( ...@@ -49,7 +49,6 @@ cc_binary(
]), ]),
linkstatic = 0, linkstatic = 0,
deps = [ deps = [
":statistics",
"//external:gflags_nothreads", "//external:gflags_nothreads",
"//mace/codegen:generated_mace_engine_factory", "//mace/codegen:generated_mace_engine_factory",
"//mace/codegen:generated_models", "//mace/codegen:generated_models",
......
...@@ -134,7 +134,7 @@ def save_model_to_code(namespace, model, params, model_checksum, ...@@ -134,7 +134,7 @@ def save_model_to_code(namespace, model, params, model_checksum,
try: try:
device = cvt.DeviceType[device.upper()] device = cvt.DeviceType[device.upper()]
except: # noqa except: # noqa
if device.upper == "DSP": if device.upper() == "DSP":
device = cvt.DeviceType.HEXAGON device = cvt.DeviceType.HEXAGON
else: else:
device = cvt.DeviceType.CPU device = cvt.DeviceType.CPU
...@@ -145,7 +145,7 @@ def save_model_to_code(namespace, model, params, model_checksum, ...@@ -145,7 +145,7 @@ def save_model_to_code(namespace, model, params, model_checksum,
end=min(start + 10, op_size), end=min(start + 10, op_size),
net=model, net=model,
tag=namespace, tag=namespace,
device=device, device=device.value,
) )
with open(output + "/op" + str(counter) + ".cc", "w") as f: with open(output + "/op" + str(counter) + ".cc", "w") as f:
f.write(source) f.write(source)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册