PaddlePaddle / Paddle-Lite

PaddlePaddle High Performance Deep Learning Inference Engine for Mobile and Edge (飞桨高性能深度学习端侧推理引擎)
https://www.paddlepaddle.org.cn/lite
Apache License 2.0
6.97k stars 1.61k forks source link

如何转换成能使用gpu的模型? #9360

Closed zhenzi0322 closed 9 months ago

zhenzi0322 commented 2 years ago

如何转换成能使用gpu的模型? 服务器系统为Ubuntu

paddle-bot[bot] commented 2 years ago

您好,我们已经收到了您的问题,会安排技术人员尽快解答您的问题,请耐心等待。请您再次检查是否提供了清晰的问题描述、复现代码、环境&版本、报错信息等。同时,您也可以通过查看官网文档常见问题历史Issue来寻求解答。祝您生活愉快~

Hi! We've received your issue and please be patient to get responded. We will arrange technicians to answer your questions as soon as possible. Please make sure that you have posted enough message to demo your request. You may also check out the APIFAQ and Github Issue to get the answer.Have a nice day!

sprouteer commented 2 years ago

您好,可以使用opt工具,./opt --model_file=./model.pdmodel --param_file=./model.pdiparams --optimize_out=./out --valid_targets=opencl ,详情参考https://paddle-lite.readthedocs.io/zh/latest/demo_guides/opencl.html#id1

zhenzi0322 commented 2 years ago

您好,可以使用opt工具,./opt --model_file=./model.pdmodel --param_file=./model.pdiparams --optimize_out=./out --valid_targets=opencl ,详情参考https://paddle-lite.readthedocs.io/zh/latest/demo_guides/opencl.html#id1

使用opencl生成nb模型后,预测的效果不是我想要的。

但是使用x86生成nb模型预测的效果就是我想要的。问题就是x86使用不了gpu

sprouteer commented 2 years ago

请问具体的gpu型号是什么,如果使用不了gpu,可以试试--valid_targets=x86,这是x86 cpu的方式