@@ -22,7 +22,6 @@ limitations under the License.
2222#include " tensorflow/c/c_api.h"
2323#include " tensorflow/c/c_api_internal.h"
2424#include " tensorflow/c/eager/c_api.h"
25- #include " tensorflow/c/eager/c_api_internal.h"
2625#include " tensorflow/core/common_runtime/eager/tensor_handle.h"
2726#include " tensorflow/core/framework/op.h"
2827#include " tensorflow/core/framework/op_kernel.h"
@@ -76,6 +75,20 @@ REGISTER_OP("JVMCallbackStateless")
7675A stateless version of `JVMCallback`.
7776)doc" );
7877
78+ struct TFE_TensorHandle {
79+ TFE_TensorHandle (const tensorflow::Tensor& t, tensorflow::Device* d,
80+ tensorflow::Device* op_device)
81+ : handle(new tensorflow::TensorHandle(t, d, op_device, nullptr )) {}
82+
83+ TFE_TensorHandle (tensorflow::uint64 node_id, tensorflow::DataType dtype,
84+ tensorflow::EagerContext* ctx)
85+ : handle(new tensorflow::TensorHandle(node_id, dtype, ctx)) {}
86+
87+ TFE_TensorHandle (tensorflow::TensorHandle* handle) : handle(handle) {}
88+
89+ tensorflow::TensorHandle* handle;
90+ };
91+
7992namespace {
8093 // Given the 'call', prepares the inputs as a JNI long array that is appropriate for calling the registry.
8194 jlongArray MakeInputs (JVMCall* call) {
0 commit comments