mmdeploy
mmdeploy copied to clipboard
Tensorrt conversion failed, an error mmdeploy. Apis. Pytorch2onnx. Torch2onnx ` with the Call id: 0 failed. The exit.
Tensorrt conversion failed, an error mmdeploy. Apis. Pytorch2onnx. Torch2onnx ` with the Call id: 0 failed. The exit.
C:\ProgramData\Anaconda3\envs\mmdeploy\lib\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)
2022-07-11 10:29:58,086 - mmdeploy - INFO - Start pipeline mmdeploy.apis.pytorch2onnx.torch2onnx in subprocess
load checkpoint from local path: D:/mmd模型转换/file_lunzhou/epoch_271.pth
C:\ProgramData\Anaconda3\envs\mmdeploy\lib\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)
2022-07-11 10:30:02,986 - mmdeploy - WARNING - DeprecationWarning: get_onnx_config will be deprecated in the future.
2022-07-11 10:30:02,987 - mmdeploy - INFO - Export PyTorch model to ONNX: D:/mmd模型转换/work_dir_lunzhou\end2end.onnx.
d:\mmd\mmdeploy\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)
C:\ProgramData\Anaconda3\envs\mmdeploy\lib\site-packages\mmdet\models\dense_heads\yolo_head.py:126: UserWarning: DeprecationWarning: `anchor_generator` is deprecated, please use "prior_generator" instead
warnings.warn('DeprecationWarning: `anchor_generator` is deprecated, '
C:\ProgramData\Anaconda3\envs\mmdeploy\lib\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. '
C:\ProgramData\Anaconda3\envs\mmdeploy\lib\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. '
C:\ProgramData\Anaconda3\envs\mmdeploy\lib\site-packages\mmdet\core\bbox\coder\yolo_bbox_coder.py:73: 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) == 4
d:\mmd\mmdeploy\mmdeploy\pytorch\functions\topk.py:56: 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:
d:\mmd\mmdeploy\mmdeploy\codebase\mmdet\core\post_processing\bbox_nms.py:259: 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]),
d:\mmd\mmdeploy\mmdeploy\mmcv\ops\nms.py:178: 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)
d:\mmd\mmdeploy\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))
2022-07-11 10:30:07,099 - mmdeploy - ERROR - `mmdeploy.apis.pytorch2onnx.torch2onnx` with Call id: 0 failed. exit.
Could you tell me how to solve this problem
This is my env:
2022-07-11 10:43:09,400 - mmdeploy - INFO -
2022-07-11 10:43:09,400 - mmdeploy - INFO - **********Environmental information**********
'gcc' �����ڲ����ⲿ���Ҳ���ǿ����еij���
�����������
fatal: unsafe repository ('D:/mmd/mmdeploy' is owned by someone else)
To add an exception for this directory, call:
git config --global --add safe.directory D:/mmd/mmdeploy
Set the environment variable GIT_TEST_DEBUG_UNSAFE_DIRECTORIES=true and run
again for more information.
2022-07-11 10:43:10,742 - mmdeploy - INFO - sys.platform: win32
2022-07-11 10:43:10,742 - mmdeploy - INFO - Python: 3.7.12 | packaged by conda-forge | (default, Oct 26 2021, 05:35:01) [MSC v.1916 64 bit (AMD64)]
2022-07-11 10:43:10,742 - mmdeploy - INFO - CUDA available: True
2022-07-11 10:43:10,742 - mmdeploy - INFO - GPU 0: NVIDIA GeForce RTX 3060
2022-07-11 10:43:10,742 - mmdeploy - INFO - CUDA_HOME: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3
2022-07-11 10:43:10,742 - mmdeploy - INFO - NVCC: Build cuda_11.3.r11.3/compiler.29920130_0
2022-07-11 10:43:10,742 - mmdeploy - INFO - GCC: n/a
2022-07-11 10:43:10,742 - mmdeploy - INFO - PyTorch: 1.11.0
2022-07-11 10:43:10,742 - mmdeploy - INFO - PyTorch compiling details: PyTorch built with:
- C++ Version: 199711
- MSVC 192829337
- Intel(R) Math Kernel Library Version 2020.0.2 Product Build 20200624 for Intel(R) 64 architecture applications
- Intel(R) MKL-DNN v2.5.2 (Git Hash a9302535553c73243c632ad3c4c80beec3d19a1e)
- OpenMP 2019
- LAPACK is enabled (usually provided by MKL)
- CPU capability usage: AVX2
- CUDA Runtime 11.3
- NVCC architecture flags: -gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_61,code=sm_61;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_80,code=sm_80;-gencode;arch=compute_86,code=sm_86;-gencode;arch=compute_37,code=compute_37
- CuDNN 8.2
- Magma 2.5.4
- Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=11.3, CUDNN_VERSION=8.2.0, CXX_COMPILER=C:/cb/pytorch_1000000000000/work/tmp_bin/sccache-cl.exe, CXX_FLAGS=/DWIN32 /D_WINDOWS /GR /EHsc /w /bigobj -DUSE_PTHREADPOOL -openmp:experimental -IC:/cb/pytorch_1000000000000/work/mkl/include -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=1.11.0, USE_CUDA=ON, USE_CUDNN=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=OFF, USE_MPI=OFF, USE_NCCL=OFF, USE_NNPACK=OFF, USE_OPENMP=ON, USE_ROCM=OFF,
2022-07-11 10:43:10,742 - mmdeploy - INFO - TorchVision: 0.12.0
2022-07-11 10:43:10,743 - mmdeploy - INFO - OpenCV: 4.6.0
2022-07-11 10:43:10,743 - mmdeploy - INFO - MMCV: 1.4.0
2022-07-11 10:43:10,743 - mmdeploy - INFO - MMCV Compiler: MSVC 192930137
2022-07-11 10:43:10,743 - mmdeploy - INFO - MMCV CUDA Compiler: 11.3
2022-07-11 10:43:10,743 - mmdeploy - INFO - MMDeploy: 0.6.0+
2022-07-11 10:43:10,743 - mmdeploy - INFO -
2022-07-11 10:43:10,743 - mmdeploy - INFO - **********Backend information**********
2022-07-11 10:43:11,178 - mmdeploy - INFO - onnxruntime: None ops_is_avaliable : False
2022-07-11 10:43:11,256 - mmdeploy - INFO - tensorrt: 8.2.3.0 ops_is_avaliable : True
2022-07-11 10:43:11,296 - mmdeploy - INFO - ncnn: None ops_is_avaliable : False
2022-07-11 10:43:11,302 - mmdeploy - INFO - pplnn_is_avaliable: False
2022-07-11 10:43:11,309 - mmdeploy - INFO - openvino_is_avaliable: False
2022-07-11 10:43:11,310 - mmdeploy - INFO -
2022-07-11 10:43:11,310 - mmdeploy - INFO - **********Codebase information**********
2022-07-11 10:43:11,311 - mmdeploy - INFO - mmdet: 2.24.0
2022-07-11 10:43:11,311 - mmdeploy - INFO - mmseg: None
2022-07-11 10:43:11,311 - mmdeploy - INFO - mmcls: None
2022-07-11 10:43:11,311 - mmdeploy - INFO - mmocr: None
2022-07-11 10:43:11,311 - mmdeploy - INFO - mmedit: None
2022-07-11 10:43:11,311 - mmdeploy - INFO - mmdet3d: None
2022-07-11 10:43:11,311 - mmdeploy - INFO - mmpose: None
2022-07-11 10:43:11,311 - mmdeploy - INFO - mmrotate: None
Process finished with exit code 0
@1wang11lijian1 Hi, could you post here the full script you are running?
This is my instruction to transform the model. @RunningLeon
python D:/mmd/mmdeploy/tools/deploy.py `
D:/mmd/mmdeploy/configs/mmdet/detection/detection_tensorrt_dynamic-320x320-1344x1344.py `
D:/mmd模型转换/file_lunzhou/yolov3_d53_mstrain-608_273e_coco.py `
D:/mmd模型转换/file_lunzhou/epoch_271.pth `
D:/mmd模型转换/Image_20220701185830629_01.jpg `
--work-dir D:/mmd模型转换/work_dir_lunzhou `
--device cuda:0 `
--show `
--dump-info
@1wang11lijian1 Standard config and ckpt works fine on my machine. Maybe you could try with latest master and use this deploy config: https://github.com/open-mmlab/mmdeploy/blob/master/configs/mmdet/detection/detection_tensorrt-int8_dynamic-160x160-608x608.py.
Hi, I used the latest Master detection_tensorrt-int8_dynamic-320x320-1344x1344.py, I still get this error
(mmdeploy) PS C:\Windows\system32> python D:/mmd/mmdeploy/tools/deploy.py `
>> D:/mmd/mmdeploy/configs/mmdet/detection/detection_tensorrt-int8_dynamic-320x320-1344x1344.py `
>> D:/mmd模型转换/file_lunzhou/yolov3_d53_mstrain-608_273e_coco.py `
>> D:/mmd模型转换/file_lunzhou/epoch_271.pth `
>> D:/mmd模型转换/Image_20220701185830629_01.jpg `
>> --work-dir D:/mmd模型转换/work_dir_lunzhou `
>> --device cuda:0 `
>> --show `
>> --dump-info
C:\ProgramData\Anaconda3\envs\mmdeploy\lib\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)
2022-07-12 09:32:14,778 - mmdeploy - INFO - Start pipeline mmdeploy.apis.pytorch2onnx.torch2onnx in subprocess
load checkpoint from local path: D:/mmd模型转换/file_lunzhou/epoch_271.pth
C:\ProgramData\Anaconda3\envs\mmdeploy\lib\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)
2022-07-12 09:32:19,977 - mmdeploy - WARNING - DeprecationWarning: get_onnx_config will be deprecated in the future.
2022-07-12 09:32:19,977 - mmdeploy - INFO - Export PyTorch model to ONNX: D:/mmd模型转换/work_dir_lunzhou\end2end.onnx.
d:\mmd\mmdeploy\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)
C:\ProgramData\Anaconda3\envs\mmdeploy\lib\site-packages\mmdet\models\dense_heads\yolo_head.py:126: UserWarning: DeprecationWarning: `anchor_generator` is deprecated, please use "prior_generator" instead
warnings.warn('DeprecationWarning: `anchor_generator` is deprecated, '
C:\ProgramData\Anaconda3\envs\mmdeploy\lib\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. '
C:\ProgramData\Anaconda3\envs\mmdeploy\lib\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. '
C:\ProgramData\Anaconda3\envs\mmdeploy\lib\site-packages\mmdet\core\bbox\coder\yolo_bbox_coder.py:73: 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) == 4
d:\mmd\mmdeploy\mmdeploy\pytorch\functions\topk.py:56: 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:
d:\mmd\mmdeploy\mmdeploy\codebase\mmdet\core\post_processing\bbox_nms.py:259: 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]),
d:\mmd\mmdeploy\mmdeploy\mmcv\ops\nms.py:178: 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)
d:\mmd\mmdeploy\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))
2022-07-12 09:32:24,209 - mmdeploy - ERROR - `mmdeploy.apis.pytorch2onnx.torch2onnx` with Call id: 0 failed. exit.
@1wang11lijian1 The error message gives little info. Could you try with https://github.com/open-mmlab/mmdetection/blob/master/configs/yolo/yolov3_d53_mstrain-608_273e_coco.py , https://github.com/open-mmlab/mmdeploy/blob/master/configs/mmdet/detection/detection_tensorrt-int8_dynamic-160x160-608x608.py and https://download.openmmlab.com/mmdetection/v2.0/yolo/yolov3_d53_mstrain-608_273e_coco/yolov3_d53_mstrain-608_273e_coco_20210518_115020-a2c3acb8.pth?
I'm sorry. We'll get the same result if we follow your advice. Looks like I need to recompile MMDeploy. @RunningLeon
@RunningLeon I just recompiled with PyTorch =1.8.0 and cuda11.1 and I still have this problem.I'm confused because I compiled it successfully twice before. I don't know what went wrong here.
command:
(mmdeploy_11.1) PS D:\mmd_11.1\mmdeploy\build\install\example\build> python D:/mmd_11.1/mmdeploy/tools/deploy.py `
>> D:/mmd_11.1/mmdeploy/configs/mmdet/detection/detection_tensorrt_dynamic-320x320-1344x1344.py `
>> D:/mmd模型转换/file_lunzhou/yolov3_d53_mstrain-608_273e_coco.py `
>> D:/mmd模型转换/file_lunzhou/epoch_271.pth `
>> D:/mmd模型转换/Image_20220701185830629_01.jpg `
>> --work-dir D:/mmd模型转换/work_dir_lunzhou `
>> --device cuda:0 `
>> --show `
>> --dump-info
error:
C:\ProgramData\Anaconda3\envs\mmdeploy_11.1\lib\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)
2022-07-12 20:17:06,949 - mmdeploy - INFO - Start pipeline mmdeploy.apis.pytorch2onnx.torch2onnx in subprocess
load checkpoint from local path: D:/mmd模型转换/file_lunzhou/epoch_271.pth
C:\ProgramData\Anaconda3\envs\mmdeploy_11.1\lib\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)
2022-07-12 20:17:11,640 - mmdeploy - WARNING - DeprecationWarning: get_onnx_config will be deprecated in the future.
2022-07-12 20:17:11,641 - mmdeploy - INFO - Export PyTorch model to ONNX: D:/mmd模型转换/work_dir_lunzhou\end2end.onnx.
d:\mmd_11.1\mmdeploy\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)
C:\ProgramData\Anaconda3\envs\mmdeploy_11.1\lib\site-packages\torch\nn\functional.py:3455: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.
"See the documentation of nn.Upsample for details.".format(mode)
C:\ProgramData\Anaconda3\envs\mmdeploy_11.1\lib\site-packages\mmdet\models\dense_heads\yolo_head.py:127: UserWarning: DeprecationWarning: `anchor_generator` is deprecated, please use "prior_generator" instead
warnings.warn('DeprecationWarning: `anchor_generator` is deprecated, '
C:\ProgramData\Anaconda3\envs\mmdeploy_11.1\lib\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. '
C:\ProgramData\Anaconda3\envs\mmdeploy_11.1\lib\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. '
C:\ProgramData\Anaconda3\envs\mmdeploy_11.1\lib\site-packages\mmdet\core\bbox\coder\yolo_bbox_coder.py:73: 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) == 4
d:\mmd_11.1\mmdeploy\mmdeploy\pytorch\functions\topk.py:56: 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:
d:\mmd_11.1\mmdeploy\mmdeploy\codebase\mmdet\core\post_processing\bbox_nms.py:259: 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]),
d:\mmd_11.1\mmdeploy\mmdeploy\mmcv\ops\nms.py:178: 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)
d:\mmd_11.1\mmdeploy\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))
2022-07-12 20:17:14,986 - mmdeploy - ERROR - `mmdeploy.apis.pytorch2onnx.torch2onnx` with Call id: 0 failed. exit.
env_info:
2022-07-12 20:19:14,387 - mmdeploy - INFO -
2022-07-12 20:19:14,387 - mmdeploy - INFO - **********Environmental information**********
'gcc' �����ڲ����ⲿ���Ҳ���ǿ����еij���
�����������
fatal: unsafe repository ('D:/mmd_11.1/mmdeploy' is owned by someone else)
To add an exception for this directory, call:
git config --global --add safe.directory D:/mmd_11.1/mmdeploy
Set the environment variable GIT_TEST_DEBUG_UNSAFE_DIRECTORIES=true and run
again for more information.
2022-07-12 20:19:15,276 - mmdeploy - INFO - sys.platform: win32
2022-07-12 20:19:15,276 - mmdeploy - INFO - Python: 3.7.12 | packaged by conda-forge | (default, Oct 26 2021, 05:35:01) [MSC v.1916 64 bit (AMD64)]
2022-07-12 20:19:15,276 - mmdeploy - INFO - CUDA available: True
2022-07-12 20:19:15,276 - mmdeploy - INFO - GPU 0: NVIDIA GeForce RTX 3060
2022-07-12 20:19:15,276 - mmdeploy - INFO - CUDA_HOME: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.1
2022-07-12 20:19:15,276 - mmdeploy - INFO - NVCC: Build cuda_11.1.relgpu_drvr455TC455_06.29190527_0
2022-07-12 20:19:15,276 - mmdeploy - INFO - GCC: n/a
2022-07-12 20:19:15,276 - mmdeploy - INFO - PyTorch: 1.8.0
2022-07-12 20:19:15,276 - mmdeploy - INFO - PyTorch compiling details: PyTorch built with:
- C++ Version: 199711
- MSVC 192829337
- Intel(R) Math Kernel Library Version 2020.0.0 Product Build 20191125 for Intel(R) 64 architecture applications
- Intel(R) MKL-DNN v1.7.0 (Git Hash 7aed236906b1f7a05c0917e5257a1af05e9ff683)
- OpenMP 2019
- CPU capability usage: AVX2
- CUDA Runtime 11.1
- NVCC architecture flags: -gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_61,code=sm_61;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_80,code=sm_80;-gencode;arch=compute_86,code=sm_86;-gencode;arch=compute_37,code=compute_37
- CuDNN 8.0.5
- Magma 2.5.4
- Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=11.1, CUDNN_VERSION=8.0.5, CXX_COMPILER=C:/cb/pytorch_1000000000000/work/tmp_bin/sccache-cl.exe, CXX_FLAGS=/DWIN32 /D_WINDOWS /GR /EHsc /w /bigobj -DUSE_PTHREADPOOL -openmp:experimental -DNDEBUG -DUSE_FBGEMM -DUSE_XNNPACK, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=1.8.0, USE_CUDA=ON, USE_CUDNN=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=OFF, USE_NNPACK=OFF, USE_OPENMP=ON,
2022-07-12 20:19:15,276 - mmdeploy - INFO - TorchVision: 0.9.0
2022-07-12 20:19:15,276 - mmdeploy - INFO - OpenCV: 4.6.0
2022-07-12 20:19:15,276 - mmdeploy - INFO - MMCV: 1.4.0
2022-07-12 20:19:15,276 - mmdeploy - INFO - MMCV Compiler: MSVC 192930137
2022-07-12 20:19:15,276 - mmdeploy - INFO - MMCV CUDA Compiler: 11.1
2022-07-12 20:19:15,276 - mmdeploy - INFO - MMDeploy: 0.6.0+
2022-07-12 20:19:15,276 - mmdeploy - INFO -
2022-07-12 20:19:15,276 - mmdeploy - INFO - **********Backend information**********
2022-07-12 20:19:15,635 - mmdeploy - INFO - onnxruntime: None ops_is_avaliable : False
2022-07-12 20:19:15,657 - mmdeploy - INFO - tensorrt: 8.2.1.8 ops_is_avaliable : True
2022-07-12 20:19:15,679 - mmdeploy - INFO - ncnn: None ops_is_avaliable : False
2022-07-12 20:19:15,680 - mmdeploy - INFO - pplnn_is_avaliable: False
2022-07-12 20:19:15,682 - mmdeploy - INFO - openvino_is_avaliable: False
2022-07-12 20:19:15,682 - mmdeploy - INFO -
2022-07-12 20:19:15,682 - mmdeploy - INFO - **********Codebase information**********
2022-07-12 20:19:15,683 - mmdeploy - INFO - mmdet: 2.25.0
2022-07-12 20:19:15,683 - mmdeploy - INFO - mmseg: None
2022-07-12 20:19:15,683 - mmdeploy - INFO - mmcls: None
2022-07-12 20:19:15,683 - mmdeploy - INFO - mmocr: None
2022-07-12 20:19:15,683 - mmdeploy - INFO - mmedit: None
2022-07-12 20:19:15,683 - mmdeploy - INFO - mmdet3d: None
2022-07-12 20:19:15,683 - mmdeploy - INFO - mmpose: None
2022-07-12 20:19:15,683 - mmdeploy - INFO - mmrotate: None
Process finished with exit code 0
@1wang11lijian1 Hi, could you set some breakpoints and debug where goes wrong? For instance, in https://github.com/open-mmlab/mmdeploy/blob/14b2bfd524d197565621fedbc47b5940bb22ceed/mmdeploy/apis/onnx/export.py#L122 and https://github.com/open-mmlab/mmdeploy/blob/14b2bfd524d197565621fedbc47b5940bb22ceed/mmdeploy/apis/onnx/export.py#L134
@RunningLeon Hi, I found out exactly which line is wrong, but I quit without knowing what the problem is here.
mmdeploy/mmdeploy/apis/onnx/export.py Line 122 in 14b2bfd torch.onnx.export(
Among
(pytorch1.8.0 )
torch\onnx\utils.py Line 421
if _retain_param_name:
graph_inputs = list(graph.inputs())# Run to this point and exit
If possible, can you add wechat for details?This is my wechat account 17361712910, thanks.
@1wang11lijian1 Hi, have you changed any code in mmdet? Could you first try with standard config and ckpt and make sure the env is OK. BTW, Better remove chinese characters from the path.
python tools/deploy.py \
configs/mmdet/detection/detection_tensorrt-int8_dynamic-160x160-608x608.py \
../mmdetection/configs/yolo/yolov3_d53_mstrain-608_273e_coco.py \
https://download.openmmlab.com/mmdetection/v2.0/yolo/yolov3_d53_mstrain-608_273e_coco/yolov3_d53_mstrain-608_273e_coco_20210518_115020-a2c3acb8.pth \
../mmdetection/demo/demo.jpg \
--work-dir ./work-dirs/mmdet/yolov3/trt \
--device cuda:0 \
--show \
--dump-info \
I have the same problem here. "mmdeploy.apis.pytorch2onnx.torch2onnx" fails after the nms message. I use detection_tensorrt_dynamic-64x64-608x608.py only with the shapes changed.