Skip to content

Commit

Permalink
chore: fixed ci/cd errors
Browse files Browse the repository at this point in the history
Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>
  • Loading branch information
knzo25 committed May 27, 2024
1 parent 72271ad commit f5282fd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void PostprocessKernelTest::SetUp()
head_out_rot_d_ = cuda::make_unique<float[]>(grid_xy_size * config_ptr_->head_out_rot_size_);
head_out_vel_d_ = cuda::make_unique<float[]>(grid_xy_size * config_ptr_->head_out_vel_size_);

std::vector<float> heatmap_host_vector(grid_xy_size * config_ptr_->class_size_);
std::vector<float> heatmap_host_vector(grid_xy_size * config_ptr_->class_size_, 0.f);
std::fill(heatmap_host_vector.begin(), heatmap_host_vector.end(), -1e6);
cudaMemcpy(
head_out_heatmap_d_.get(), heatmap_host_vector.data(),
Expand Down
20 changes: 10 additions & 10 deletions perception/lidar_centerpoint/test/test_preprocess_kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,10 @@ TEST_F(PreprocessKernelTest, BasicTest)

ASSERT_EQ(cudaSuccess, code);

unsigned int num_pillars;
std::vector<float> voxel_features(point_feature_size_);
float num_voxels;
std::vector<int> voxel_coordinates(3);
unsigned int num_pillars{};
std::vector<float> voxel_features(point_feature_size_, 0.f);
float num_voxels{};
std::vector<int> voxel_coordinates(3, 0);

CHECK_CUDA_ERROR(cudaMemcpy(
&num_pillars, num_voxels_d_.get(), 1 * sizeof(unsigned int), cudaMemcpyDeviceToHost));
Expand Down Expand Up @@ -208,7 +208,7 @@ TEST_F(PreprocessKernelTest, BasicTest)

ASSERT_EQ(cudaSuccess, code);

std::vector<float> encoder_features(config_encoder_in_feature_size_);
std::vector<float> encoder_features(config_encoder_in_feature_size_, 0.f);

CHECK_CUDA_ERROR(cudaMemcpy(
encoder_features.data(), encoder_in_features_d_.get(),
Expand Down Expand Up @@ -315,10 +315,10 @@ TEST_F(PreprocessKernelTest, VoxelOverflowTest)

ASSERT_EQ(cudaSuccess, code);

unsigned int num_pillars;
std::vector<float> voxel_features(max_point_in_voxel_size_ * point_feature_size_);
float num_voxels;
std::vector<int> voxel_coordinates(3);
unsigned int num_pillars{};
std::vector<float> voxel_features(max_point_in_voxel_size_ * point_feature_size_, 0.f);
float num_voxels{};
std::vector<int> voxel_coordinates(3, 0);

CHECK_CUDA_ERROR(cudaMemcpy(
&num_pillars, num_voxels_d_.get(), 1 * sizeof(unsigned int), cudaMemcpyDeviceToHost));
Expand Down Expand Up @@ -353,7 +353,7 @@ TEST_F(PreprocessKernelTest, VoxelOverflowTest)

ASSERT_EQ(cudaSuccess, code);

std::vector<float> encoder_features(max_point_in_voxel_size_ * config_encoder_in_feature_size_);
std::vector<float> encoder_features(max_point_in_voxel_size_ * config_encoder_in_feature_size_, 0.f);

CHECK_CUDA_ERROR(cudaMemcpy(
encoder_features.data(), encoder_in_features_d_.get(),
Expand Down
2 changes: 1 addition & 1 deletion perception/lidar_centerpoint/test/test_voxel_generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ TEST_F(VoxelGeneratorTest, TwoFrames)
EXPECT_EQ(static_cast<double>(0), points[i * config.point_feature_size_ + 3]);
}

// Check valid points forthe oldest pointcloud
// Check valid points for the oldest pointcloud
for (std::size_t i = 0; i < points_per_pointcloud_; ++i) {
// There are tf conversions, so results are not numerically the same
EXPECT_NEAR(
Expand Down

0 comments on commit f5282fd

Please sign in to comment.