Skip to content

Commit

Permalink
revert changes for caffe parser
Browse files Browse the repository at this point in the history
Signed-off-by: Daisuke Nishimatsu <border_goldenmarket@yahoo.co.jp>
  • Loading branch information
Daisuke Nishimatsu authored and wep21 committed Aug 10, 2022
1 parent c894751 commit 0bc7e5b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions perception/lidar_apollo_instance_segmentation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ if(TRT_AVAIL AND CUDA_AVAIL AND CUDNN_AVAIL)
${PCL_LIBRARIES}
)

target_compile_options(tensorrt_apollo_cnn_lib
PUBLIC
-Wno-deprecated-declarations
)

ament_auto_add_library(lidar_apollo_instance_segmentation SHARED
src/node.cpp
src/detector.cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,15 @@ void trtNet::InitEngine()

void trtNet::doInference(const void * inputData, void * outputData)
{
static const int batchSize = 1;
assert(mTrtInputCount == 1);

int inputIndex = 0;
CUDA_CHECK(cudaMemcpyAsync(
mTrtCudaBuffer[inputIndex], inputData, mTrtBindBufferSize[inputIndex], cudaMemcpyHostToDevice,
mTrtCudaStream));

mTrtContext->executeV2(&mTrtCudaBuffer[inputIndex]);
mTrtContext->execute(batchSize, &mTrtCudaBuffer[inputIndex]);

for (size_t bindingIdx = mTrtInputCount; bindingIdx < mTrtBindBufferSize.size(); ++bindingIdx) {
auto size = mTrtBindBufferSize[bindingIdx];
Expand Down

0 comments on commit 0bc7e5b

Please sign in to comment.