PaddlePaddle / Paddle

PArallel Distributed Deep LEarning: Machine Learning Framework from Industrial Practice (『飞桨』核心框架,深度学习&机器学习高性能单机、分布式训练和跨平台部署)
http://www.paddlepaddle.org/
Apache License 2.0
22.07k stars 5.54k forks source link

Paddle Inference何时支持int8精度推理? #63055

Open bittergourd1224 opened 5 months ago

bittergourd1224 commented 5 months ago

请提出你的问题 Please ask your question

指的是不使用TensorRT,只用Paddle Inference,用的是最新的v2.6版本 只在 https://github.com/PaddlePaddle/Paddle-Inference-Demo/blob/90f7c86621a2ea2d27617d430a9de88f9f8762d0/c%2B%2B/gpu/gpu_fp16/resnet50_gpu_fp16.cc#L48 找到了半精度加载模型的方法 但尝试将kHalf修改kInt8,会报错

GGBond8488 commented 5 months ago

@ xiaoxiaohehe001 大佬帮忙看看

xiaoxiaohehe001 commented 5 months ago

@bittergourd1224 目前原生 gpu 还不支持 int8 推理,可以尝试使用 trt

bittergourd1224 commented 5 months ago

@xiaoxiaohehe001 由于TensorRT不同版本的兼容性,以及会导致加载模型速度变慢,故不倾向于使用trt。想问一下是否有gpu支持int8的计划?

engineer1109 commented 5 months ago

几年了,一直不支持的。

bittergourd1224 commented 5 months ago

几年了,一直不支持的。

不过半精度之前也不支持,现在支持了