Paddle3D icon indicating copy to clipboard operation
Paddle3D copied to clipboard

测试Paddle3D的pointpillars案例c++推理过程报错(求解决):

Open DIPTE opened this issue 3 years ago • 2 comments

##已经按照Paddle3D文档安装好了python环境以及配置好了Paddle-Inference的环境,执行至文档(Paddle3D-develop/docs/models/pointpillars/README.md)"#### C++部署(Linux系统)"步骤处报错:

	(venv) xx@xx-System-Product-Name:~/下载/Paddle3D-develop/deploy/pointpillars/cpp$ ./build/main   --model_file /home/xx/下载/Paddle3D-develop/output/pointpillars.pdmodel   --params_file /home/xx/下载/Paddle3D-develop/output/pointpillars.pdiparams   --lidar_file /home/xx/下载/Paddle3D-develop/datasets/KITTI/testing/velodyne/000019.bin   --point_cloud_range "0 -39.68 -3 69.12 39.68 1"   --voxel_size ".16 .16 4"   --max_points_in_voxel 32   --max_voxel_num 40000
	  --- Running analysis [ir_graph_build_pass]
	  --- Running analysis [ir_graph_clean_pass]
	  --- Running analysis [ir_analysis_pass]
	  --- Running IR pass [is_test_pass]
	  --- Running IR pass [simplify_with_basic_ops_pass]
	  --- Running IR pass [conv_bn_fuse_pass]
	  WARNING: Logging before InitGoogleLogging() is written to STDERR
	  I0902 19:28:10.384897 29206 fuse_pass_base.cc:57] ---  detected 16 subgraphs
	  --- Running IR pass [conv_eltwiseadd_bn_fuse_pass]
	  --- Running IR pass [embedding_eltwise_layernorm_fuse_pass]
	  --- Running IR pass [multihead_matmul_fuse_pass_v2]
	  --- Running IR pass [gpu_cpu_squeeze2_matmul_fuse_pass]
	  --- Running IR pass [gpu_cpu_reshape2_matmul_fuse_pass]
	  --- Running IR pass [gpu_cpu_flatten2_matmul_fuse_pass]
	  --- Running IR pass [gpu_cpu_map_matmul_v2_to_mul_pass]
	  I0902 19:28:10.393903 29206 fuse_pass_base.cc:57] ---  detected 1 subgraphs
	  --- Running IR pass [gpu_cpu_map_matmul_v2_to_matmul_pass]
	  --- Running IR pass [matmul_scale_fuse_pass]
	  --- Running IR pass [multihead_matmul_fuse_pass_v3]
	  --- Running IR pass [gpu_cpu_map_matmul_to_mul_pass]
	  --- Running IR pass [fc_fuse_pass]
	  --- Running IR pass [fc_elementwise_layernorm_fuse_pass]
	  --- Running IR pass [conv_elementwise_add_act_fuse_pass]
	  --- Running IR pass [conv_elementwise_add2_act_fuse_pass]
	  --- Running IR pass [conv_elementwise_add_fuse_pass]
	  I0902 19:28:10.408993 29206 fuse_pass_base.cc:57] ---  detected 3 subgraphs
	  --- Running IR pass [transpose_flatten_concat_fuse_pass]
	  --- Running IR pass [runtime_context_cache_pass]
	  --- Running analysis [ir_params_sync_among_devices_pass]
	  I0902 19:28:10.417521 29206 ir_params_sync_among_devices_pass.cc:100] Sync params from CPU to GPU
	  --- Running analysis [adjust_cudnn_workspace_size_pass]
	  --- Running analysis [inference_op_replace_pass]
	  --- Running analysis [ir_graph_to_program_pass]
	  I0902 19:28:10.507484 29206 analysis_predictor.cc:1035] ======= optimize end =======
	  I0902 19:28:10.511466 29206 naive_executor.cc:102] ---  skip [feed], feed -> voxels
	  I0902 19:28:10.511483 29206 naive_executor.cc:102] ---  skip [feed], feed -> num_points_per_voxel
	  I0902 19:28:10.511484 29206 naive_executor.cc:102] ---  skip [feed], feed -> coords
	  I0902 19:28:10.512696 29206 naive_executor.cc:102] ---  skip [_generated_var_56], fetch -> fetch
	  I0902 19:28:10.512703 29206 naive_executor.cc:102] ---  skip [_generated_var_57], fetch -> fetch
	  I0902 19:28:10.512706 29206 naive_executor.cc:102] ---  skip [_generated_var_58], fetch -> fetch
	  W0902 19:28:10.523443 29206 gpu_resources.cc:61] Please NOTE: device: 0, GPU Compute Capability: 6.1, Driver API Version: 11.7, Runtime API Version: 10.2
	  W0902 19:28:10.523874 29206 gpu_resources.cc:91] device: 0, cuDNN Version: 8.3.
	  terminate called after throwing an instance of 'phi::enforce::EnforceNotMet'
	    what():  
	  
	  --------------------------------------
	  C++ Traceback (most recent call last):
	  --------------------------------------
	  0   paddle::AnalysisPredictor::ZeroCopyRun()
	  1   paddle::framework::NaiveExecutor::Run()
	  2   paddle::framework::OperatorBase::Run(paddle::framework::Scope const&, phi::Place const&)
	  3   paddle::operators::ConditionalBlockInferOp::RunImpl(paddle::framework::Scope const&, phi::Place const&) const
	  4   paddle::framework::Executor::Run(paddle::framework::ProgramDesc const&, paddle::framework::Scope*, int, bool, bool, std::vector<std::string, std::allocator<std::string > > const&, bool, bool)
	  5   paddle::framework::Executor::RunPreparedContext(paddle::framework::ExecutorPrepareContext*, paddle::framework::Scope*, bool, bool, bool)
	  6   paddle::framework::Executor::RunPartialPreparedContext(paddle::framework::ExecutorPrepareContext*, paddle::framework::Scope*, long, long, bool, bool, bool)
	  7   paddle::framework::OperatorBase::Run(paddle::framework::Scope const&, phi::Place const&)
	  8   paddle::operators::ConditionalBlockOp::RunImpl(paddle::framework::Scope const&, phi::Place const&) const
	  9   paddle::framework::Executor::Run(paddle::framework::ProgramDesc const&, paddle::framework::Scope*, int, bool, bool, std::vector<std::string, std::allocator<std::string > > const&, bool, bool)
	  10  paddle::framework::Executor::Prepare(paddle::framework::ProgramDesc const&, int, std::vector<std::string, std::allocator<std::string > > const&, bool)
	  11  paddle::framework::OpRegistry::CreateOp(paddle::framework::OpDesc const&)
	  12  paddle::framework::OpRegistry::CreateOp(std::string const&, std::map<std::string, std::vector<std::string, std::allocator<std::string > >, std::less<std::string >, std::allocator<std::pair<std::string const, std::vector<std::string, std::allocator<std::string > > > > > const&, std::map<std::string, std::vector<std::string, std::allocator<std::string > >, std::less<std::string >, std::allocator<std::pair<std::string const, std::vector<std::string, std::allocator<std::string > > > > > const&, paddle::framework::AttributeMap const&, bool)
	  13  phi::enforce::EnforceNotMet::EnforceNotMet(phi::ErrorSummary const&, char const*, int)
	  14  phi::enforce::GetCurrentTraceBackString[abi:cxx11](bool)
	  
	  ----------------------
	  Error Message Summary:
	  ----------------------
	  NotFoundError: Operator (nms_gpu) is not registered.
	    [Hint: op_info_ptr should not be null.] (at /home/ls/下载/Paddle/paddle/fluid/framework/op_info.h:151)
	  
	  已放弃 (核心已转储)

