• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Experimental SavedModel C APIs for TensorFlow.
2# See RFC https://github.com/tensorflow/community/pull/207
3# All headers are on the public surface of Tensorflow's C API.
4# Once moved out of experimental, these will be stable.
5# The idea behind a separate public/ directory is to make apparent
6# which headers are part of TF's public interface (and which headers)
7# are implementation details. This structure allows us to also perform future
8# programmatic checks that all "public" headers only include other "public"
9# headers.
10
11load("//tensorflow/core/platform:rules_cc.bzl", "cc_library")
12
13package(
14    # This is intentionally public
15    default_visibility = [
16        "//visibility:public",
17    ],
18    licenses = ["notice"],
19)
20
21# TODO(bmzhao): Remove these exports_files and rules, swap with cc_public_library instead.
22# cc_public_library would allows us to separate the header dep graph from header+srcs dep graph.
23exports_files(
24    [
25        "concrete_function.h",
26        "concrete_function_list.h",
27        "function_metadata.h",
28        "saved_model_api.h",
29        "signature_def_function.h",
30        "signature_def_function_metadata.h",
31        "signature_def_param.h",
32        "signature_def_param_list.h",
33        "tensor_spec.h",
34    ],
35    visibility = ["//tensorflow/c/experimental/saved_model/internal:__pkg__"],
36)
37
38# The purpose of this header is to provide insulation against
39# future changes where we rename/move a public header, without
40# forcing all clients to change their "#includes".
41cc_library(
42    name = "c_saved_model_api",
43    hdrs = ["c_saved_model_api.h"],
44    deps = [
45        ":concrete_function",
46        ":concrete_function_list",
47        ":function_metadata",
48        ":saved_model_api",
49        ":signature_def_function",
50        ":signature_def_function_metadata",
51        ":signature_def_param",
52        ":signature_def_param_list",
53        ":tensor_spec",
54    ],
55)
56
57alias(
58    name = "concrete_function",
59    actual = "//tensorflow/c/experimental/saved_model/internal:concrete_function",
60)
61
62alias(
63    name = "concrete_function_list",
64    actual = "//tensorflow/c/experimental/saved_model/internal:concrete_function_list",
65)
66
67alias(
68    name = "function_metadata",
69    actual = "//tensorflow/c/experimental/saved_model/internal:function_metadata",
70)
71
72alias(
73    name = "saved_model_api",
74    actual = "//tensorflow/c/experimental/saved_model/internal:saved_model_api",
75)
76
77alias(
78    name = "signature_def_function",
79    actual = "//tensorflow/c/experimental/saved_model/internal:signature_def_function",
80)
81
82alias(
83    name = "signature_def_function_metadata",
84    actual = "//tensorflow/c/experimental/saved_model/internal:signature_def_function_metadata",
85)
86
87alias(
88    name = "signature_def_param",
89    actual = "//tensorflow/c/experimental/saved_model/internal:signature_def_param",
90)
91
92alias(
93    name = "signature_def_param_list",
94    actual = "//tensorflow/c/experimental/saved_model/internal:signature_def_param_list",
95)
96
97alias(
98    name = "tensor_spec",
99    actual = "//tensorflow/c/experimental/saved_model/internal:tensor_spec",
100)
101