mmdeploy icon indicating copy to clipboard operation
mmdeploy copied to clipboard

RuntimeError: CUDA error: misaligned address

Open brilliant-soilder opened this issue 1 year ago • 2 comments

I want to test the detect-speed of a bunch of images, so I made a folder put in 10 imgs & .json as coco setting. When I run the mmdeploy/tools/test.py like bellow, it lays an error "misaligned address"

python test.py
../configs/mmdet/detection/detection_tensorrt-fp16_static-640x256_2.py
../../mmdetection-2.20.0/configs/mask_rcnn/mask_rcnn_x101_64x4d_fpn_mstrain-poly_3x_coco2.py
--model ../work_dirs/mask_rcnn_static_640x256/end2end.engine
--speed-test
--log2file work_dirs/logs/mask_rcnn_static_640x256/logs-cuda.txt
--device cuda:0

【error:】 loading annotations into memory... Done (t=0.00s) creating index... index created! 2022-07-26 11:39:16,937 - mmdeploy - INFO - Successfully loaded tensorrt plugins from /home/tz/tz/mmdeploy/mmdeploy/lib/libmmdeploy_tensorrt_ops.so 2022-07-26 11:39:16,938 - mmdeploy - INFO - Successfully loaded tensorrt plugins from /home/tz/tz/mmdeploy/mmdeploy/lib/libmmdeploy_tensorrt_ops.so [07/26/2022-11:39:17] [TRT] [W] TensorRT was linked against cuBLAS/cuBLAS LT 10.2.3 but loaded cuBLAS/cuBLAS LT 10.2.2 [07/26/2022-11:39:17] [TRT] [W] TensorRT was linked against cuBLAS/cuBLAS LT 10.2.3 but loaded cuBLAS/cuBLAS LT 10.2.2 [ ] 0/10, elapsed: 0s, ETA:Traceback (most recent call last): File "/home/tz/tz/mmdeploy/tools/test.py", line 137, in main() File "/home/tz/tz/mmdeploy/tools/test.py", line 126, in main outputs = task_processor.single_gpu_test(model, data_loader, File "/home/tz/tz/mmdeploy/mmdeploy/codebase/base/task.py", line 138, in single_gpu_test return self.codebase_class.single_gpu_test(model, data_loader, show, File "/home/tz/tz/mmdeploy/mmdeploy/codebase/mmdet/deploy/mmdetection.py", line 142, in single_gpu_test outputs = single_gpu_test(model, data_loader, show, out_dir, **kwargs) File "/home/tz/tz/mmdetection-2.20.0/mmdet/apis/test.py", line 28, in single_gpu_test result = model(return_loss=False, rescale=True, **data) File "/home/tz/anaconda3/envs/tensorrt/lib/python3.9/site-packages/torch/nn/modules/module.py", line 889, in _call_impl result = self.forward(*input, **kwargs) File "/home/tz/anaconda3/envs/tensorrt/lib/python3.9/site-packages/mmcv/parallel/data_parallel.py", line 50, in forward return super().forward(*inputs, **kwargs) File "/home/tz/anaconda3/envs/tensorrt/lib/python3.9/site-packages/torch/nn/parallel/data_parallel.py", line 165, in forward return self.module(*inputs[0], **kwargs[0]) File "/home/tz/anaconda3/envs/tensorrt/lib/python3.9/site-packages/torch/nn/modules/module.py", line 889, in _call_impl result = self.forward(*input, **kwargs) File "/home/tz/tz/mmdeploy/mmdeploy/codebase/mmdet/deploy/object_detection_model.py", line 198, in forward outputs = self.forward_test(input_img, img_metas, *args, **kwargs) File "/home/tz/tz/mmdeploy/mmdeploy/codebase/mmdet/deploy/object_detection_model.py", line 274, in forward_test outputs = self.wrapper({self.input_name: imgs}) File "/home/tz/anaconda3/envs/tensorrt/lib/python3.9/site-packages/torch/nn/modules/module.py", line 889, in _call_impl result = self.forward(*input, **kwargs) File "/home/tz/tz/mmdeploy/mmdeploy/backend/tensorrt/wrapper.py", line 165, in forward self.__trt_execute(bindings=bindings) File "/home/tz/tz/mmdeploy/mmdeploy/utils/timer.py", line 65, in fun torch.cuda.synchronize() File "/home/tz/anaconda3/envs/tensorrt/lib/python3.9/site-packages/torch/cuda/init.py", line 402, in synchronize return torch._C._cuda_synchronize() RuntimeError: CUDA error: misaligned address 已放弃 (核心已转储)

brilliant-soilder avatar Jul 26 '22 07:07 brilliant-soilder

check_env:

2022-07-21 08:26:22,024 - mmdeploy - INFO -

2022-07-21 08:26:22,024 - mmdeploy - INFO - Environmental information 2022-07-21 08:26:23,874 - mmdeploy - INFO - sys.platform: linux 2022-07-21 08:26:23,875 - mmdeploy - INFO - Python: 3.9.12 (main, Jun 1 2022, 11:38:51) [GCC 7.5.0] 2022-07-21 08:26:23,875 - mmdeploy - INFO - CUDA available: True 2022-07-21 08:26:23,875 - mmdeploy - INFO - GPU 0: NVIDIA GeForce GTX 1650 2022-07-21 08:26:23,875 - mmdeploy - INFO - CUDA_HOME: /usr/local/cuda-10.2 2022-07-21 08:26:23,875 - mmdeploy - INFO - NVCC: Cuda compilation tools, release 10.2, V10.2.89 2022-07-21 08:26:23,875 - mmdeploy - INFO - GCC: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0 2022-07-21 08:26:23,875 - mmdeploy - INFO - PyTorch: 1.8.0 2022-07-21 08:26:23,875 - mmdeploy - INFO - PyTorch compiling details: PyTorch built with:

GCC 7.3 C++ Version: 201402 Intel(R) oneAPI Math Kernel Library Version 2021.4-Product Build 20210904 for Intel(R) 64 architecture applications Intel(R) MKL-DNN v1.7.0 (Git Hash 7aed236906b1f7a05c0917e5257a1af05e9ff683) OpenMP 201511 (a.k.a. OpenMP 4.5) NNPACK is enabled CPU capability usage: AVX2 CUDA Runtime 10.2 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_37,code=compute_37 CuDNN 7.6.5 Magma 2.5.2 Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=10.2, CUDNN_VERSION=7.6.5, 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 -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.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=ON, USE_NNPACK=ON, USE_OPENMP=ON,

2022-07-21 08:26:23,875 - mmdeploy - INFO - TorchVision: 0.2.2 2022-07-21 08:26:23,875 - mmdeploy - INFO - OpenCV: 4.6.0 2022-07-21 08:26:23,875 - mmdeploy - INFO - MMCV: 1.4.0 2022-07-21 08:26:23,875 - mmdeploy - INFO - MMCV Compiler: GCC 7.3 2022-07-21 08:26:23,875 - mmdeploy - INFO - MMCV CUDA Compiler: 10.2 2022-07-21 08:26:23,875 - mmdeploy - INFO - MMDeploy: 0.5.0+fa034e0 2022-07-21 08:26:23,875 - mmdeploy - INFO -

2022-07-21 08:26:23,875 - mmdeploy - INFO - Backend information 2022-07-21 08:26:27,741 - mmdeploy - INFO - onnxruntime: 1.10.0 ops_is_avaliable : True 2022-07-21 08:26:27,928 - mmdeploy - INFO - tensorrt: 8.2.3.0 ops_is_avaliable : True 2022-07-21 08:26:27,936 - mmdeploy - INFO - ncnn: None ops_is_avaliable : False 2022-07-21 08:26:27,939 - mmdeploy - INFO - pplnn_is_avaliable: False 2022-07-21 08:26:27,942 - mmdeploy - INFO - openvino_is_avaliable: False 2022-07-21 08:26:27,942 - mmdeploy - INFO -

2022-07-21 08:26:27,942 - mmdeploy - INFO - Codebase information 2022-07-21 08:26:27,994 - mmdeploy - INFO - mmdet: 2.20.0 2022-07-21 08:26:27,994 - mmdeploy - INFO - mmseg: None 2022-07-21 08:26:27,995 - mmdeploy - INFO - mmcls: None 2022-07-21 08:26:27,995 - mmdeploy - INFO - mmocr: None 2022-07-21 08:26:27,995 - mmdeploy - INFO - mmedit: None 2022-07-21 08:26:27,995 - mmdeploy - INFO - mmdet3d: None 2022-07-21 08:26:27,995 - mmdeploy - INFO - mmpose: None 2022-07-21 08:26:27,995 - mmdeploy - INFO - mmrotate: None

brilliant-soilder avatar Jul 26 '22 07:07 brilliant-soilder

mask_rcnn is of instance-seg. Please use instance-seg configs.

AllentDan avatar Jul 27 '22 07:07 AllentDan