Skip to content

Commit

Permalink
Merge pull request tensorflow#18746 from yifeif/branch_193740595
Browse files Browse the repository at this point in the history
Branch 193740595
  • Loading branch information
yifeif authored Apr 23, 2018
2 parents 540ac23 + e5cfbd0 commit f318765
Show file tree
Hide file tree
Showing 120 changed files with 4,357 additions and 1,623 deletions.
3 changes: 2 additions & 1 deletion tensorflow/c/eager/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ tf_cuda_library(
"//tensorflow/core/common_runtime/eager:context",
"//tensorflow/core/common_runtime/eager:eager_executor",
"//tensorflow/core/common_runtime/eager:execute",
"//tensorflow/core/common_runtime/eager:execute_node",
"//tensorflow/core/common_runtime/eager:kernel_and_device",
"//tensorflow/core/common_runtime/eager:tensor_handle",
"//tensorflow/core/common_runtime/eager:copy_to_device_node",
Expand All @@ -51,6 +50,7 @@ tf_cuda_library(
],
"//conditions:default": [],
}) + [
"//tensorflow/core/common_runtime/eager:eager_operation",
"//tensorflow/core:gpu_runtime",
],
)
Expand All @@ -73,6 +73,7 @@ tf_cuda_library(
"//tensorflow/core:lib_internal",
"//tensorflow/core/common_runtime/eager:context",
"//tensorflow/core/common_runtime/eager:eager_executor",
"//tensorflow/core/common_runtime/eager:eager_operation",
"//tensorflow/core/common_runtime/eager:kernel_and_device",
"//tensorflow/core/common_runtime/eager:tensor_handle",
],
Expand Down
603 changes: 42 additions & 561 deletions tensorflow/c/eager/c_api.cc

Large diffs are not rendered by default.

16 changes: 3 additions & 13 deletions tensorflow/c/eager/c_api_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ limitations under the License.
#include "tensorflow/core/common_runtime/device_factory.h"
#include "tensorflow/core/common_runtime/eager/context.h"
#include "tensorflow/core/common_runtime/eager/eager_executor.h"
#include "tensorflow/core/common_runtime/eager/eager_operation.h"
#include "tensorflow/core/common_runtime/eager/kernel_and_device.h"
#include "tensorflow/core/common_runtime/eager/tensor_handle.h"
#include "tensorflow/core/common_runtime/function.h"
Expand All @@ -45,7 +46,6 @@ limitations under the License.
#include "tensorflow/core/platform/thread_annotations.h"
#include "tensorflow/core/public/version.h"


struct TFE_ContextOptions {
TF_SessionOptions session_options;
// true if async execution is enabled.
Expand Down Expand Up @@ -85,19 +85,9 @@ struct TFE_Op {
// t is NULL iff the TFE_Op corresponds to a TensorFlow function instead of a
// primitive operation.
TFE_Op(TFE_Context* ctx, const char* op, const tensorflow::AttrTypeMap* t)
: ctx(ctx), name(op), attrs(op), attr_types(t), device(nullptr) {}

~TFE_Op();

bool const is_function() const { return attr_types == nullptr; }
: operation(&ctx->context, op, t) {}

TFE_Context* ctx; // Must outlive the TFE_Op.
const tensorflow::string name;
tensorflow::AttrBuilder attrs;
const tensorflow::AttrTypeMap* attr_types;
tensorflow::gtl::InlinedVector<tensorflow::TensorHandle*, 4> inputs;
tensorflow::Device* device;
bool use_xla = false;
tensorflow::EagerOperation operation;
};

namespace tensorflow {
Expand Down
Loading

0 comments on commit f318765

Please sign in to comment.