• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1load("//tensorflow/core/platform:rules_cc.bzl", "cc_library")
2
3package(
4    default_visibility = [
5        "//learning/brain:__subpackages__",
6        "//tensorflow/compiler/xrt:__subpackages__",
7    ],
8    licenses = ["notice"],
9)
10
11package_group(
12    name = "friends",
13    includes = [
14        "//tensorflow/compiler/tf2xla:friends",
15    ],
16)
17
18WITH_TPU_SUPPORT = "//tensorflow:with_tpu_support"
19
20DEFAULT = "//conditions:default"
21
22cc_library(
23    name = "xrt_state_ops",
24    hdrs = ["xrt_state_ops.h"],
25    visibility = [":friends"],
26    deps = [
27        "//tensorflow/compiler/tf2xla:common",
28        "//tensorflow/compiler/tf2xla:xla_compiler",
29        "//tensorflow/compiler/xla:literal",
30        "//tensorflow/compiler/xla:shape_util",
31        "//tensorflow/compiler/xla:status_macros",
32        "//tensorflow/compiler/xla:statusor",
33        "//tensorflow/compiler/xla:xla_data_proto_cc",
34        "//tensorflow/compiler/xla/client:local_client",
35        "//tensorflow/compiler/xla/service:computation_placer",
36        "//tensorflow/compiler/xrt:xrt_proto_cc",
37        "//tensorflow/compiler/xrt:xrt_utils",
38        "//tensorflow/core:core_cpu_internal",
39        "//tensorflow/core:framework",
40        "//tensorflow/core:lib",
41        "//tensorflow/core:lib_internal",
42        "//tensorflow/core:protos_all_cc",
43    ],
44    alwayslink = 1,
45)
46
47cc_library(
48    name = "xrt_tpu_ops",
49    srcs = [
50        "tpu_compile_ops.cc",
51        "tpu_execute_op.cc",
52        "tpu_state_op.cc",
53    ],
54    visibility = [":friends"],
55    deps = [
56        ":xrt_state_ops",
57        "//tensorflow/compiler/jit:xla_device_no_jit_rewrite_registration",
58        "//tensorflow/compiler/tf2xla:common",
59        "//tensorflow/compiler/tf2xla:xla_compiler",
60        "//tensorflow/compiler/xla:debug_options_flags",
61        "//tensorflow/compiler/xla:shape_util",
62        "//tensorflow/compiler/xla:status_macros",
63        "//tensorflow/compiler/xla:statusor",
64        "//tensorflow/compiler/xla:xla_data_proto_cc",
65        "//tensorflow/compiler/xla/client:client_library",
66        "//tensorflow/compiler/xla/client:compile_only_client",
67        "//tensorflow/compiler/xla/client:local_client",
68        "//tensorflow/compiler/xla/client:xla_computation",
69        "//tensorflow/compiler/xla/service:compiler",
70        "//tensorflow/compiler/xla/service:computation_placer",
71        "//tensorflow/compiler/xla/service:dump",
72        "//tensorflow/compiler/xla/service:hlo",
73        "//tensorflow/compiler/xla/service:hlo_proto_cc",
74        "//tensorflow/compiler/xrt:xrt_proto_cc",
75        "//tensorflow/compiler/xrt:xrt_tpu_utils",
76        "//tensorflow/compiler/xrt:xrt_utils",
77        "//tensorflow/core:framework",
78        "//tensorflow/core:lib",
79        "//tensorflow/core:lib_internal",
80        "//tensorflow/core:protos_all_cc",
81        "//tensorflow/core/profiler/lib:traceme",
82        "//tensorflow/core/tpu:tpu_api",
83        "//tensorflow/core/tpu:tpu_configuration",
84        "//tensorflow/core/tpu:tpu_defs",
85        "//tensorflow/core/tpu:tpu_execute",
86        "//tensorflow/core/tpu/kernels:tpu_compilation_cache_entry",
87        "//tensorflow/core/tpu/kernels:tpu_compilation_cache_interface",
88        "//tensorflow/core/tpu/kernels:tpu_compilation_cache_key",
89        "//tensorflow/core/tpu/kernels:tpu_compilation_cache_lookup",
90        "//tensorflow/core/tpu/kernels:tpu_compile_op_common",
91        "//tensorflow/core/tpu/kernels:tpu_compile_op_hdrs",
92        "//tensorflow/core/tpu/kernels:tpu_mesh_state_interface",
93        "//tensorflow/core/tpu/kernels:tpu_op_consts",
94        "//tensorflow/core/tpu/kernels:tpu_op_util",
95        "//tensorflow/core/tpu/kernels:tpu_program_group",
96        "//tensorflow/core/tpu/kernels:tpu_program_group_interface",
97        "//tensorflow/stream_executor:stream_executor_headers",
98        "@com_google_absl//absl/strings",
99    ],
100    alwayslink = 1,
101)
102
103cc_library(
104    name = "xrt_ops",
105    srcs = [
106        "xrt_compile_ops.cc",
107        "xrt_execute_op.cc",
108        "xrt_state_ops.cc",
109    ],
110    visibility = [":friends"],
111    deps = select({
112        WITH_TPU_SUPPORT: [":xrt_tpu_ops"],
113        DEFAULT: [],
114    }) + [
115        ":xrt_state_ops",
116        "@com_google_absl//absl/strings",
117        "//tensorflow/compiler/tf2xla:xla_compiler",
118        "//tensorflow/compiler/xla:literal_util",
119        "//tensorflow/compiler/xla:shape_util",
120        "//tensorflow/compiler/xla:status_macros",
121        "//tensorflow/compiler/xla:statusor",
122        "//tensorflow/compiler/xla:xla_data_proto_cc",
123        "//tensorflow/compiler/xla/client:client_library",
124        "//tensorflow/compiler/xla/client:local_client",
125        "//tensorflow/compiler/xla/client:xla_computation",
126        "//tensorflow/compiler/xla/service:compiler",
127        "//tensorflow/compiler/xla/service:computation_placer",
128        "//tensorflow/compiler/xla/service:hlo",
129        "//tensorflow/compiler/xla/service/gpu:gpu_executable_run_options",
130        "//tensorflow/compiler/xrt:xrt_compile_ops_op_lib",
131        "//tensorflow/compiler/xrt:xrt_execute_op_op_lib",
132        "//tensorflow/compiler/xrt:xrt_proto_cc",
133        "//tensorflow/compiler/xrt:xrt_state_ops_op_lib",
134        "//tensorflow/compiler/xrt:xrt_utils",
135        "//tensorflow/core:core_cpu_internal",
136        "//tensorflow/core:framework",
137        "//tensorflow/core:lib",
138        "//tensorflow/core:lib_internal",
139        "//tensorflow/core:protos_all_cc",
140        "//tensorflow/stream_executor:stream_executor_headers",
141    ],
142    alwayslink = 1,
143)
144