PaddlePaddle / PaddlePaddle/FastDeploy

从内存中加载模型时报错:进程已结束,退出代码为 -1073741819 (0xC0000005)

Open
#2,479 1 comment 0 reactions 1 assignee View on GitHub

@rainyfly is already working on this.

Since Jun 24, 2024.

Dominant language
Python
Stars
3.7k
Forks
756
Avg merge
19h 28m
Merged PRs (30d)
4

Description

环境

  • 【FastDeploy版本】:fastdeploy-gpu-python 1.0.7
  • 【系统平台】: Windows x64(Windows10)
  • 【硬件】: Nvidia GPU 3090TI, CUDA 11.2 CUDNN 8.3
  • 【编译语言】: Python3.9

问题日志及出现问题的操作流程

model_file = Path(r"D:\workspace\ZhousfLib\model\inference.pdmodel")
params_file = Path(r"D:\workspace\ZhousfLib\model\inference.pdiparams")
config_file = Path(r"D:\workspace\ZhousfLib\model\inference_cls.yaml")
try:
    with model_file.open("rb") as model_buffer, params_file.open("rb") as params_buffer:
        # runtime_option read model form memory
        runtime_option.set_model_buffer(model_buffer.read(), params_buffer.read())
        runtime_option.use_gpu(0)
        runtime_option.use_paddle_backend()
        # Initialize model without model path and params path
        model = fd.vision.classification.PaddleClasModel("", "", str(config_file), runtime_option=runtime_option)
except Exception as e:
    print(e)

直接报错:

[INFO] fastdeploy/vision/common/processors/transform.cc(93)::fastdeploy::vision::FuseNormalizeHWC2CHW	Normalize and HWC2CHW are fused to NormalizeAndPermute  in preprocessing pipeline.
[INFO] fastdeploy/vision/common/processors/transform.cc(159)::fastdeploy::vision::FuseNormalizeColorConvert	BGR2RGB and NormalizeAndPermute are fused to NormalizeAndPermute with swap_rb=1

进程已结束,退出代码为 -1073741819 (0xC0000005)

看报错是内存非法访问,不知道哪里出了问题,代码参考 #1073
@rainyfly 麻烦帮忙看下,感谢~

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.