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

perf: Prefer GPU if input ops on different devices

上级 b742f824
......@@ -41,10 +41,10 @@ DeviceType NetOptimizer::SelectBestDevice(
}
// Greedy strategy: Use input op's device type as current op's device
for (auto device_type : inputs_op_devices) {
if (device_type != best_device) {
best_device = device_type;
if (device_type == best_device) {
return best_device;
}
}
return best_device;
return DeviceType::CPU;
}
} // namespace mace
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册