BUILD 2.3 KB
Newer Older
1
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")
2 3 4 5 6 7 8 9 10 11 12
load("//tools:cpplint.bzl", "cpplint")
load("//tools:cuda_library.bzl", "cuda_library")

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

licenses(["notice"])

cc_library(
    name = "perception_inference_tensorrt_plugins",
    srcs = [
        ":perception_inference_tensorrt_plugins_argmax_cuda",
K
KaWaiTsoiBaidu 已提交
13
        ":perception_inference_tensorrt_plugins_leakyrelu_cuda",
A
Aaron Xiao 已提交
14
        ":perception_inference_tensorrt_plugins_slice_cuda",
15 16 17 18 19 20 21 22 23 24
        ":perception_inference_tensorrt_plugins_softmax_cuda",
    ],
    hdrs = glob([
        "*.h",
    ]),
    linkstatic = True,
)

cuda_library(
    name = "perception_inference_tensorrt_plugins_slice_cuda",
25 26
    srcs = ["slice_plugin.cu"],
    hdrs = ["slice_plugin.h"],
27 28 29 30 31 32 33 34 35 36
    deps = [
        "//modules/perception/inference/tensorrt:rt_common",
        "@cuda",
        "@eigen",
        "@tensorrt",
    ],
)

cuda_library(
    name = "perception_inference_tensorrt_plugins_argmax_cuda",
37 38
    srcs = ["argmax_plugin.cu"],
    hdrs = ["argmax_plugin.h"],
39 40 41 42 43 44 45 46 47 48
    deps = [
        "//modules/perception/inference/tensorrt:rt_common",
        "@cuda",
        "@eigen",
        "@tensorrt",
    ],
)

cuda_library(
    name = "perception_inference_tensorrt_plugins_softmax_cuda",
49 50
    srcs = ["softmax_plugin.cu"],
    hdrs = ["softmax_plugin.h"],
51 52 53 54 55 56 57 58
    deps = [
        "//modules/perception/inference/tensorrt:rt_common",
        "@cuda",
        "@eigen",
        "@tensorrt",
    ],
)

59 60
cuda_library(
    name = "perception_inference_tensorrt_plugins_leakyrelu_cuda",
61 62
    srcs = ["leakyReLU_plugin.cu"],
    hdrs = ["leakyReLU_plugin.h"],
63 64 65 66 67 68 69
    deps = [
        "//modules/perception/inference/tensorrt:rt_common",
        "@cuda",
        "@eigen",
        "@tensorrt",
    ],
)
K
KaWaiTsoiBaidu 已提交
70

71 72
cc_test(
    name = "slice_plugin_test",
A
Aaron Xiao 已提交
73
    size = "small",
74
    srcs = ["slice_plugin_test.cc"],
75 76 77
    deps = [
        ":perception_inference_tensorrt_plugins",
        "//modules/perception/inference/tensorrt:rt_common",
78
        "@com_google_googletest//:gtest_main",
A
Aaron Xiao 已提交
79
    ],
80 81 82 83
)

cc_test(
    name = "argmax_plugin_test",
A
Aaron Xiao 已提交
84
    size = "small",
85
    srcs = ["argmax_plugin_test.cc"],
86 87 88
    deps = [
        ":perception_inference_tensorrt_plugins",
        "//modules/perception/inference/tensorrt:rt_common",
89
        "@com_google_googletest//:gtest_main",
A
Aaron Xiao 已提交
90
    ],
91 92
)

93
cpplint()