1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
# Description:
# Tensor bundle: a module to efficiently serialize and deserialize tensors.
package(
default_visibility = ["//visibility:public"],
)
licenses(["notice"]) # Apache 2.0
load(
"//tensorflow:tensorflow.bzl",
"cc_header_only_library",
"if_not_windows",
"tf_copts",
"tf_cc_test",
)
# To be exported to tensorflow/core:mobile_srcs.
filegroup(
name = "mobile_srcs",
srcs = [
"naming.cc",
"naming.h",
"tensor_bundle.cc",
"tensor_bundle.h",
],
)
alias(
name = "android_srcs",
actual = ":mobile_srcs",
)
cc_library(
name = "tensor_bundle",
srcs = ["tensor_bundle.cc"],
hdrs = ["tensor_bundle.h"],
copts = tf_copts() + if_not_windows(["-Wno-sign-compare"]),
deps = [
":naming",
"//tensorflow/core:core_cpu_lib",
"//tensorflow/core:framework",
"//tensorflow/core:framework_internal",
"//tensorflow/core:lib",
"//tensorflow/core:lib_internal",
"//tensorflow/core:proto_text",
"//tensorflow/core:protos_all_cc",
],
)
cc_header_only_library(
name = "tensor_bundle_headers_lib",
features = ["-parse_headers"], # Transitively pulls in Eigen headers
deps = [":tensor_bundle"],
)
cc_library(
name = "naming",
srcs = ["naming.cc"],
hdrs = ["naming.h"],
deps = ["//tensorflow/core:lib"],
)
tf_cc_test(
name = "tensor_bundle_test",
srcs = ["tensor_bundle_test.cc"],
deps = [
":tensor_bundle",
"//tensorflow/core:framework",
"//tensorflow/core:lib",
"//tensorflow/core:lib_internal",
"//tensorflow/core:protos_all_cc",
"//tensorflow/core:tensor_testutil",
"//tensorflow/core:test",
"//tensorflow/core:test_main",
],
)
# -----------------------------------------------------------------------------
# Google-internal targets. These must be at the end for syncrepo.
filegroup(
name = "all_files",
srcs = glob(
["**/*"],
exclude = [
"**/METADATA",
"**/OWNERS",
],
),
visibility = ["//tensorflow:__subpackages__"],
)
|