PaddlePaddle / PaddleNLP

👑 Easy-to-use and powerful NLP and LLM library with 🤗 Awesome model zoo, supporting wide-range of NLP tasks from research to industrial applications, including 🗂Text Classification, 🔍 Neural Search, ❓ Question Answering, ℹ️ Information Extraction, 📄 Document Intelligence, 💌 Sentiment Analysis etc.
https://paddlenlp.readthedocs.io
Apache License 2.0
12k stars 2.92k forks source link

[Bug]: UTC模型部署:Fastploy有错误,暂未解决 Segmentation fault #6418

Open dingidng opened 1 year ago

dingidng commented 1 year ago

软件环境

GPU版本

除使用fastploy外,所有程序均正常

cudnn下载官网

image

fastploy官方环境要求:
CUDA >= 11.2
cuDNN >= 8.0
python >= 3.6
OS: Linux(x64)/Windows 10(x64)
paddle-gpu 要求
CUDA 工具包 10.2 配合 cuDNN v7.6.5, 如需使用 PaddleTensorRT 推理,需配合 TensorRT7.0.0.11
CUDA 工具包 11.2 配合 cuDNN v8.2.1, 如需使用 PaddleTensorRT 推理,需配合 TensorRT8.0.3.4
CUDA 工具包 11.6 配合 cuDNN v8.4.0, 如需使用 PaddleTensorRT 推理,需配合 TensorRT8.4.0.6
CUDA 工具包 11.7 配合 cuDNN v8.4.1, 如需使用 PaddleTensorRT 推理,需配合 TensorRT8.4.2.4
CUDA 工具包 11.8 配合 cuDNN v8.6.0, 如需使用 PaddleTensorRT 推理,需配合 TensorRT8.5.1.7
CUDA 工具包 12.0 配合 cuDNN v8.9.1, 如需使用 PaddleTensorRT 推理,需配合 TensorRT8.6.1.6

看过别的issue发现paddle-gpu貌似要求在cudnn 8.2.1上,但在官网上看到支持cuda 11.2的加速库版本只有<=8.1.1;8.2以上支持11.x 下载下来看都是cuda 11.3 不确定能否在paddle-gpu 11.2版本使用。目前官网上看到只有12.0 11.8 11.7 11.6 11.2以及10.2

Cpu版本

操作系统:centos python版本:3.8

重复问题

错误描述

1.Fastploy部署时报错(仅报错)

image

Segmentation fault

检查了一下:在导入from paddlenlp.prompt import PromptDataCollatorWithPadding, UTCTemplate 这里出的错

但是在不适用部署情况下(fastploy方式)可以正常预测;同时使用serving方式也是可以正常预测的

稳定复现步骤 & 代码

https://github.com/PaddlePaddle/PaddleNLP/blob/develop/applications/zero_shot_text_classification

补充一下:在Windows系统下,没发现上述问题,可以正常执行,在linux centos下GPU V100 T4 以及CPU都会报错Segmentation fault

danaodai commented 1 year ago

遇到了同样的错误。请问有人解决该问题了吗?

dingidng commented 1 year ago

顶一下,怎么没有反馈声音了

luoruijie commented 10 months ago

我这边是 paddle版本升级到最新版解决了。请问别的兄弟是怎么解决的?

goldwater668 commented 4 months ago

我也出现上面的问题,UIE使用Fastploy没有问题,UTC使用deploy/python/infer.py就报错如下: I0524 14:35:42.226485 1126283 cuda_stream.h:81] Create CUDAStream 0x153aa610 with priority = 0, flag = 0 I0524 14:35:42.226508 1126283 allocator_facade.cc:435] Set default stream to 0x153aa610 for StreamSafeCUDAAllocator(0xe3346a0) in Place(gpu:0) I0524 14:35:42.226521 1126283 allocator_facade.cc:373] Get Allocator by passing in a default stream I0524 14:35:42.226583 1126283 gpu_info.cc:224] [cudaMalloc] size=0.00244141 MB, result=0 I0524 14:35:42.226651 1126283 gpu_info.cc:224] [cudaMalloc] size=0.000244141 MB, result=0 I0524 14:35:42.226661 1126283 gpu_info.cc:224] [cudaMalloc] size=0.000244141 MB, result=0 I0524 14:35:42.226670 1126283 gpu_info.cc:224] [cudaMalloc] size=0.000244141 MB, result=0 I0524 14:35:42.226677 1126283 gpu_info.cc:224] [cudaMalloc] size=0.000244141 MB, result=0 I0524 14:35:42.226684 1126283 gpu_info.cc:224] [cudaMalloc] size=0.000244141 MB, result=0 I0524 14:35:42.226740 1126283 gpu_info.cc:224] [cudaMalloc] size=0.000244141 MB, result=0 I0524 14:35:42.226747 1126283 gpu_info.cc:224] [cudaMalloc] size=0.000244141 MB, result=0 I0524 14:35:42.226758 1126283 gpu_info.cc:224] [cudaMalloc] size=0.0732422 MB, result=0 I0524 14:35:42.227171 1126283 gpu_info.cc:224] [cudaMalloc] size=0.0288086 MB, result=0 I0524 14:35:42.227393 1126283 gpu_info.cc:224] [cudaMalloc] size=0.0732422 MB, result=0 I0524 14:35:42.227420 1126283 gpu_info.cc:224] [cudaMalloc] size=0.219727 MB, result=0 I0524 14:35:42.284215 1126283 gpu_info.cc:224] [cudaMalloc] size=0.248535 MB, result=0 I0524 14:35:42.286917 1126283 gpu_info.cc:224] [cudaMalloc] size=0.292969 MB, result=0 I0524 14:35:42.304210 1126283 gpu_info.cc:224] [cudaMalloc] size=0.292969 MB, result=0 I0524 14:35:42.304944 1126283 gpu_info.cc:224] [cudaMalloc] size=0.248535 MB, result=0 I0524 14:35:42.306496 1126283 stats.h:79] HostMemoryStatReserved0: Update current_value with 12, after update, current value = 12 I0524 14:35:42.306524 1126283 stats.h:79] HostMemoryStatAllocated0: Update current_value with 12, after update, current value = 12 I0524 14:35:42.306586 1126283 stats.h:79] HostMemoryStatReserved0: Update current_value with 4, after update, current value = 16 I0524 14:35:42.306592 1126283 stats.h:79] HostMemoryStatAllocated0: Update current_value with 4, after update, current value = 16 I0524 14:35:42.306636 1126283 stats.h:79] HostMemoryStatReserved0: Update current_value with 4, after update, current value = 20 I0524 14:35:42.306641 1126283 stats.h:79] HostMemoryStatAllocated0: Update current_value with 4, after update, current value = 20 Segmentation fault (core dumped)

goldwater668 commented 4 months ago

我这边是 paddle版本升级到最新版解决了。请问别的兄弟是怎么解决的?

请问你是paddle多少呢 我的是 paddlenlp 2.7.2 paddlepaddle-gpu 2.6.0 也报上述错误,但是在uie上就没有这种情况