mmdeploy: JetsonTX2+Jetpack4.6, deploy error.

env:

`022-03-05 23:29:30,973 - mmdeploy - INFO -

2022-03-05 23:29:30,973 - mmdeploy - INFO - Environmental information 2022-03-05 23:29:37,230 - mmdeploy - INFO - sys.platform: linux 2022-03-05 23:29:37,230 - mmdeploy - INFO - Python: 3.6.7 | packaged by conda-forge | (default, Jan 7 2019, 02:49:06) [GCC 7.3.0] 2022-03-05 23:29:37,231 - mmdeploy - INFO - CUDA available: True 2022-03-05 23:29:37,231 - mmdeploy - INFO - GPU 0: NVIDIA Tegra X2 2022-03-05 23:29:37,231 - mmdeploy - INFO - CUDA_HOME: /usr/local/cuda-10.2 2022-03-05 23:29:37,231 - mmdeploy - INFO - NVCC: Build cuda_10.2_r440.TC440_70.29663091_0 2022-03-05 23:29:37,231 - mmdeploy - INFO - GCC: gcc (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) 7.5.0 2022-03-05 23:29:37,231 - mmdeploy - INFO - PyTorch: 1.8.0 2022-03-05 23:29:37,231 - mmdeploy - INFO - PyTorch compiling details: PyTorch built with:

  • GCC 7.5
  • C++ Version: 201402
  • OpenMP 201511 (a.k.a. OpenMP 4.5)
  • NNPACK is enabled
  • CPU capability usage: NO AVX
  • CUDA Runtime 10.2
  • NVCC architecture flags: -gencode;arch=compute_53,code=sm_53;-gencode;arch=compute_62,code=sm_62;-gencode;arch=compute_72,code=sm_72
  • CuDNN 8.2.1
    • Built with CuDNN 8.0
  • Build settings: BLAS_INFO=open, BUILD_TYPE=Release, CUDA_VERSION=10.2, CUDNN_VERSION=8.0.0, CXX_COMPILER=/usr/bin/c++, CXX_FLAGS= -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_XNNPACK -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -DMISSING_ARM_VST1 -DMISSING_ARM_VLD1 -Wno-stringop-overflow, FORCE_FALLBACK_CUDA_MPI=1, LAPACK_INFO=open, TORCH_VERSION=1.8.0, USE_CUDA=ON, USE_CUDNN=ON, USE_EIGEN_FOR_BLAS=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=OFF, USE_MKLDNN=OFF, USE_MPI=ON, USE_NCCL=0, USE_NNPACK=ON, USE_OPENMP=ON,

2022-03-05 23:29:37,232 - mmdeploy - INFO - TorchVision: 0.9.0 2022-03-05 23:29:37,232 - mmdeploy - INFO - OpenCV: 4.5.5 2022-03-05 23:29:37,232 - mmdeploy - INFO - MMCV: 1.4.6 2022-03-05 23:29:37,232 - mmdeploy - INFO - MMCV Compiler: GCC 7.5 2022-03-05 23:29:37,232 - mmdeploy - INFO - MMCV CUDA Compiler: 10.2 2022-03-05 23:29:37,232 - mmdeploy - INFO - MMDeployment: 0.3.0+34879e6 2022-03-05 23:29:37,232 - mmdeploy - INFO -

2022-03-05 23:29:37,232 - mmdeploy - INFO - Backend information 2022-03-05 23:29:38,109 - mmdeploy - INFO - onnxruntime: None ops_is_avaliable : False 2022-03-05 23:29:38,111 - mmdeploy - INFO - tensorrt: 8.0.1.6 ops_is_avaliable : True 2022-03-05 23:29:38,116 - mmdeploy - INFO - ncnn: None ops_is_avaliable : False 2022-03-05 23:29:38,120 - mmdeploy - INFO - pplnn_is_avaliable: False 2022-03-05 23:29:38,123 - mmdeploy - INFO - openvino_is_avaliable: False 2022-03-05 23:29:38,123 - mmdeploy - INFO -

2022-03-05 23:29:38,124 - mmdeploy - INFO - Codebase information 2022-03-05 23:29:38,125 - mmdeploy - INFO - mmcls: None 2022-03-05 23:29:38,128 - mmdeploy - INFO - mmdet: 2.22.0 2022-03-05 23:29:38,129 - mmdeploy - INFO - mmedit: None 2022-03-05 23:29:38,130 - mmdeploy - INFO - mmocr: None 2022-03-05 23:29:38,131 - mmdeploy - INFO - mmseg: None`