##运行python环境如下:

	(venv) xx@xx-System-Product-Name:~/下载/Paddle3D-develop/deploy/pointpillars/cpp$ pip list
	Package              Version      Editable project location
	-------------------- ------------ ----------------------------
	argon2-cffi          21.3.0
	argon2-cffi-bindings 21.2.0
	astor                0.8.1
	async-generator      1.10
	attrs                22.1.0
	Babel                2.10.3
	backcall             0.2.0
	bce-python-sdk       0.8.74
	bleach               4.1.0
	cachetools           4.2.4
	certifi              2022.6.15
	cffi                 1.15.1
	charset-normalizer   2.0.12
	click                8.0.4
	colorlog             6.6.0
	cycler               0.11.0
	Cython               0.29.32
	dataclasses          0.8
	decorator            4.4.2
	defusedxml           0.7.1
	descartes            1.1.0
	dill                 0.3.4
	easydict             1.9
	entrypoints          0.4
	et-xmlfile           1.1.0
	filelock             3.4.1
	fire                 0.4.0
	Flask                2.0.3
	Flask-Babel          2.0.0
	future               0.18.2
	gast                 0.5.3
	idna                 3.3
	imageio              2.15.0
	importlib-metadata   4.8.3
	importlib-resources  5.4.0
	ipykernel            5.5.6
	ipython              7.16.3
	ipython-genutils     0.2.0
	ipywidgets           7.7.2
	itsdangerous         2.0.1
	jedi                 0.17.2
	Jinja2               3.0.3
	joblib               1.1.0
	jsonschema           4.0.0
	jupyter              1.0.0
	jupyter-client       7.1.2
	jupyter-console      6.4.3
	jupyter-core         4.9.2
	jupyterlab-pygments  0.1.2
	jupyterlab-widgets   1.1.1
	kiwisolver           1.3.1
	lap                  0.4.0
	llvmlite             0.36.0
	MarkupSafe           2.0.1
	matplotlib           3.3.4
	mistune              0.8.4
	motmetrics           1.2.5
	multiprocess         0.70.12.2
	nbclient             0.5.9
	nbconvert            6.0.7
	nbformat             5.1.3
	nest-asyncio         1.5.5
	networkx             2.5.1
	notebook             6.4.10
	numba                0.53.1
	numpy                1.19.5
	nuscenes-devkit      1.1.9
	opencv-python        4.6.0.66
	openpyxl             3.0.10
	opt-einsum           3.3.0
	packaging            21.3
	paddle-bfloat        0.1.7
	paddle3d             0.5.0        /home/xx/下载/Paddle3D-develop
	paddledet            2.4.0
	paddlepaddle-gpu     2.3.2
	paddleseg            2.6.0
	pandas               1.1.5
	pandocfilters        1.5.0
	parso                0.7.1
	pexpect              4.8.0
	pickleshare          0.7.5
	Pillow               8.3.2
	pip                  21.3.1
	pkg_resources        0.0.0
	prettytable          2.5.0
	prometheus-client    0.14.1
	prompt-toolkit       3.0.30
	protobuf             3.19.4
	ptyprocess           0.7.0
	pycocotools          2.0.4
	pycparser            2.21
	pycryptodome         3.15.0
	Pygments             2.13.0
	pyparsing            3.0.9
	pyquaternion         0.9.9
	pyrsistent           0.18.0
	python-dateutil      2.8.2
	pytz                 2022.2.1
	PyWavelets           1.1.1
	PyYAML               6.0
	pyzmq                23.2.1
	qtconsole            5.2.2
	QtPy                 2.0.1
	rarfile              4.0
	requests             2.27.1
	scikit-image         0.17.2
	scikit-learn         0.24.2
	scipy                1.5.4
	Send2Trash           1.8.0
	setuptools           59.6.0
	Shapely              1.8.4
	six                  1.16.0
	sklearn              0.0
	termcolor            1.1.0
	terminado            0.13.0
	terminaltables       3.1.10
	testpath             0.6.0
	threadpoolctl        3.1.0
	tifffile             2020.9.3
	torch                1.10.0+cu102
	torchaudio           0.10.0+cu102
	torchvision          0.11.0+cu102
	tornado              6.1
	tqdm                 4.64.0
	traitlets            4.3.3
	typeguard            2.13.3
	typing_extensions    4.1.1
	urllib3              1.26.12
	visualdl             2.4.0
	wcwidth              0.2.5
	webencodings         0.5.1
	Werkzeug             2.0.3
	wheel                0.37.1
	widgetsnbextension   3.6.1
	xmltodict            0.13.0
	zipp                 3.6.0

DIPTE avatar Sep 02 '22 11:09 DIPTE

paddle3d/ops/路径下,执行

python setup.py install

安装一下模型所需的自定义算子nms_gpu

will-jl944 avatar Sep 05 '22 02:09 will-jl944

paddle3d/ops/路径下,执行

python setup.py install

安装一下模型所需的自定义算子nms_gpu

感谢解答,您提出的这个方法试过了,不过还是会有问题。后面gcc改用8.2.0版本就解决了。

DIPTE avatar Sep 27 '22 10:09 DIPTE