Skip to content

Commit

Permalink
Make inlined functions inherit device.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 158567875
  • Loading branch information
tensorflower-gardener committed Jun 9, 2017
1 parent f80fd0f commit d4ae391
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tensorflow/core/common_runtime/function.cc
Original file line number Diff line number Diff line change
Expand Up @@ -850,6 +850,7 @@ void InlineFunctionBody(const FunctionLibraryDefinition& flib_def, Graph* g,
for (Node* n : fbody->graph->op_nodes()) {
NodeDef ndef = n->def();
ndef.set_name(strings::StrCat(caller->name(), "/", ndef.name()));
ndef.set_device(caller->def().device());
Node* clone = g->AddNode(ndef, &s);
TF_CHECK_OK(s);
node_map[n->id()] = clone;
Expand Down

0 comments on commit d4ae391

Please sign in to comment.