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

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

cc_library(
    name = "point_pillars",
    srcs = [
10
        "point_pillars.cc",
11 12
        ":anchor_mask_cuda",
        ":nms_cuda",
13 14
        ":postprocess_cuda",
        ":scatter_cuda",
15 16
    ],
    hdrs = [
17 18 19 20 21 22
        "anchor_mask_cuda.h",
        "common.h",
        "nms_cuda.h",
        "point_pillars.h",
        "postprocess_cuda.h",
        "scatter_cuda.h",
23 24
    ],
    deps = [
25
        ":preprocess_points",
26
        "//modules/perception/common:perception_gflags",
27 28 29 30 31 32
        "@cuda",
        "@tensorrt",
    ],
    alwayslink = True,
)

33 34 35
cc_library(
    name = "point_pillars_detection",
    srcs = [
36
        "point_pillars_detection.cc",
37 38
    ],
    hdrs = [
39
        "point_pillars_detection.h",
40
    ],
41
    deps = [
42
        ":point_pillars",
43
        "//cyber/common",
44 45 46 47
        "//modules/perception/base",
        "//modules/perception/lib/thread",
        "//modules/perception/lidar/common",
        "@eigen",
48
    ],
49
    alwayslink = True,
50 51 52 53 54
)

cc_library(
    name = "preprocess_points",
    srcs = [
55
        "preprocess_points.cc",
56 57 58
        ":preprocess_points_cuda",
    ],
    hdrs = [
59 60
        "preprocess_points.h",
        "preprocess_points_cuda.h",
61 62 63
    ],
)

64 65
cuda_library(
    name = "anchor_mask_cuda",
66 67
    srcs = ["anchor_mask_cuda.cu"],
    hdrs = ["anchor_mask_cuda.h"],
68 69 70 71 72
    deps = ["@cuda"],
)

cuda_library(
    name = "nms_cuda",
73 74
    srcs = ["nms_cuda.cu"],
    hdrs = ["nms_cuda.h"],
75 76 77 78 79
    deps = ["@cuda"],
)

cuda_library(
    name = "postprocess_cuda",
80 81
    srcs = ["postprocess_cuda.cu"],
    hdrs = ["postprocess_cuda.h"],
82 83 84 85 86
    deps = [
        "@cuda",
    ],
)

87 88
cuda_library(
    name = "preprocess_points_cuda",
89 90
    srcs = ["preprocess_points_cuda.cu"],
    hdrs = ["preprocess_points_cuda.h"],
91 92 93 94 95
    deps = ["@cuda"],
)

cuda_library(
    name = "scatter_cuda",
96 97
    srcs = ["scatter_cuda.cu"],
    hdrs = ["scatter_cuda.h"],
98 99 100 101 102 103
    deps = ["@cuda"],
)

cc_test(
    name = "point_pillars_test",
    size = "small",
104
    srcs = ["point_pillars_test.cc"],
105 106 107
    deps = [
        ":point_pillars",
        ":preprocess_points",
108
        "//modules/perception/tool/benchmark/lidar/util:benchmark_util",
109 110 111 112 113 114 115
        "@boost",
        "@com_google_googletest//:gtest_main",
        "@eigen",
        "@pcl",
    ],
)

116
cpplint()