Closed mqy9787 closed 1 week ago
使用这个链接中提供的镜像和paddle包试试呢?我看你安装的paddle版本应该不是这个文档里的 https://github.com/PaddlePaddle/PaddleX/blob/release/3.0-beta1/docs/other_devices_support/paddlepaddle_install_NPU.md
可以了paddle和 paddle_custom_npu版本需要改为文档的指定版本安装
使用这个链接中提供的镜像和paddle包试试呢?我看你安装的paddle版本应该不是这个文档里的 https://github.com/PaddlePaddle/PaddleX/blob/release/3.0-beta1/docs/other_devices_support/paddlepaddle_install_NPU.md
考虑到问题已经解决,我将先关闭这个issue。如果你有其他问题,欢迎随时发起新的issue~
描述问题
华为昇腾910b机器,执行 paddlex --pipeline OCR --input https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_ocr_002.png --device npu:1 报错
环境
加速卡:昇腾910B3 驱动版本:24.1.rc1
拉取该链接推荐的910Bdocker镜像 安装paddle 版本号:3.0.0b1 python -m pip install paddlepaddle==3.0.0b1 -i https://www.paddlepaddle.org.cn/packages/stable/cpu/ 安装paddle-custom-npu 版本号:3.0.0.dev20241107 pip install paddle-custom-npu -i https://www.paddlepaddle.org.cn/packages/nightly/npu 安装paddleX 版本号:3.0.0b1 pip install https://paddle-model-ecology.bj.bcebos.com/paddlex/whl/paddlex-3.0.0b1-py3-none-any.whl
复现
上述环境正常安装完成后,执行OCR 产品线示例命令 paddlex --pipeline OCR --input https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_ocr_002.png --device npu:1
报错: Traceback (most recent call last): File "/usr/local/bin/paddlex", line 8, in
sys.exit(console_entry())
File "/usr/local/lib/python3.9/dist-packages/paddlex/main.py", line 28, in console_entry
code = main()
File "/usr/local/lib/python3.9/dist-packages/paddlex/paddlex_cli.py", line 189, in main
return pipeline_predict(
File "/usr/local/lib/python3.9/dist-packages/paddlex/paddlex_cli.py", line 146, in pipeline_predict
for res in result:
File "/usr/local/lib/python3.9/dist-packages/paddlex/inference/pipelines/base.py", line 67, in call
yield from self.predict(*args, kwargs)
File "/usr/local/lib/python3.9/dist-packages/paddlex/inference/pipelines/ocr.py", line 77, in predict
for rec_res in self.text_rec_model(all_subs_of_img):
File "/usr/local/lib/python3.9/dist-packages/paddlex/inference/models/base/base_predictor.py", line 46, in call
for res in super().call(input):
File "/usr/local/lib/python3.9/dist-packages/paddlex/inference/components/base.py", line 57, in call
for each_output in output:
File "/usr/local/lib/python3.9/dist-packages/paddlex/inference/models/base/basic_predictor.py", line 48, in apply
yield from self._generate_res(self.engine(input))
File "/usr/local/lib/python3.9/dist-packages/paddlex/inference/utils/process_hook.py", line 46, in wrapper
for ele in input:
File "/usr/local/lib/python3.9/dist-packages/paddlex/inference/components/base.py", line 277, in call
yield from self.call(data, i + 1)
File "/usr/local/lib/python3.9/dist-packages/paddlex/inference/components/base.py", line 277, in call
yield from self.call(data, i + 1)
File "/usr/local/lib/python3.9/dist-packages/paddlex/inference/components/base.py", line 276, in call
for data in data_gen:
File "/usr/local/lib/python3.9/dist-packages/paddlex/inference/components/base.py", line 43, in call
output = self.apply(args)
File "/usr/local/lib/python3.9/dist-packages/paddlex/inference/components/paddle_predictor/predictor.py", line 189, in apply
self.predictor.run()
ValueError: (InvalidArgument) The size of outputs_args names (2) must be equal to the size of kernel output_defs (1).
[Hint: Expected output_names.size() == output_defs.size(), but received output_names.size():2 != output_defs.size():1.] (at /paddle/paddle/fluid/framework/operator.cc:3210)
[operator < squeeze2 > error]
dlsym aclnnScaleGetWorkspaceSize from libopapi.so failed, error:/usr/local/Ascend/ascend-toolkit/latest/lib64/libopapi.so: undefined symbol: aclnnScaleGetWorkspaceSize.dlsym aclnnScale from libopapi.so failed, error:/usr/local/Ascend/ascend-toolkit/latest/lib64/libopapi.so: undefined symbol: aclnnScale.
备注
看主页说明国产化硬件能力支持列表 通用OCR能力已支持昇腾910B,请问能否给出适配成功的推荐环境。