aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/tensorrt/BUILD.tpl
blob: 6cb7db7e908f198d043028951ae5d4fa92c0d134 (plain)
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
# NVIDIA TensorRT
# A high-performance deep learning inference optimizer and runtime.

licenses(["notice"])

exports_files(["LICENSE"])

load("@local_config_cuda//cuda:build_defs.bzl", "cuda_default_copts", "if_cuda")

package(default_visibility = ["//visibility:public"])

cc_library(
    name = "tensorrt_headers",
    hdrs = [%{tensorrt_headers}],
    includes = [
        "include",
    ],
    visibility = ["//visibility:public"],
)

cc_library(
    name = "nv_infer",
    srcs = [%{nv_infer}],
    data = [%{nv_infer}],
    includes = [
        "include",
    ],
    copts= cuda_default_copts(),
    deps = [
        "@local_config_cuda//cuda:cuda",
        ":tensorrt_headers",
    ],
    linkstatic = 1,
    visibility = ["//visibility:public"],
)

cc_library(
    name = "nv_infer_plugin",
    srcs = [%{nv_infer_plugin}],
    data = [%{nv_infer_plugin}],
    includes = [
        "include",
    ],
    copts= cuda_default_copts(),
    deps = [
        "@local_config_cuda//cuda:cuda",
        ":nv_infer",
        ":tensorrt_headers",
    ],
    linkstatic = 1,
    visibility = ["//visibility:public"],
)

cc_library(
    name = "nv_parsers",
    srcs = [%{nv_parsers}],
    data = [%{nv_parsers}],
    includes = [
        "include",
    ],
    copts= cuda_default_copts(),
    deps = [
        ":tensorrt_headers",
    ],
    linkstatic = 1,
    visibility = ["//visibility:public"],
)

%{tensorrt_genrules}