From 102e0de242eccb2ac4664761183a7771b0a7c7af Mon Sep 17 00:00:00 2001 From: Mingsheng Hong Date: Tue, 4 Sep 2018 09:41:42 -0700 Subject: Added a new eager C API TFE_NewContextFromSession(), where TFE_NewContext will get an owned device mgr from the input session. One use case is in S4TF, we run a graph session to enqueue a tensor into a fifo queue, and then call TFE_Execute() on a dequeue op over the same queue, as a way to transfer a tensor from TF to host (tensor tranfer in the other direction also works). To make this work, we need TFE_Context and the the TF_Session to use the same ResourceMgr object (attached to a Device, which is in turn owned by DeviceMgr), so that both can access the fifo queue resource op. PiperOrigin-RevId: 211471075 --- tensorflow/c/BUILD | 1 + 1 file changed, 1 insertion(+) (limited to 'tensorflow/c/BUILD') diff --git a/tensorflow/c/BUILD b/tensorflow/c/BUILD index 2c3a877edf..109b3b37aa 100644 --- a/tensorflow/c/BUILD +++ b/tensorflow/c/BUILD @@ -117,6 +117,7 @@ tf_cuda_library( deps = [ ":c_api", ":c_api_internal", + "//tensorflow/c/eager:c_api", "//tensorflow/compiler/jit/legacy_flags:mark_for_compilation_pass_flags", "//tensorflow/contrib/tpu:all_ops", "//tensorflow/core:core_cpu", -- cgit v1.2.3