Skip to content

Commit

Permalink
chore: resolve clang warnings (#33)
Browse files Browse the repository at this point in the history
Signed-off-by: ktro2828 <[email protected]>
  • Loading branch information
ktro2828 authored Sep 3, 2024
1 parent eccd952 commit 224eb5c
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 4 deletions.
1 change: 1 addition & 0 deletions include/mtr/trajectory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#define MTR__TRAJECTORY_HPP_

#include <algorithm>
#include <array>
#include <cstddef>
#include <vector>

Expand Down
2 changes: 2 additions & 0 deletions lib/include/attention/trt_attn_value_computation_kernel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

#include <cuda_runtime.h>

#include <cstdint>

/**
* @brief The launcher to invoke attention value computation kernel.
*
Expand Down
2 changes: 2 additions & 0 deletions lib/include/attention/trt_attn_weight_computation_kernel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

#include <cuda_runtime.h>

#include <cstdint>

/**
* @brief The launcher to invoke attention weight computation kernel.
*
Expand Down
2 changes: 2 additions & 0 deletions lib/include/knn/trt_knn_batch_kernel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

#include <cuda_runtime.h>

#include <cstdint>

cudaError_t KnnBatchLauncher(
const int32_t n, const int32_t m, const int32_t k, const float * xyz, const float * query_xyz,
const int * batch_idx, const int * query_batch_offsets, int * output, cudaStream_t stream);
Expand Down
2 changes: 2 additions & 0 deletions lib/include/knn/trt_knn_batch_mlogk_kernel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

#include <cuda_runtime.h>

#include <cstdint>

cudaError_t KnnBatchMlogKLauncher(
const int32_t n, const int32_t m, const int32_t k, const float * xyz, const float * query_xyz,
const int * batch_idx, const int * query_batch_offsets, int * output, cudaStream_t stream);
Expand Down
14 changes: 10 additions & 4 deletions src/mtr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
#include "preprocess/agent_preprocess_kernel.cuh"
#include "preprocess/polyline_preprocess_kernel.cuh"

#include <cstdint>

namespace mtr
{
TrtMTR::TrtMTR(
Expand Down Expand Up @@ -116,12 +118,15 @@ void TrtMTR::initCudaPtr(const AgentData & agent_data, const PolylineData & poly
builder_->setBindingDimensions(1, nvinfer1::Dims3{num_target_, num_agent_, num_timestamp_});
// polylines
builder_->setBindingDimensions(
2, nvinfer1::Dims4{num_target_, config_.max_num_polyline, num_point_, num_point_attr_});
2,
nvinfer1::Dims4{
num_target_, static_cast<int32_t>(config_.max_num_polyline), num_point_, num_point_attr_});
// polyline mask
builder_->setBindingDimensions(
3, nvinfer1::Dims3{num_target_, config_.max_num_polyline, num_point_});
3, nvinfer1::Dims3{num_target_, static_cast<int32_t>(config_.max_num_polyline), num_point_});
// polyline center
builder_->setBindingDimensions(4, nvinfer1::Dims3{num_target_, config_.max_num_polyline, 3});
builder_->setBindingDimensions(
4, nvinfer1::Dims3{num_target_, static_cast<int32_t>(config_.max_num_polyline), 3});
// obj last pos
builder_->setBindingDimensions(5, nvinfer1::Dims3{num_target_, num_agent_, 3});
// track index to predict
Expand All @@ -131,7 +136,8 @@ void TrtMTR::initCudaPtr(const AgentData & agent_data, const PolylineData & poly
builder_->setBindingDimensions(6, targetIdxDim);
// intention points
builder_->setBindingDimensions(
7, nvinfer1::Dims3{num_target_, config_.num_intention_point_cluster, 2});
7,
nvinfer1::Dims3{num_target_, static_cast<int32_t>(config_.num_intention_point_cluster), 2});
}

// outputs
Expand Down

0 comments on commit 224eb5c

Please sign in to comment.