Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertion `is_tensor()' failed. onnx2tensorrt [Bug] #1232

Closed
2 of 3 tasks
shuyuan-wang opened this issue Oct 21, 2022 · 8 comments
Closed
2 of 3 tasks

Assertion `is_tensor()' failed. onnx2tensorrt [Bug] #1232

shuyuan-wang opened this issue Oct 21, 2022 · 8 comments

Comments

@shuyuan-wang
Copy link

Checklist

  • I have searched related issues but cannot get the expected help.
  • 2. I have read the FAQ documentation but cannot get the expected help.
  • 3. The bug has not been fixed in the latest version.

Describe the bug

I used the command below with use of a bin file from nuscenes mini dataset. It shows Asssertion 'is_tensor()' faield when converting from onnx to tensorrt

Reproduction

python tools/deploy.py configs/mmdet3d/voxel-detection/voxel-detection_tensorrt_dynamic-nus-64x4.py ../../wsy/mmdetection3d/configs/pointpillars/hv_pointpillars_fpn_sbn-all_4x8_2x_nus-3d.py ./hv_pointpillars_fpn_sbn-all_4x8_2x_nus-3d_20210826_104936-fca299c1.pth ./n008-2018-08-01-15-16-36-0400__LIDAR_TOP__1533151603597909.pcd.bin --work-dir ./work_dir --show --device cuda:0

Environment

2022-10-21 03:48:01,879 - mmdeploy - INFO - 

2022-10-21 03:48:01,879 - mmdeploy - INFO - **********Environmental information**********
2022-10-21 03:48:02,097 - mmdeploy - INFO - sys.platform: linux
2022-10-21 03:48:02,097 - mmdeploy - INFO - Python: 3.8.13 (default, Mar 28 2022, 11:38:47) [GCC 7.5.0]
2022-10-21 03:48:02,097 - mmdeploy - INFO - CUDA available: True
2022-10-21 03:48:02,097 - mmdeploy - INFO - GPU 0: NVIDIA GeForce RTX 3090
2022-10-21 03:48:02,097 - mmdeploy - INFO - CUDA_HOME: /usr/local/cuda
2022-10-21 03:48:02,097 - mmdeploy - INFO - NVCC: Cuda compilation tools, release 11.6, V11.6.124
2022-10-21 03:48:02,097 - mmdeploy - INFO - GCC: gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
2022-10-21 03:48:02,097 - mmdeploy - INFO - PyTorch: 1.10.0
2022-10-21 03:48:02,097 - mmdeploy - INFO - PyTorch compiling details: PyTorch built with:
  - GCC 7.3
  - C++ Version: 201402
  - Intel(R) Math Kernel Library Version 2020.0.2 Product Build 20200624 for Intel(R) 64 architecture applications
  - Intel(R) MKL-DNN v2.2.3 (Git Hash 7336ca9f055cf1bfa13efb658fe15dc9b41f0740)
  - OpenMP 201511 (a.k.a. OpenMP 4.5)
  - LAPACK is enabled (usually provided by MKL)
  - NNPACK is enabled
  - 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.2
  - Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=11.3, CUDNN_VERSION=8.2.0, CXX_COMPILER=/opt/rh/devtoolset-7/root/usr/bin/c++, CXX_FLAGS= -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -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 -Wno-stringop-overflow, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=1.10.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=ON, USE_NNPACK=ON, USE_OPENMP=ON, 

2022-10-21 03:48:02,097 - mmdeploy - INFO - TorchVision: 0.11.0
2022-10-21 03:48:02,097 - mmdeploy - INFO - OpenCV: 4.5.4
2022-10-21 03:48:02,097 - mmdeploy - INFO - MMCV: 1.6.0
2022-10-21 03:48:02,097 - mmdeploy - INFO - MMCV Compiler: GCC 9.4
2022-10-21 03:48:02,097 - mmdeploy - INFO - MMCV CUDA Compiler: 11.6
2022-10-21 03:48:02,097 - mmdeploy - INFO - MMDeploy: 0.9.0+b2cb572
2022-10-21 03:48:02,097 - mmdeploy - INFO - 

