diff options
author | 2018-03-23 19:24:04 -0700 | |
---|---|---|
committer | 2018-03-25 04:53:24 -0700 | |
commit | 759e9f874eb0af7902a586e0efcaf53463816c23 (patch) | |
tree | ade741033006fe16c8f0602c63aa8e3b8c60dc3a /tensorflow/c/eager | |
parent | 753f99afcd6b814781e19ae44afc6195ff68685d (diff) |
Fix loop variable type and status propagation
PiperOrigin-RevId: 190308776
Diffstat (limited to 'tensorflow/c/eager')
-rw-r--r-- | tensorflow/c/eager/c_api.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tensorflow/c/eager/c_api.cc b/tensorflow/c/eager/c_api.cc index c69635d529..eaeb2fd07a 100644 --- a/tensorflow/c/eager/c_api.cc +++ b/tensorflow/c/eager/c_api.cc @@ -837,7 +837,7 @@ const tensorflow::FunctionDef* OpToFunction( } VLOG(1) << "Fixed Output names and all types: " << fdef.DebugString(); - ctx->context.AddFunctionDef(fdef); + status->status = ctx->context.AddFunctionDef(fdef); if (!status->status.ok()) return nullptr; const auto ret = ctx->context.FindFunctionDef(signature->name()); DCHECK(ret != nullptr); @@ -885,7 +885,7 @@ std::unique_ptr<TFE_Op> BuildXlaLaunch(TFE_Op* op, TF_Status* status) { // Since input param reordering may have occurred between `op` and `launch_op` // via `op_input_to_func_input`, adjust the actual inputs accordingly. launch_op->inputs = op->inputs; - for (TFE_TensorHandle* h : launch_op->inputs) { + for (tensorflow::TensorHandle* h : launch_op->inputs) { h->Ref(); } if (!op_input_to_func_input.empty()) { |