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

View File

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

View File

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