2022-10-21 03:48:02,097 - mmdeploy - INFO - **********Backend information**********
2022-10-21 03:48:02,527 - mmdeploy - INFO - onnxruntime: 1.8.1  ops_is_avaliable : True
2022-10-21 03:48:02,554 - mmdeploy - INFO - tensorrt: 8.2.4.2   ops_is_avaliable : True
2022-10-21 03:48:02,569 - mmdeploy - INFO - ncnn: None  ops_is_avaliable : False
2022-10-21 03:48:02,569 - mmdeploy - INFO - pplnn_is_avaliable: False
2022-10-21 03:48:02,570 - mmdeploy - INFO - openvino_is_avaliable: False
2022-10-21 03:48:02,583 - mmdeploy - INFO - snpe_is_available: False
2022-10-21 03:48:02,584 - mmdeploy - INFO - ascend_is_available: False
2022-10-21 03:48:02,584 - mmdeploy - INFO - coreml_is_available: False
2022-10-21 03:48:02,584 - mmdeploy - INFO - 

2022-10-21 03:48:02,584 - mmdeploy - INFO - **********Codebase information**********
2022-10-21 03:48:02,587 - mmdeploy - INFO - mmdet:      2.25.2
2022-10-21 03:48:02,587 - mmdeploy - INFO - mmseg:      0.29.0
2022-10-21 03:48:02,587 - mmdeploy - INFO - mmcls:      0.22.1
2022-10-21 03:48:02,587 - mmdeploy - INFO - mmocr:      None
2022-10-21 03:48:02,587 - mmdeploy - INFO - mmedit:     0.15.2
2022-10-21 03:48:02,587 - mmdeploy - INFO - mmdet3d:    1.0.0rc5
2022-10-21 03:48:02,587 - mmdeploy - INFO - mmpose:     0.25.1
2022-10-21 03:48:02,587 - mmdeploy - INFO - mmrotate:   None

Error traceback

python: /root/gpgpu/MachineLearning/myelin/src/compiler/./ir/operand.h:166: myelin::ir::tensor_t*& myelin::ir::operand_t::tensor(): Assertion `is_tensor()' failed.
2022-10-21 03:43:40,509 - mmdeploy - ERROR - `mmdeploy.backend.tensorrt.onnx2tensorrt.onnx2tensorrt` with Call id: 1 failed. exit.
@tpoisonooo
Copy link
Collaborator

please check NVIDIA/TensorRT#1541 and try update to trt8.5 with docker.

trt8.4 still has a bug about dynamic shape.

@tpoisonooo
Copy link
Collaborator

Also check NVIDIA/TensorRT#2338.

@tpoisonooo
Copy link
Collaborator

Or downgrade to cu102+trt8.4, I have tested this combination and passed.

@Capchenxi
Copy link

Is there anyway to fix this bug or check which op caused this problem? I am not allowed to update TRT version under my environment. Thanks.

@tpoisonooo
Copy link
Collaborator

tpoisonooo commented Nov 3, 2022

TRT is actually not an open source project, I think there is nothing I can do.

NVIDIA/TensorRT#1541

@Jason-cs18
Copy link

TRT is actually not an open source project, I think there is nothing I can do.

NVIDIA/TensorRT#1541

Hello @tpoisonooo , can you provide a new Dockerfile (trt 8.4 and xxx)? I want to build mmdeploy via docker but I find that existing Dockerfile of master still uses TRT 8.2

@github-actions
Copy link

This issue is marked as stale because it has been marked as invalid or awaiting response for 7 days without any further response. It will be closed in 5 days if the stale label is not removed or if there is no further response.

@github-actions github-actions bot added the Stale label Dec 28, 2022
@github-actions
Copy link

This issue is closed because it has been stale for 5 days. Please open a new issue if you have similar issues or you have any new updates now.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants