Yzichen / FlashOCC

258 stars 28 forks source link

AssertionError: bev_pool_v2 is not in the plugin list of tensorrt #38

Closed CrazyMustard-404 closed 2 weeks ago

CrazyMustard-404 commented 5 months ago

Hi, I have already installed mmdeploy from git clone git@github.com:drilistbox/mmdeploy.git, but there is an error when I used the command: python tools/convert_bevdet_to_TRT.py $config $checkpoint $work_dir --fuse-conv-bn --fp16 Could you please give me some instructions? Thank you.

(FlashOcc) 3@1:~/FlashOCC-master-V2$ python tools/convert_bevdet_to_TRT.py $config $checkpoint $work_dir --fuse-conv-bn --int8 --calib_num 256

2024-05-09 18:00:45,267 - mmdeploy - INFO - Successfully loaded tensorrt plugins from /home/xinjishu-workstation3/FY/FlashOCC-master-V2/mmdeploy/build/lib/libmmdeploy_tensorrt_ops.so Traceback (most recent call last): File "tools/convert_bevdet_to_TRT.py", line 560, in main() File "tools/convert_bevdet_to_TRT.py", line 311, in main assert 'bev_pool_v2' in get_plugin_names(), \ AssertionError: bev_pool_v2 is not in the plugin list of tensorrt, please install mmdeploy from https://github.com/HuangJunJie2017/mmdeploy.git

drilistbox commented 3 months ago

There appears to be an issue with the installation of mmdeploy (git@github.com:drilistbox/mmdeploy.git). We kindly recommend following the https://github.com/Yzichen/FlashOCC/blob/master/doc/install.md meticulously to ensure the proper setup of the environment.

xzyun2011 commented 1 month ago

There's a small bug in the linked tutorial https://github.com/Yzichen/FlashOCC/blob/master/doc/install.md in"step 6. (Optional) Install mmdeploy for tensorrt testing"

#pip install nvidia-tensorrt==8.4.0.6
pip install nvidia-tensorrt==8.4.1.5
pip install tensorrt
#pip install h5py

should be

pip install nvidia-tensorrt==8.4.0.6
pip install tensorrt
pip install h5py

