Temporarily revert the WaitReady change for handles with unknown devices.

PiperOrigin-RevId: 326750064
Change-Id: Iccd79411c595b78ec1b8d2a47c3cf6fd80552b18
diff --git a/tensorflow/c/eager/c_api_remote_function_test.cc b/tensorflow/c/eager/c_api_remote_function_test.cc
index a9bbd5b..52488e6 100644
--- a/tensorflow/c/eager/c_api_remote_function_test.cc
+++ b/tensorflow/c/eager/c_api_remote_function_test.cc
@@ -30,12 +30,13 @@
   TestRemoteExecuteSilentCopiesFunc(/*async=*/true, /*remote=*/true,
                                     /*heavy_load_on_streaming_rpc=*/false);
 }
-TEST(CAPI, RemoteExecuteSilentCopiesFuncRemoteOutputs) {
+// TODO(b/164506563): Re-enable after the fix.
+TEST(CAPI, DISABLED_RemoteExecuteSilentCopiesFuncRemoteOutputs) {
   TestRemoteExecuteSilentCopiesFunc(/*async=*/false, /*remote=*/true,
                                     /*heavy_load_on_streaming_rpc=*/false,
                                     /*remote_func_outputs=*/true);
 }
-TEST(CAPI, RemoteExecuteSilentCopiesAsyncFuncRemoteOutputs) {
+TEST(CAPI, DISABLED_RemoteExecuteSilentCopiesAsyncFuncRemoteOutputs) {
   TestRemoteExecuteSilentCopiesFunc(/*async=*/true, /*remote=*/true,
                                     /*heavy_load_on_streaming_rpc=*/false,
                                     /*remote_func_outputs=*/true);
diff --git a/tensorflow/core/common_runtime/eager/tensor_handle.cc b/tensorflow/core/common_runtime/eager/tensor_handle.cc
index 620685e..adf1b55 100644
--- a/tensorflow/core/common_runtime/eager/tensor_handle.cc
+++ b/tensorflow/core/common_runtime/eager/tensor_handle.cc
@@ -539,13 +539,14 @@
 }
 
 Status TensorHandle::WaitUnknownDevice() const {
-  if (unknown_device_) {
-    TF_RETURN_IF_ERROR(absl::visit(
-        [](auto& data) {
-          return data.WaitReady("TensorHandle::UnknownDevice");
-        },
-        data_));
-  }
+  // TODO(b/164506563): uncomment this when b/164506563 is fixed.
+  // if (unknown_device_) {
+  //   TF_RETURN_IF_ERROR(absl::visit(
+  //       [](auto& data) {
+  //         return data.WaitReady("TensorHandle::UnknownDevice");
+  //       },
+  //       data_));
+  // }
   return Status::OK();
 }