• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Description:
2#   Host-platform specific StreamExecutor support code.
3load("//tensorflow/core/platform:rules_cc.bzl", "cc_library")
4load("//tensorflow/stream_executor:build_defs.bzl", "stream_executor_friends")
5
6package(
7    default_visibility = [":friends"],
8    licenses = ["notice"],
9)
10
11package_group(
12    name = "friends",
13    packages = stream_executor_friends(),
14)
15
16cc_library(
17    name = "host_platform_id",
18    hdrs = [
19        "host_platform_id.h",
20    ],
21    deps = [
22        "//tensorflow/compiler/xla/stream_executor/host:host_platform_id",
23        "//tensorflow/stream_executor:platform",
24    ],
25)
26
27cc_library(
28    name = "host_platform",
29    hdrs = [
30        "host_platform.h",
31    ],
32    visibility = ["//visibility:public"],
33    deps = [
34        ":host_gpu_executor",
35        ":host_platform_id",
36        "//tensorflow/compiler/xla/stream_executor/host:host_platform",
37        "//tensorflow/stream_executor:executor_cache",
38        "//tensorflow/stream_executor:multi_platform_manager",
39        "//tensorflow/stream_executor:stream_executor_headers",
40        "//tensorflow/stream_executor/lib",
41        "//tensorflow/stream_executor/platform",
42        "@com_google_absl//absl/base:core_headers",
43        "@com_google_absl//absl/memory",
44        "@com_google_absl//absl/strings:str_format",
45    ],
46    alwayslink = True,  # Registers itself with the MultiPlatformManager.
47)
48
49cc_library(
50    name = "host_stream",
51    hdrs = [
52        "host_stream.h",
53    ],
54    deps = [
55        "//tensorflow/compiler/xla/stream_executor/host:host_stream",
56        "//tensorflow/core:lib_internal",
57        "//tensorflow/stream_executor:kernel",
58        "//tensorflow/stream_executor/lib",
59        "@com_google_absl//absl/synchronization",
60    ],
61)
62
63cc_library(
64    name = "host_timer",
65    hdrs = [
66        "host_timer.h",
67    ],
68    deps = [
69        "//tensorflow/compiler/xla/stream_executor/host:host_timer",
70        "//tensorflow/stream_executor:stream_executor_internal",
71        "//tensorflow/stream_executor:timer",
72        "//tensorflow/stream_executor/platform",
73    ],
74)
75
76# TODO(22689637): Rename this target.
77cc_library(
78    name = "host_gpu_executor",
79    hdrs = [
80        "host_gpu_executor.h",
81    ],
82    deps = [
83        ":host_platform_id",
84        ":host_stream",
85        ":host_timer",
86        "//tensorflow/compiler/xla/stream_executor/host:host_gpu_executor",
87        "//tensorflow/core/platform:platform_port",
88        "//tensorflow/core/platform:profile_utils_cpu_utils",
89        "//tensorflow/stream_executor:kernel",
90        "//tensorflow/stream_executor:rng",
91        "//tensorflow/stream_executor:stream",
92        "//tensorflow/stream_executor:stream_executor_internal",
93        "//tensorflow/stream_executor:stream_executor_pimpl",
94        "//tensorflow/stream_executor:timer",
95        "//tensorflow/stream_executor/lib",
96        "@com_google_absl//absl/strings",
97        "@com_google_absl//absl/synchronization",
98    ],
99    alwayslink = True,
100)
101