Change device string in RecvNodeDescriptor in VirtualScheduler from const

reference to const as the RecvNodeDescriptor (and cached_recv_nodes map)
outlives device string from the NodeDef.

PiperOrigin-RevId: 165748244
This commit is contained in:
A. Unique TensorFlower 2017-08-18 13:55:36 -07:00 committed by TensorFlower Gardener
parent 57b0276cf9
commit 65f87c967c

View File

@ -62,7 +62,7 @@ Costs CombineCosts(const Costs& left, const Costs& right) {
struct RecvNodeDescriptor {
const NodeDef* node;
const int port_num;
const string& device;
const string device;
RecvNodeDescriptor(const NodeDef* node_, const int port_num_,
const string& device_)