Commit 62d8ba37 authored by 卢旭辉's avatar 卢旭辉
Browse files

Merge branch 'perf' into 'master'

perf: Prefer GPU if input ops on different devices

See merge request applied-machine-learning/sysml/mace!1297
parents b742f824 bd262fba
Showing with 3 additions and 3 deletions
+3 -3
......@@ -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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment