aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/common_runtime/function_test.cc
diff options
context:
space:
mode:
authorGravatar James Qin <jamesqin@google.com>2018-01-05 14:55:24 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-01-05 14:58:51 -0800
commitcc94f3888eb008fd78a2d95e30ecf76fbce0e0af (patch)
treecc126be226c801b8fc374b5ff4050deace0c098d /tensorflow/core/common_runtime/function_test.cc
parentc152d4bbac33d9dc10f7278226aaeb42fce799b5 (diff)
Automated g4 rollback of changelist 180848930
PiperOrigin-RevId: 180979141
Diffstat (limited to 'tensorflow/core/common_runtime/function_test.cc')
-rw-r--r--tensorflow/core/common_runtime/function_test.cc16
1 files changed, 7 insertions, 9 deletions
diff --git a/tensorflow/core/common_runtime/function_test.cc b/tensorflow/core/common_runtime/function_test.cc
index 2dacacea7b..d4181ff48c 100644
--- a/tensorflow/core/common_runtime/function_test.cc
+++ b/tensorflow/core/common_runtime/function_test.cc
@@ -191,14 +191,11 @@ class FunctionLibraryRuntimeTest : public ::testing::Test {
Status Instantiate(FunctionLibraryRuntime* flr, const string& name,
test::function::Attrs attrs,
FunctionLibraryRuntime::Handle* handle) {
- return flr->Instantiate(name, attrs, handle);
- }
-
- Status Instantiate(FunctionLibraryRuntime* flr, const string& name,
- test::function::Attrs attrs,
- const FunctionLibraryRuntime::InstantiateOptions& options,
- FunctionLibraryRuntime::Handle* handle) {
- return flr->Instantiate(name, attrs, options, handle);
+ Status status = flr->Instantiate(name, attrs, handle);
+ if (!status.ok()) {
+ return status;
+ }
+ return Status::OK();
}
Status InstantiateAndRun(FunctionLibraryRuntime* flr, const string& name,
@@ -1091,7 +1088,8 @@ TEST_F(FunctionLibraryRuntimeTest, Gradient_AddSum) {
TEST_F(FunctionLibraryRuntimeTest, CrossDevice) {
Init({test::function::FindDevice()});
FunctionLibraryRuntime::Handle handle;
- TF_CHECK_OK(Instantiate(flr0_, "FindDevice", {}, {"/device:CPU:1"}, &handle));
+ TF_CHECK_OK(Instantiate(flr0_, "FindDevice", {{"_target", "/device:CPU:1"}},
+ &handle));
Tensor y;
FunctionLibraryRuntime::Options opts;