提交 e521438f 编写于 作者: N Niuwei

bugfix:...

bugfix: 修复使用benchmark命令是,传入的device是cpu+gpu,而mace的某些方法只能检测cpu或者gpu这种形式(而不是cpu+gpu),因此需要将cpu和gpu分开加入到runtime_list中,否则无法执行GPU
上级 aca4c5e2
...@@ -842,7 +842,7 @@ class DeviceWrapper: ...@@ -842,7 +842,7 @@ class DeviceWrapper:
if target_abi == ABIType.host: if target_abi == ABIType.host:
runtime_list.append(RuntimeType.cpu) runtime_list.append(RuntimeType.cpu)
elif model_runtime == RuntimeType.cpu_gpu: elif model_runtime == RuntimeType.cpu_gpu:
runtime_list.extend([RuntimeType.cpu, RuntimeType.cpu_gpu]) runtime_list.extend([RuntimeType.cpu, RuntimeType.gpu])
else: else:
runtime_list.append(model_runtime) runtime_list.append(model_runtime)
for runtime in runtime_list: for runtime in runtime_list:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册