error:

python ./tools/deploy.py configs/mmdet/detection/detection_tensorrt_dynamic-320x320-1344x1344.py ../mmdetection/configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco.py ../mmdetection/checkpoints/faster_rcnn_r50_fpn_1x_coco_20200130-047c8118.pth ../mmdetection/demo/demo.jpg --work-dir test-work/ --show --device cuda:0
`2022-03-05 23:26:46,769 - mmdeploy - INFO - torch2onnx start. load checkpoint from local path: …/mmdetection/checkpoints/faster_rcnn_r50_fpn_1x_coco_20200130-047c8118.pth /home/jetson/archiconda3/envs/mm/lib/python3.6/site-packages/mmdet/datasets/utils.py:70: UserWarning: “ImageToTensor” pipeline is replaced by “DefaultFormatBundle” for batch inference. It is recommended to manually replace it in the test data pipeline in your config file.

`data pipeline in your config file.', UserWarning) /home/jetson/archiconda3/envs/mm/lib/python3.6/site-packages/mmdeploy-0.3.0-py3.6.egg/mmdeploy/core/optimizers/function_marker.py:158: TracerWarning: Converting a tensor to a Python integer might cause the trace to be incorrect. We can’t record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs! ys_shape = tuple(int(s) for s in ys.shape) /home/jetson/archiconda3/envs/mm/lib/python3.6/site-packages/mmdet/models/dense_heads/anchor_head.py:123: UserWarning: DeprecationWarning: anchor_generator is deprecated, please use “prior_generator” instead warnings.warn('DeprecationWarning: anchor_generator is deprecated, ’ /home/jetson/archiconda3/envs/mm/lib/python3.6/site-packages/mmdet/core/anchor/anchor_generator.py:333: UserWarning: grid_anchors would be deprecated soon. Please use grid_priors warnings.warn('grid_anchors would be deprecated soon. ’ /home/jetson/archiconda3/envs/mm/lib/python3.6/site-packages/mmdet/core/anchor/anchor_generator.py:370: UserWarning: single_level_grid_anchors would be deprecated soon. Please use single_level_grid_priors 'single_level_grid_anchors would be deprecated soon. ’ /home/jetson/archiconda3/envs/mm/lib/python3.6/site-packages/mmdeploy-0.3.0-py3.6.egg/mmdeploy/codebase/mmdet/models/dense_heads/rpn_head.py:77: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can’t record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs! assert cls_score.size()[-2:] == bbox_pred.size()[-2:] /home/jetson/archiconda3/envs/mm/lib/python3.6/site-packages/mmdeploy-0.3.0-py3.6.egg/mmdeploy/pytorch/functions/topk.py:54: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can’t record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs! if k > size: /home/jetson/archiconda3/envs/mm/lib/python3.6/site-packages/mmdeploy-0.3.0-py3.6.egg/mmdeploy/codebase/mmdet/core/bbox/delta_xywh_bbox_coder.py:39: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can’t record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs! assert pred_bboxes.size(0) == bboxes.size(0) /home/jetson/archiconda3/envs/mm/lib/python3.6/site-packages/mmdeploy-0.3.0-py3.6.egg/mmdeploy/codebase/mmdet/core/bbox/delta_xywh_bbox_coder.py:41: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can’t record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs! assert pred_bboxes.size(1) == bboxes.size(1) /home/jetson/archiconda3/envs/mm/lib/python3.6/site-packages/mmdeploy-0.3.0-py3.6.egg/mmdeploy/codebase/mmdet/core/post_processing/bbox_nms.py:260: TracerWarning: Converting a tensor to a Python integer might cause the trace to be incorrect. We can’t record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs! dets, labels = TRTBatchedNMSop.apply(boxes, scores, int(scores.shape[-1]), /home/jetson/archiconda3/envs/mm/lib/python3.6/site-packages/mmdeploy-0.3.0-py3.6.egg/mmdeploy/mmcv/ops/nms.py:177: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can’t record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs! out_boxes = min(num_boxes, after_topk) /home/jetson/archiconda3/envs/mm/lib/python3.6/site-packages/mmdeploy-0.3.0-py3.6.egg/mmdeploy/mmcv/ops/nms.py:181: TracerWarning: Converting a tensor to a Python integer might cause the trace to be incorrect. We can’t record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs! (batch_size, out_boxes)).to(scores.device) /home/jetson/archiconda3/envs/mm/lib/python3.6/site-packages/torch/onnx/symbolic_opset9.py:2607: UserWarning: Exporting aten::index operator of advanced indexing in opset 11 is achieved by combination of multiple ONNX operators, including Reshape, Transpose, Concat, and Gather. If indices include negative values, the exported graph will produce incorrect results. “If indices include negative values, the exported graph will produce incorrect results.”) 2022-03-05 23:28:15,099 - mmdeploy - INFO - torch2onnx success. 2022-03-05 23:28:15,675 - mmdeploy - INFO - onnx2tensorrt of test-work/end2end.onnx start. 2022-03-05 23:28:21,674 - mmdeploy - WARNING - Could not load the library of tensorrt plugins. Because the file does not exist: [TensorRT] INFO: [MemUsageChange] Init CUDA: CPU +240, GPU +0, now: CPU 309, GPU 5307 (MiB) [TensorRT] WARNING: onnx2trt_utils.cpp:364: Your ONNX model has been generated with INT64 weights, while TensorRT does not natively support INT64. Attempting to cast down to INT32. [TensorRT] WARNING: onnx2trt_utils.cpp:390: One or more weights outside the range of INT32 was clamped [TensorRT] WARNING: onnx2trt_utils.cpp:390: One or more weights outside the range of INT32 was clamped [TensorRT] WARNING: onnx2trt_utils.cpp:390: One or more weights outside the range of INT32 was clamped [TensorRT] INFO: No importer registered for op: TRTBatchedNMS. Attempting to import as plugin. [TensorRT] INFO: Searching for plugin: TRTBatchedNMS, plugin_version: 1, plugin_namespace: [TensorRT] ERROR: 3: getPluginCreator could not find plugin: TRTBatchedNMS version: 1 2022-03-05:23:28:33,root ERROR [utils.py:43] Failed to parse onnx, In node 1143 (importFallbackPluginImporter): UNSUPPORTED_NODE: Assertion failed: creator && “Plugin not found, are the plugin name, version, and namespace correct?”

