autoware.universe icon indicating copy to clipboard operation
autoware.universe copied to clipboard

fix: update trt api

Open wep21 opened this issue 1 year ago • 4 comments

Description

closes #1436

Pre-review checklist for the PR author

The PR author must check the checkboxes below when creating the PR.

In-review checklist for the PR reviewers

The PR reviewers must check the checkboxes below before approval.

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

  • [ ] There are no open discussions or they are tracked via tickets.

After all checkboxes are checked, anyone who has write access can merge the PR.

wep21 avatar Jul 30 '22 08:07 wep21

Codecov Report

Merging #1472 (0bc7e5b) into main (f8b090b) will decrease coverage by 0.02%. The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main    #1472      +/-   ##
==========================================
- Coverage   10.73%   10.71%   -0.03%     
==========================================
  Files        1115     1115              
  Lines       78831    78987     +156     
  Branches    18561    18561              
==========================================
  Hits         8464     8464              
- Misses      61507    61663     +156     
  Partials     8860     8860              
Flag Coverage Δ *Carryforward flag
differential 0.00% <0.00%> (?)
total 10.72% <0.00%> (ø) Carriedforward from f8b090b

*This pull request uses carry forward flags. Click here to find out more.

Impacted Files Coverage Δ
...idar_apollo_instance_segmentation/src/detector.cpp 0.00% <0.00%> (ø)
...lidar_centerpoint/lib/network/tensorrt_wrapper.cpp 0.00% <0.00%> (ø)
perception/tensorrt_yolo/lib/src/trt_yolo.cpp 0.00% <0.00%> (ø)
...tion/traffic_light_classifier/utils/trt_common.cpp 0.00% <0.00%> (ø)
...tion/traffic_light_classifier/utils/trt_common.hpp 0.00% <ø> (ø)
...raffic_light_ssd_fine_detector/lib/src/trt_ssd.cpp 0.00% <0.00%> (ø)
... and 1 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

codecov[bot] avatar Jul 30 '22 08:07 codecov[bot]

is it supported to work on x86 and nvidia gpu not only Jetson AGX?

yukkysaito avatar Jul 30 '22 11:07 yukkysaito

The packages have failed to be built in the autoware environment.

Starting >>> lidar_apollo_instance_segmentation
--- stderr: lidar_apollo_instance_segmentation                                
/home/yusuke/ghq/github.com/tier4/pilot-auto.xx1/src/autoware/universe/perception/lidar_apollo_instance_segmentation/src/detector.cpp: In constructor ‘LidarApolloInstanceSegmentation::LidarApolloInstanceSegmentation(rclcpp::Node*)’:
/home/yusuke/ghq/github.com/tier4/pilot-auto.xx1/src/autoware/universe/perception/lidar_apollo_instance_segmentation/src/detector.cpp:63:13: error: ‘class nvinfer1::IBuilderConfig’ has no member named ‘setMemoryPoolLimit’
   63 |     config->setMemoryPoolLimit(nvinfer1::MemoryPoolType::kWORKSPACE, 1 << 30);
      |             ^~~~~~~~~~~~~~~~~~
/home/yusuke/ghq/github.com/tier4/pilot-auto.xx1/src/autoware/universe/perception/lidar_apollo_instance_segmentation/src/detector.cpp:63:42: error: ‘nvinfer1::MemoryPoolType’ has not been declared
   63 |     config->setMemoryPoolLimit(nvinfer1::MemoryPoolType::kWORKSPACE, 1 << 30);
      |                                          ^~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/lidar_apollo_instance_segmentation.dir/build.make:76: CMakeFiles/lidar_apollo_instance_segmentation.dir/src/detector.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:82: CMakeFiles/lidar_apollo_instance_segmentation.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
---
Failed   <<< lidar_apollo_instance_segmentation [10.0s, exited with code 2]

Summary: 10 packages finished [13.7s]
  1 package failed: lidar_apollo_instance_segmentation
  1 package had stderr output: lidar_apollo_instance_segmentation
❯ sudo dpkg -l | grep libnvinfer
hi  libnvinfer-dev                                      8.2.4-1+cuda11.4                     amd64        TensorRT development libraries and headers
hi  libnvinfer-plugin-dev                               8.2.4-1+cuda11.4                     amd64        TensorRT plugin libraries
hi  libnvinfer-plugin8                                  8.2.4-1+cuda11.4                     amd64        TensorRT plugin libraries
hi  libnvinfer8                                         8.2.4-1+cuda11.4                     amd64        TensorRT runtime libraries

yukke42 avatar Aug 01 '22 02:08 yukke42

This PR requires https://github.com/autowarefoundation/autoware/pull/2766.

wep21 avatar Aug 03 '22 06:08 wep21

@wep21 I checked the lidar_centerpoint package runs successfully with https://github.com/autowarefoundation/autoware/pull/2766. But there are no outputs from the lidar_apollo_instance_segmentation package by the error [lidar_apollo_instance_segmentation_node-29] ERROR: 3: [executionContext.cpp::executeV2::521] Error Code 3: API Usage Error (Parameter check failed at: runtime/api/executionContext.cpp::executeV2::521, condition: !mEngine.hasImplicitBatchDimension(). So traffic_light_classifier may also have the same error. Cloud you please check this error?

yukke42 avatar Aug 04 '22 13:08 yukke42

@yukke42 Could you try https://github.com/autowarefoundation/autoware.universe/pull/1436 first? It may be better to keep backward compatibility for multiple l4t version e.g. 32.6(tensorrt 8.2) and 34.1(tensorrt 8.4).

wep21 avatar Aug 04 '22 18:08 wep21

@NilaySener I added modifications to compile without adding -Wno-deprecated-declarations except for lidar_apollo_instance_segmentation. Could you try and review this PR?

wep21 avatar Aug 08 '22 14:08 wep21

@yukke42 I added more modifications to build with tensorrt 8.2. Could you try to run with a rosbag again? I reverted changes for lidar_apollo_instance_segmentation because explicit batch is not supported for caffe parser. https://github.com/NVIDIA/TensorRT/issues/470

wep21 avatar Aug 08 '22 14:08 wep21

@NilaySener I added modifications to compile without adding -Wno-deprecated-declarations except for lidar_apollo_instance_segmentation. Could you try and review this PR?

@wep21 I tried to compile this PR and it didn't give a deprecation error on Jetson AGX-Orin.

NilaySener avatar Aug 10 '22 12:08 NilaySener

@NilaySener Thank you for confirming it. Your PR is closed due to merging this PR, but thank you for your contribution.

wep21 avatar Aug 10 '22 13:08 wep21