diff --git a/tensorflow/core/common_runtime/colocation_graph.cc b/tensorflow/core/common_runtime/colocation_graph.cc index 962db699d1f..8c364d637fe 100644 --- a/tensorflow/core/common_runtime/colocation_graph.cc +++ b/tensorflow/core/common_runtime/colocation_graph.cc @@ -702,11 +702,11 @@ Status ColocationGraph::ColocateResourceOrRefEdge(const Node* src, Status status = ColocateNodes(*src, src_root_id, *dst, dst_root_id); if (!status.ok()) { return AttachDef( - errors::InvalidArgument("Nodes were connected by a " - "reference connection (requiring them to " - "be on the same device), but the two nodes " - "were assigned two different devices: ", - status.error_message()), + errors::InvalidArgument( + "Nodes were connected by a reference or resource connection " + "(requiring them to be on the same device), but the two nodes " + "were assigned two different devices: ", + status.error_message()), *dst); } return Status::OK(); diff --git a/tensorflow/core/common_runtime/placer_test.cc b/tensorflow/core/common_runtime/placer_test.cc index e0e887e7d66..8960a91bde5 100644 --- a/tensorflow/core/common_runtime/placer_test.cc +++ b/tensorflow/core/common_runtime/placer_test.cc @@ -2972,9 +2972,9 @@ TEST_F(NestedPlacerTest, NestedTwoFunctionsBackToBack) { EXPECT_EQ(error::INVALID_ARGUMENT, s.code()) << s.ToString(); EXPECT_TRUE(absl::StrContains( s.error_message(), - "Nodes were connected by a reference connection (requiring them to be on " - "the same device), but the two nodes were assigned two different " - "devices")) + "Nodes were connected by a reference or resource connection (requiring " + "them to be on the same device), but the two nodes were assigned two " + "different devices")) << s.ToString(); }