PaddleNLP [Bug]: uie-x推理时报onnxruntime,CUDA no kernel image is available for execution on the device错误

piwo6bdm  于 5个月前  发布在  其他
关注(0)|答案(1)|浏览(64)

软件环境

- paddlepaddle:
- paddlepaddle-gpu: 2.5.0 
- paddlenlp:  2.5.2

重复问题

  • 我已搜索了现有的问题

错误描述

在进行uix添加了版面分析微调完模型后进行fp16的推理,报如下错误:

2023-07-25 09:31:34.677229915 [E:onnxruntime:, sequential_executor.cc:369 Execute] Non-zero status code returned while running Expand node. Name:'p2o.Expand.4' Status Message: CUDA error cudaErrorNoKernelImageForDevice:no kernel image is available for execution on the device
Traceback (most recent call last):
  File "test.py", line 9, in <module>
    results = my_ie({"doc": doc_path})
  File "/root/miniconda3/envs/myconda/lib/python3.8/site-packages/paddlenlp/taskflow/taskflow.py", line 850, in __call__
    results = self.task_instance(inputs)
  File "/root/miniconda3/envs/myconda/lib/python3.8/site-packages/paddlenlp/taskflow/task.py", line 516, in __call__
    outputs = self._run_model(inputs)
  File "/root/miniconda3/envs/myconda/lib/python3.8/site-packages/paddlenlp/taskflow/information_extraction.py", line 1066, in _run_model
    results = self._multi_stage_predict(_inputs)
  File "/root/miniconda3/envs/myconda/lib/python3.8/site-packages/paddlenlp/taskflow/information_extraction.py", line 1164, in _multi_stage_predict
    result_list = self._single_stage_predict(examples)
  File "/root/miniconda3/envs/myconda/lib/python3.8/site-packages/paddlenlp/taskflow/information_extraction.py", line 1002, in _single_stage_predict
    start_prob, end_prob = self.predictor.run(None, input_dict)
  File "/root/miniconda3/envs/myconda/lib/python3.8/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 200, in run
    return self._sess.run(output_names, input_feed, run_options)
onnxruntime.capi.onnxruntime_pybind11_state.Fail: [ONNXRuntimeError] : 1 : FAIL : Non-zero status code returned while running Expand node. Name:'p2o.Expand.4' Status Message: CUDA error cudaErrorNoKernelImageForDevice:no kernel image is available for execution on the device

稳定复现步骤 & 代码

atmip9wb

atmip9wb1#

这与 CUDA 版本有关,请确保 CUDA 版本和 Paddle 的版本是一致的。

相关问题