#18353·PaddleOCR

PIR optimization does not yet support the Kunlun P800 server environment.

Author: ly-cCreated Sep 9, 2026Updated Sep 9, 2026

Search before asking

  • I have searched the PaddleOCR Docs and found no similar bug report.
  • I have searched the PaddleOCR Issues and found no similar bug report.
  • I have searched the PaddleOCR Discussions and found no similar bug report.

Bug (问题描述)

跑ppocr-v4和pp-doclayoutv2: 使用json格式模型权重时,无法避开PIR优化,导致推理服务无法正常启动: 报错:UNAVAILABLE: Internal: RuntimeError: (PreconditionNotMet) Tensor holds no memory. Call Tensor::mutable_data firstly 使用pdmodel格式模型权重时,需要手动关闭PIR优化,推理服务正常启动且推理精度整体可观; 作为百度旗下昆仑芯硬件,请问什么时候可完善并推出支持PIR引擎优化呢?

‍♂️ Environment (运行环境)

P800 镜像:ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/paddleqa:xpu-ubuntu2204-x86_64-gcc123-py310 paddleocr 3.6.0 paddlepaddle-xpu 3.2.1 paddlex 3.6.1

Minimal Reproducible Example (最小可复现问题的Demo)

import paddle from paddle import inference as paddle_infer config = paddle_infer.Config( "inference.pdmodel", "inference.pdiparams", ) config.enable_xpu() config.set_xpu_device_id(0) config.enable_new_ir(True) # 此处ppocr-v4会有算子支持问题,pp-doclayoutv2会有内存问题 Tensor holds no memory predictor = paddle_infer.create_predictor(config)