aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/tensorrt/BUILD.tpl
blob: 8962751f56fab68e2308617abc5a1f97c3b7f7a2 (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
# -*- python -*-
# Description:
#   provide tensorrt information

#TODO(Sami) these needs to be defined 

licenses(["notice"])  

exports_files(["LICENSE"])

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

config_setting(
    name = "trt_enabled",
    define_values = {
        "using_tensorrt":"true"
    },
    visibility = ["//visibility:public"],
)

cc_library(
    name = "tensorrt",
    srcs =[%{tensorrt_lib}],
    hdrs = ["include/NvInfer.h",
            "include/NvUtils.h",
    ],
    copts= cuda_default_copts(),
    deps =["@local_config_cuda//cuda:cuda",
	   "@local_config_cuda//cuda:cudnn",],
    linkstatic = 1,
    #include_prefix="include/",
    includes=["include/"],
    visibility = ["//visibility:public"],	
)

%{tensorrt_genrules}

# filegroup(
#     name = "%{tensorrt_lib}",
#     srcs =  ["%{tensorrt_lib}"],
#     visibility = ["//visibility:public"],
# )