Also, one may have trouble installing "onnxruntime-gpu==1.8.1"(it's a very old version that might no longer be available in the source), a possible alternative is version 1.10.0( "pip onnxruntime-gpu==1.10.0" and download from https://github.com/microsoft/onnxruntime/releases/download/v1.10.0/onnxruntime-linux-x64-1.10.0.tgz), which worked for me.

drilistbox commented 1 month ago

Thanks for your suggestion

xubin1994 commented 1 month ago

Hi, I have already installed mmdeploy from git clone git@github.com:drilistbox/mmdeploy.git, but there is an error when I used the command: python tools/convert_bevdet_to_TRT.py $config $checkpoint $work_dir --fuse-conv-bn --fp16 Could you please give me some instructions? Thank you.

(FlashOcc) 3@1:~/FlashOCC-master-V2$ python tools/convert_bevdet_to_TRT.py $config $checkpoint $work_dir --fuse-conv-bn --int8 --calib_num 256

2024-05-09 18:00:45,267 - mmdeploy - INFO - Successfully loaded tensorrt plugins from /home/xinjishu-workstation3/FY/FlashOCC-master-V2/mmdeploy/build/lib/libmmdeploy_tensorrt_ops.so Traceback (most recent call last): File "tools/convert_bevdet_to_TRT.py", line 560, in main() File "tools/convert_bevdet_to_TRT.py", line 311, in main assert 'bev_pool_v2' in get_plugin_names(), AssertionError: bev_pool_v2 is not in the plugin list of tensorrt, please install mmdeploy from https://github.com/HuangJunJie2017/mmdeploy.git

I also encountered the same problem, have you solved it?

zyxcambridge commented 3 weeks ago

(FlashOcc) (base) zyx@zyx:~/code/FlashOCC/mmdeploy/build$ make -j 16 Consolidate compiler generated dependencies of target mmdeploy_onnxruntime_ops_obj Consolidate compiler generated dependencies of target mmdeploy_tensorrt_ops_obj [ 13%] Built target mmdeploy_onnxruntime_ops_obj [ 15%] Built target mmdeploy_onnxruntime_ops [ 97%] Built target mmdeploy_tensorrt_ops_obj [100%] Built target mmdeploy_tensorrt_ops (FlashOcc) (base) zyx@zyx:~/code/FlashOCC/mmdeploy/build$ pip install -e . Looking in indexes: https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple Obtaining file:///home/zyx/code/FlashOCC/mmdeploy/build ERROR: file:///home/zyx/code/FlashOCC/mmdeploy/build does not appear to be a Python project: neither 'setup.py' nor 'pyproject.toml' found. (FlashOcc) (base) zyx@zyx:~/code/FlashOCC/mmdeploy/build$ cd .. (FlashOcc) (base) zyx@zyx:~/code/FlashOCC/mmdeploy$ pip install -e . Looking in indexes: https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple Obtaining file:///home/zyx/code/FlashOCC/mmdeploy Preparing metadata (setup.py) ... done Requirement already satisfied: grpcio in /home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/site-packages (from mmdeploy==0.9.0) (1.66.1) Requirement already satisfied: h5py in /home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/site-packages (from mmdeploy==0.9.0) (3.11.0) Requirement already satisfied: matplotlib in /home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/site-packages (from mmdeploy==0.9.0) (3.5.3) Requirement already satisfied: multiprocess in /home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/site-packages (from mmdeploy==0.9.0) (0.70.16) Requirement already satisfied: numpy in /home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/site-packages (from mmdeploy==0.9.0) (1.23.5) Requirement already satisfied: onnx>=1.8.0 in /home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/site-packages (from mmdeploy==0.9.0) (1.12.0) Requirement already satisfied: protobuf<=3.20.1 in /home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/site-packages (from mmdeploy==0.9.0) (3.20.1) Requirement already satisfied: six in /home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/site-packages (from mmdeploy==0.9.0) (1.16.0) Requirement already satisfied: terminaltables in /home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/site-packages (from mmdeploy==0.9.0) (3.1.10) Requirement already satisfied: tqdm in /home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/site-packages (from mmdeploy==0.9.0) (4.65.2) Requirement already satisfied: typing-extensions>=3.6.2.1 in /home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/site-packages (from onnx>=1.8.0->mmdeploy==0.9.0) (4.11.0) Requirement already satisfied: cycler>=0.10 in /home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/site-packages (from matplotlib->mmdeploy==0.9.0) (0.12.1) Requirement already satisfied: fonttools>=4.22.0 in /home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/site-packages (from matplotlib->mmdeploy==0.9.0) (4.53.1) Requirement already satisfied: kiwisolver>=1.0.1 in /home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/site-packages (from matplotlib->mmdeploy==0.9.0) (1.4.7) Requirement already satisfied: packaging>=20.0 in /home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/site-packages (from matplotlib->mmdeploy==0.9.0) (24.1) Requirement already satisfied: pillow>=6.2.0 in /home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/site-packages (from matplotlib->mmdeploy==0.9.0) (10.4.0) Requirement already satisfied: pyparsing>=2.2.1 in /home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/site-packages (from matplotlib->mmdeploy==0.9.0) (3.1.4) Requirement already satisfied: python-dateutil>=2.7 in /home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/site-packages (from matplotlib->mmdeploy==0.9.0) (2.9.0.post0) Requirement already satisfied: dill>=0.3.8 in /home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/site-packages (from multiprocess->mmdeploy==0.9.0) (0.3.8) Installing collected packages: mmdeploy DEPRECATION: Legacy editable install of mmdeploy==0.9.0 from file:///home/zyx/code/FlashOCC/mmdeploy (setup.py develop) is deprecated. pip 25.0 will enforce this behaviour change. A possible replacement is to add a pyproject.toml or enable --use-pep517, and use setuptools >= 64. If the resulting installation is not behaving as expected, try using --config-settings editable_mode=compat. Please consult the setuptools documentation for more information. Discussion can be found at https://github.com/pypa/pip/issues/11457 Running setup.py develop for mmdeploy Successfully installed mmdeploy (FlashOcc) (base) zyx@zyx:~/code/FlashOCC/mmdeploy$ cd .. (FlashOcc) (base) zyx@zyx:~/code/FlashOCC$ python tools/analysis_tools/benchmark_trt.py $config $engine --eval 2024-09-12 16:23:23,282 - mmdeploy - INFO - Successfully loaded tensorrt plugins from /home/zyx/code/FlashOCC/mmdeploy/build/lib/libmmdeploy_tensorrt_ops.so Warnings: evaluation requirement detected, set postprocessing=True for evaluation purpose projects.mmdet3d_plugin Using /home/zyx/.cache/torch_extensions/py38_cu113 as PyTorch extensions root... Detected CUDA files, patching ldflags Emitting ninja build file /home/zyx/.cache/torch_extensions/py38_cu113/dvr/build.ninja... Building extension module dvr... Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N) ninja: no work to do. Loading extension module dvr... /home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/site-packages/torch/functional.py:478: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ../aten/src/ATen/native/TensorShape.cpp:2894.) return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined] /home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/site-packages/mmdet/models/backbones/resnet.py:401: UserWarning: DeprecationWarning: pretrained is deprecated, please use "init_cfg" instead warnings.warn('DeprecationWarning: pretrained is deprecated, ' /home/zyx/code/FlashOCC/projects/mmdet3d_plugin/models/losses/cross_entropy_loss.py:240: UserWarning: Default avg_non_ignore is False, if you would like to ignore the certain label and average loss over non-ignore labels, which is the same with PyTorch official cross_entropy, set avg_non_ignore=True. warnings.warn( Traceback (most recent call last): File "tools/analysis_tools/benchmark_trt.py", line 282, in fps = main() File "tools/analysis_tools/benchmark_trt.py", line 180, in main trtmodel = TRTWrapper(args.engine, [f'output{i}' for i in range(1)]) File "tools/analysis_tools/benchmark_trt.py", line 77, in init with open(self.engine, mode='rb') as f: FileNotFoundError: [Errno 2] No such file or directory: 'work_dirs/flashocc-r50/onnx_trt/bevdet_int8_fuse.engine' (FlashOcc) (base) zyx@zyx:~/code/FlashOCC$ python tools/convert_bevdet_to_TRT.py $config $checkpoint $work_dir --fuse-conv-bn --int8 --calib_num 256 2024-09-12 16:23:38,653 - mmdeploy - INFO - Successfully loaded tensorrt plugins from /home/zyx/code/FlashOCC/mmdeploy/build/lib/libmmdeploy_tensorrt_ops.so Traceback (most recent call last): File "tools/convert_bevdet_to_TRT.py", line 560, in main() File "tools/convert_bevdet_to_TRT.py", line 311, in main assert 'bev_pool_v2' in get_plugin_names(), \ AssertionError: bev_pool_v2 is not in the plugin list of tensorrt, please install mmdeploy from https://github.com/HuangJunJie2017/mmdeploy.git (FlashOcc) (base) zyx@zyx:~/code/FlashOCC$