Traceback (most recent call last): File “/home/jetson/archiconda3/envs/mm/lib/python3.6/site-packages/mmdeploy-0.3.0-py3.6.egg/mmdeploy/utils/utils.py”, line 38, in target_wrapper result = target(*args, **kwargs) File “/home/jetson/archiconda3/envs/mm/lib/python3.6/site-packages/mmdeploy-0.3.0-py3.6.egg/mmdeploy/backend/tensorrt/onnx2tensorrt.py”, line 72, in onnx2tensorrt device_id=device_id) File “/home/jetson/archiconda3/envs/mm/lib/python3.6/site-packages/mmdeploy-0.3.0-py3.6.egg/mmdeploy/backend/tensorrt/utils.py”, line 76, in create_trt_engine raise RuntimeError(f’Failed to parse onnx, {error_msgs}') RuntimeError: Failed to parse onnx, In node 1143 (importFallbackPluginImporter): UNSUPPORTED_NODE: Assertion failed: creator && “Plugin not found, are the plugin name, version, and namespace correct?”

2022-03-05 23:28:34,549 - mmdeploy - ERROR - onnx2tensorrt of test-work/end2end.onnx failed. `

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 20 (18 by maintainers)

Most upvoted comments

Errr, the code will give you a string, you should print it to get the error log. For example:

cudaDeviceSynchronize();    // synchronize the device so we can read the log
printf("cuda error log: %s\n", cudaGetErrorString(cudaGetLastError()));    // print the log