Eager API inclusion to the dynamic library build target ()

* Exposed and included the eager tensor execution C API to the TensorFlow dynamic library.

* Updated BUILD to fix the sorting issue.
This commit is contained in:
Anthony Platanios 2017-08-21 17:10:49 -04:00 committed by Jonathan Hseu
parent d4ce3b4681
commit 71aa4e65ef
3 changed files with 50 additions and 29 deletions

View File

@ -473,6 +473,7 @@ cc_binary(
"//tensorflow/c:c_api",
"//tensorflow/c:exported_symbols.lds",
"//tensorflow/c:version_script.lds",
"//tensorflow/c/eager:c_api",
"//tensorflow/core:tensorflow",
],
)
@ -482,6 +483,7 @@ cc_binary(
linkshared = 1,
deps = [
"//tensorflow/c:c_api",
"//tensorflow/c/eager:c_api",
"//tensorflow/cc:cc_ops",
"//tensorflow/cc:client_session",
"//tensorflow/cc:scope",

View File

@ -1,28 +1,39 @@
# Experimental extensions to the C API for eager execution of kernels.
licenses(["notice"]) # Apache 2.0
cc_library(
load(
"//tensorflow:tensorflow.bzl",
"tf_cc_test",
"tf_copts",
"tf_cuda_library",
)
tf_cuda_library(
name = "c_api",
srcs = ["c_api.cc"],
hdrs = ["c_api.h"],
visibility = [
"//tensorflow:internal",
"//tensorflow/python/eager:__pkg__",
],
deps = [
":runtime",
"//tensorflow/c:c_api",
"//tensorflow/c:c_api_internal",
"//tensorflow/core:core_cpu_internal",
"//tensorflow/core:framework",
"//tensorflow/core:framework_internal",
"//tensorflow/core:lib",
"//tensorflow/core:lib_internal",
"//tensorflow/core:protos_all_cc",
],
copts = tf_copts(),
visibility = ["//visibility:public"],
deps = select({
"//tensorflow:android": [
":c_api_internal",
"//tensorflow/core:android_tensorflow_lib_lite",
],
"//conditions:default": [
":runtime",
"//tensorflow/c:c_api",
"//tensorflow/c:c_api_internal",
"//tensorflow/core:core_cpu_internal",
"//tensorflow/core:framework",
"//tensorflow/core:framework_internal",
"//tensorflow/core:lib",
"//tensorflow/core:lib_internal",
"//tensorflow/core:protos_all_cc",
],
}),
)
cc_test(
tf_cc_test(
name = "c_api_test",
srcs = ["c_api_test.cc"],
deps = [
@ -34,24 +45,31 @@ cc_test(
],
)
cc_library(
tf_cuda_library(
name = "runtime",
srcs = ["runtime.cc"],
hdrs = ["runtime.h"],
copts = tf_copts(),
visibility = ["//tensorflow:internal"],
deps = [
"//tensorflow/c:c_api",
"//tensorflow/core:core_cpu",
"//tensorflow/core:core_cpu_internal",
"//tensorflow/core:framework",
"//tensorflow/core:framework_internal",
"//tensorflow/core:lib",
"//tensorflow/core:lib_internal",
"//tensorflow/core:protos_all_cc",
],
deps = select({
"//tensorflow:android": [
":c_api_internal",
"//tensorflow/core:android_tensorflow_lib_lite",
],
"//conditions:default": [
"//tensorflow/c:c_api",
"//tensorflow/core:core_cpu",
"//tensorflow/core:core_cpu_internal",
"//tensorflow/core:framework",
"//tensorflow/core:framework_internal",
"//tensorflow/core:lib",
"//tensorflow/core:lib_internal",
"//tensorflow/core:protos_all_cc",
],
}),
)
cc_test(
tf_cc_test(
name = "runtime_test",
srcs = ["runtime_test.cc"],
deps = [

View File

@ -1 +1,2 @@
_TF_*
_TFE_*