diff --git a/tensorflow/core/grappler/costs/virtual_placer.cc b/tensorflow/core/grappler/costs/virtual_placer.cc index a2d463e7652..a3dfb278e2a 100644 --- a/tensorflow/core/grappler/costs/virtual_placer.cc +++ b/tensorflow/core/grappler/costs/virtual_placer.cc @@ -40,8 +40,8 @@ VirtualPlacer::VirtualPlacer(const Cluster* cluster) { for (const auto& device : devices_) { if (str_util::Lowercase(device.first).find("gpu") != string::npos) { default_device_ = device.first; + break; } - break; } } }