diff --git a/perception/autoware_bytetrack/package.xml b/perception/autoware_bytetrack/package.xml
index 18c2223b8bbca..e22e897007cc0 100644
--- a/perception/autoware_bytetrack/package.xml
+++ b/perception/autoware_bytetrack/package.xml
@@ -15,10 +15,10 @@
cudnn_cmake_module
tensorrt_cmake_module
+ autoware_cuda_utils
autoware_kalman_filter
autoware_perception_msgs
autoware_tensorrt_common
- autoware_cuda_utils
cv_bridge
eigen
image_transport
diff --git a/perception/autoware_lidar_apollo_instance_segmentation/include/autoware/lidar_apollo_instance_segmentation/detector.hpp b/perception/autoware_lidar_apollo_instance_segmentation/include/autoware/lidar_apollo_instance_segmentation/detector.hpp
index 6a9b03f01b878..07e823bdafada 100644
--- a/perception/autoware_lidar_apollo_instance_segmentation/include/autoware/lidar_apollo_instance_segmentation/detector.hpp
+++ b/perception/autoware_lidar_apollo_instance_segmentation/include/autoware/lidar_apollo_instance_segmentation/detector.hpp
@@ -19,10 +19,10 @@
#include "autoware/lidar_apollo_instance_segmentation/feature_generator.hpp"
#include "autoware/lidar_apollo_instance_segmentation/node.hpp"
-#include
-#include
#include
#include
+#include
+#include
#include
#include
diff --git a/perception/autoware_lidar_apollo_instance_segmentation/package.xml b/perception/autoware_lidar_apollo_instance_segmentation/package.xml
index 08918eb88520c..0ad1ca50b75f7 100755
--- a/perception/autoware_lidar_apollo_instance_segmentation/package.xml
+++ b/perception/autoware_lidar_apollo_instance_segmentation/package.xml
@@ -13,10 +13,10 @@
ament_cmake
+ autoware_cuda_utils
autoware_perception_msgs
autoware_tensorrt_common
autoware_universe_utils
- autoware_cuda_utils
libpcl-all-dev
pcl_conversions
rclcpp
diff --git a/perception/autoware_shape_estimation/include/autoware/shape_estimation/tensorrt_shape_estimator.hpp b/perception/autoware_shape_estimation/include/autoware/shape_estimation/tensorrt_shape_estimator.hpp
index 98e2c5873392b..d39dce65d224d 100644
--- a/perception/autoware_shape_estimation/include/autoware/shape_estimation/tensorrt_shape_estimator.hpp
+++ b/perception/autoware_shape_estimation/include/autoware/shape_estimation/tensorrt_shape_estimator.hpp
@@ -15,10 +15,10 @@
#ifndef AUTOWARE__SHAPE_ESTIMATION__TENSORRT_SHAPE_ESTIMATOR_HPP_
#define AUTOWARE__SHAPE_ESTIMATION__TENSORRT_SHAPE_ESTIMATOR_HPP_
-#include
#include
#include
#include
+#include
#include
#include
diff --git a/perception/autoware_shape_estimation/lib/tensorrt_shape_estimator.cpp b/perception/autoware_shape_estimation/lib/tensorrt_shape_estimator.cpp
index 0521ff474daba..072d3b661b8b3 100644
--- a/perception/autoware_shape_estimation/lib/tensorrt_shape_estimator.cpp
+++ b/perception/autoware_shape_estimation/lib/tensorrt_shape_estimator.cpp
@@ -47,7 +47,8 @@ TrtShapeEstimator::TrtShapeEstimator(
const auto one_hot_input_size = std::accumulate(
one_hot_input_dims.d + 1, one_hot_input_dims.d + one_hot_input_dims.nbDims, 1,
std::multiplies());
- input_one_hot_d_ = autoware::cuda_utils::make_unique(one_hot_input_size * batch_config[2]);
+ input_one_hot_d_ =
+ autoware::cuda_utils::make_unique(one_hot_input_size * batch_config[2]);
const auto stage1_center_out_dims = trt_common_->getBindingDimensions(2);
out_s1center_elem_num_ = std::accumulate(
diff --git a/perception/autoware_shape_estimation/package.xml b/perception/autoware_shape_estimation/package.xml
index e50ecce0cd895..1476f1219624b 100644
--- a/perception/autoware_shape_estimation/package.xml
+++ b/perception/autoware_shape_estimation/package.xml
@@ -17,10 +17,10 @@
cudnn_cmake_module
tensorrt_cmake_module
+ autoware_cuda_utils
autoware_perception_msgs
autoware_tensorrt_common
autoware_universe_utils
- autoware_cuda_utils
eigen
libopencv-dev
libpcl-all-dev
diff --git a/perception/autoware_tensorrt_classifier/include/autoware/tensorrt_classifier/tensorrt_classifier.hpp b/perception/autoware_tensorrt_classifier/include/autoware/tensorrt_classifier/tensorrt_classifier.hpp
index bed0141956b43..345e663441557 100644
--- a/perception/autoware_tensorrt_classifier/include/autoware/tensorrt_classifier/tensorrt_classifier.hpp
+++ b/perception/autoware_tensorrt_classifier/include/autoware/tensorrt_classifier/tensorrt_classifier.hpp
@@ -15,10 +15,10 @@
#ifndef AUTOWARE__TENSORRT_CLASSIFIER__TENSORRT_CLASSIFIER_HPP_
#define AUTOWARE__TENSORRT_CLASSIFIER__TENSORRT_CLASSIFIER_HPP_
-#include
#include
#include
#include
+#include
#include
#include
diff --git a/perception/autoware_tensorrt_classifier/package.xml b/perception/autoware_tensorrt_classifier/package.xml
index 06efbf968d374..c91ab392bbe4b 100644
--- a/perception/autoware_tensorrt_classifier/package.xml
+++ b/perception/autoware_tensorrt_classifier/package.xml
@@ -19,8 +19,8 @@
autoware_cmake
- autoware_tensorrt_common
autoware_cuda_utils
+ autoware_tensorrt_common
libopencv-dev
rclcpp
diff --git a/perception/autoware_tensorrt_classifier/src/tensorrt_classifier.cpp b/perception/autoware_tensorrt_classifier/src/tensorrt_classifier.cpp
index bc14e4109a378..4ca70c2f75618 100644
--- a/perception/autoware_tensorrt_classifier/src/tensorrt_classifier.cpp
+++ b/perception/autoware_tensorrt_classifier/src/tensorrt_classifier.cpp
@@ -176,7 +176,8 @@ TrtClassifier::TrtClassifier(
out_elem_num_ = out_elem_num_ * batch_config[2];
out_elem_num_per_batch_ = static_cast(out_elem_num_ / batch_config[2]);
out_prob_d_ = autoware::cuda_utils::make_unique(out_elem_num_);
- out_prob_h_ = autoware::cuda_utils::make_unique_host(out_elem_num_, cudaHostAllocPortable);
+ out_prob_h_ =
+ autoware::cuda_utils::make_unique_host(out_elem_num_, cudaHostAllocPortable);
if (cuda) {
m_cuda = true;
diff --git a/perception/autoware_tensorrt_yolox/include/autoware/tensorrt_yolox/tensorrt_yolox.hpp b/perception/autoware_tensorrt_yolox/include/autoware/tensorrt_yolox/tensorrt_yolox.hpp
index 9af9eb5eaf5b8..483adfbdf2757 100644
--- a/perception/autoware_tensorrt_yolox/include/autoware/tensorrt_yolox/tensorrt_yolox.hpp
+++ b/perception/autoware_tensorrt_yolox/include/autoware/tensorrt_yolox/tensorrt_yolox.hpp
@@ -15,10 +15,10 @@
#ifndef AUTOWARE__TENSORRT_YOLOX__TENSORRT_YOLOX_HPP_
#define AUTOWARE__TENSORRT_YOLOX__TENSORRT_YOLOX_HPP_
-#include
-#include
#include
#include
+#include
+#include
#include
#include
diff --git a/perception/autoware_tensorrt_yolox/package.xml b/perception/autoware_tensorrt_yolox/package.xml
index 949ca4b53f6c1..68cf0a7f2e67e 100644
--- a/perception/autoware_tensorrt_yolox/package.xml
+++ b/perception/autoware_tensorrt_yolox/package.xml
@@ -19,10 +19,10 @@
cudnn_cmake_module
tensorrt_cmake_module
+ autoware_cuda_utils
autoware_object_recognition_utils
autoware_perception_msgs
autoware_tensorrt_common
- autoware_cuda_utils
cv_bridge
image_transport
libopencv-dev
diff --git a/perception/autoware_tensorrt_yolox/src/tensorrt_yolox.cpp b/perception/autoware_tensorrt_yolox/src/tensorrt_yolox.cpp
index 4ed0781161ef3..451af305a4410 100644
--- a/perception/autoware_tensorrt_yolox/src/tensorrt_yolox.cpp
+++ b/perception/autoware_tensorrt_yolox/src/tensorrt_yolox.cpp
@@ -283,7 +283,8 @@ TrtYoloX::TrtYoloX(
out_elem_num_ = out_elem_num_ * batch_config[2];
out_elem_num_per_batch_ = static_cast(out_elem_num_ / batch_config[2]);
out_prob_d_ = autoware::cuda_utils::make_unique(out_elem_num_);
- out_prob_h_ = autoware::cuda_utils::make_unique_host(out_elem_num_, cudaHostAllocPortable);
+ out_prob_h_ =
+ autoware::cuda_utils::make_unique_host(out_elem_num_, cudaHostAllocPortable);
int w = input_dims.d[3];
int h = input_dims.d[2];
int sum_tensors = (w / 8) * (h / 8) + (w / 16) * (h / 16) + (w / 32) * (h / 32);
@@ -300,9 +301,11 @@ TrtYoloX::TrtYoloX(
max_detections_ = out_scores_dims.d[1];
input_d_ = autoware::cuda_utils::make_unique(batch_config[2] * input_size);
out_num_detections_d_ = autoware::cuda_utils::make_unique(batch_config[2]);
- out_boxes_d_ = autoware::cuda_utils::make_unique(batch_config[2] * max_detections_ * 4);
+ out_boxes_d_ =
+ autoware::cuda_utils::make_unique(batch_config[2] * max_detections_ * 4);
out_scores_d_ = autoware::cuda_utils::make_unique(batch_config[2] * max_detections_);
- out_classes_d_ = autoware::cuda_utils::make_unique(batch_config[2] * max_detections_);
+ out_classes_d_ =
+ autoware::cuda_utils::make_unique(batch_config[2] * max_detections_);
}
if (multitask_) {
// Allocate buffer for segmentation
@@ -317,9 +320,10 @@ TrtYoloX::TrtYoloX(
}
segmentation_out_elem_num_per_batch_ =
static_cast(segmentation_out_elem_num_ / batch_config[2]);
- segmentation_out_prob_d_ = autoware::cuda_utils::make_unique(segmentation_out_elem_num_);
- segmentation_out_prob_h_ =
- autoware::cuda_utils::make_unique_host(segmentation_out_elem_num_, cudaHostAllocPortable);
+ segmentation_out_prob_d_ =
+ autoware::cuda_utils::make_unique(segmentation_out_elem_num_);
+ segmentation_out_prob_h_ = autoware::cuda_utils::make_unique_host(
+ segmentation_out_elem_num_, cudaHostAllocPortable);
}
if (use_gpu_preprocess) {
use_gpu_preprocess_ = true;
@@ -396,7 +400,8 @@ void TrtYoloX::initPreprocessBuffer(int width, int height)
}
image_buf_h_ = autoware::cuda_utils::make_unique_host(
width * height * 3 * batch_size_, cudaHostAllocWriteCombined);
- image_buf_d_ = autoware::cuda_utils::make_unique(width * height * 3 * batch_size_);
+ image_buf_d_ =
+ autoware::cuda_utils::make_unique(width * height * 3 * batch_size_);
}
if (multitask_) {
size_t argmax_out_elem_num = 0;
@@ -414,8 +419,8 @@ void TrtYoloX::initPreprocessBuffer(int width, int height)
size_t out_elem_num = out_w * out_h * batch_size_;
argmax_out_elem_num += out_elem_num;
}
- argmax_buf_h_ =
- autoware::cuda_utils::make_unique_host(argmax_out_elem_num, cudaHostAllocPortable);
+ argmax_buf_h_ = autoware::cuda_utils::make_unique_host(
+ argmax_out_elem_num, cudaHostAllocPortable);
argmax_buf_d_ = autoware::cuda_utils::make_unique(argmax_out_elem_num);
}
}
@@ -470,8 +475,8 @@ void TrtYoloX::preprocessGpu(const std::vector & images)
scales_.emplace_back(scale);
image_buf_h_ = autoware::cuda_utils::make_unique_host(
image.cols * image.rows * 3 * batch_size, cudaHostAllocWriteCombined);
- image_buf_d_ =
- autoware::cuda_utils::make_unique(image.cols * image.rows * 3 * batch_size);
+ image_buf_d_ = autoware::cuda_utils::make_unique(
+ image.cols * image.rows * 3 * batch_size);
}
int index = b * image.cols * image.rows * 3;
// Copy into pinned memory
@@ -496,8 +501,8 @@ void TrtYoloX::preprocessGpu(const std::vector & images)
if (multitask_) {
if (!argmax_buf_h_) {
- argmax_buf_h_ =
- autoware::cuda_utils::make_unique_host(argmax_out_elem_num, cudaHostAllocPortable);
+ argmax_buf_h_ = autoware::cuda_utils::make_unique_host(
+ argmax_out_elem_num, cudaHostAllocPortable);
}
if (!argmax_buf_d_) {
argmax_buf_d_ = autoware::cuda_utils::make_unique(argmax_out_elem_num);
@@ -618,8 +623,8 @@ void TrtYoloX::preprocessWithRoiGpu(
if (!image_buf_h_) {
image_buf_h_ = autoware::cuda_utils::make_unique_host(
image.cols * image.rows * 3 * batch_size, cudaHostAllocWriteCombined);
- image_buf_d_ =
- autoware::cuda_utils::make_unique(image.cols * image.rows * 3 * batch_size);
+ image_buf_d_ = autoware::cuda_utils::make_unique(
+ image.cols * image.rows * 3 * batch_size);
}
int index = b * image.cols * image.rows * 3;
// Copy into pinned memory
@@ -735,7 +740,8 @@ void TrtYoloX::multiScalePreprocessGpu(const cv::Mat & image, const std::vector<
if (!image_buf_h_) {
image_buf_h_ = autoware::cuda_utils::make_unique_host(
image.cols * image.rows * 3 * 1, cudaHostAllocWriteCombined);
- image_buf_d_ = autoware::cuda_utils::make_unique(image.cols * image.rows * 3 * 1);
+ image_buf_d_ =
+ autoware::cuda_utils::make_unique(image.cols * image.rows * 3 * 1);
}
int index = 0 * image.cols * image.rows * 3;
// Copy into pinned memory
diff --git a/perception/autoware_traffic_light_classifier/package.xml b/perception/autoware_traffic_light_classifier/package.xml
index 98b15d9b85929..d85ea7aae6d79 100644
--- a/perception/autoware_traffic_light_classifier/package.xml
+++ b/perception/autoware_traffic_light_classifier/package.xml
@@ -14,9 +14,9 @@
autoware_cmake
+ autoware_cuda_utils
autoware_tensorrt_classifier
autoware_tensorrt_common
- autoware_cuda_utils
cv_bridge
image_transport
libboost-filesystem-dev
diff --git a/perception/autoware_traffic_light_classifier/src/classifier/cnn_classifier.hpp b/perception/autoware_traffic_light_classifier/src/classifier/cnn_classifier.hpp
index 31b03e5802800..0b61850850db4 100644
--- a/perception/autoware_traffic_light_classifier/src/classifier/cnn_classifier.hpp
+++ b/perception/autoware_traffic_light_classifier/src/classifier/cnn_classifier.hpp
@@ -17,10 +17,10 @@
#include "classifier_interface.hpp"
-#include
-#include
#include
#include
+#include
+#include
#include
#include
#include