Turns eager device placement on by default.
authorAlexandre Passos <apassos@google.com>
Thu, 29 Mar 2018 20:35:34 +0000 (13:35 -0700)
committerTensorFlower Gardener <gardener@tensorflow.org>
Thu, 29 Mar 2018 20:38:24 +0000 (13:38 -0700)
commitc6911faaf4702096064542790d8c9e8e6f938d52
tree3a0349eaf30a69315c972c3be57bf5d44abd34f8
parent9d1d379bcdd19d496fd8d2659c21a5510e045c5a
Turns eager device placement on by default.

Change the device policy to have silent copies, which are logged when
RunMetadata tracking is enabled.

In the process, changed TensorHandle to always keep its context around if
it gets one. Changed TFE_TensorHandleResolve to, if necessary, copy to the
CPU (since the user has no control as to whether this copy is needed by
default).

PiperOrigin-RevId: 190978086
14 files changed:
tensorflow/c/eager/c_api.cc
tensorflow/c/eager/c_api.h
tensorflow/c/eager/c_api_internal.h
tensorflow/c/eager/c_api_test.cc
tensorflow/core/common_runtime/eager/context.cc
tensorflow/core/common_runtime/eager/context.h
tensorflow/core/common_runtime/eager/execute.cc
tensorflow/core/common_runtime/eager/tensor_handle.cc
tensorflow/core/common_runtime/eager/tensor_handle.h
tensorflow/core/kernels/function_ops.cc
tensorflow/python/eager/core_test.py
tensorflow/python/eager/function_test.py
tensorflow/python/kernel_tests/BUILD
tensorflow/python/kernel_tests/resource_variable_ops_test.py