diff options
author | gracehoney <31743510+aaroey@users.noreply.github.com> | 2018-01-26 09:49:23 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-26 09:49:23 -0800 |
commit | 7611eef0208fa1413880a704e622e57bbcfad0d6 (patch) | |
tree | 4cfbf626431c11f1f1e5219895800de7114edc03 /third_party/tensorrt/BUILD.tpl | |
parent | 9384314e0cbf6f315d870200fc5abe421deefcab (diff) | |
parent | 78021a9a70923f1fdaa65b41271ad0ea70cd7e67 (diff) |
Merge branch 'master' into tensorrt
Diffstat (limited to 'third_party/tensorrt/BUILD.tpl')
-rw-r--r-- | third_party/tensorrt/BUILD.tpl | 75 |
1 files changed, 53 insertions, 22 deletions
diff --git a/third_party/tensorrt/BUILD.tpl b/third_party/tensorrt/BUILD.tpl index a8e52d13d3..6cb7db7e90 100644 --- a/third_party/tensorrt/BUILD.tpl +++ b/third_party/tensorrt/BUILD.tpl @@ -1,38 +1,69 @@ -# -*- python -*- +# NVIDIA TensorRT +# A high-performance deep learning inference optimizer and runtime. -licenses(["notice"]) +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" - }, +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 = "tensorrt", - srcs =[%{tensorrt_lib}], - hdrs = ["include/NvInfer.h", - "include/NvUtils.h", + name = "nv_infer_plugin", + srcs = [%{nv_infer_plugin}], + data = [%{nv_infer_plugin}], + includes = [ + "include", ], copts= cuda_default_copts(), - deps =["@local_config_cuda//cuda:cuda", - "@local_config_cuda//cuda:cudnn",], + deps = [ + "@local_config_cuda//cuda:cuda", + ":nv_infer", + ":tensorrt_headers", + ], linkstatic = 1, - #include_prefix="include/", - includes=["include/"], - visibility = ["//visibility:public"], + visibility = ["//visibility:public"], ) -%{tensorrt_genrules} +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"], +) -# filegroup( -# name = "%{tensorrt_lib}", -# srcs = ["%{tensorrt_lib}"], -# visibility = ["//visibility:public"], -# ) +%{tensorrt_genrules}
\ No newline at end of file |