-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom_Device的模型权重永远保存在CPU上 #47786
Comments
您好,我们已经收到了您的问题,会安排技术人员尽快解答您的问题,请耐心等待。请您再次检查是否提供了清晰的问题描述、复现代码、环境&版本、报错信息等。同时,您也可以通过查看官网API文档、常见问题、历史Issue、AI社区来寻求解答。祝您生活愉快~ 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 API,FAQ,Github Issue and AI community to get the answer.Have a nice day! |
config设置 |
所有模型权重都在CPU上 |
|
您好,可以参考 |
@jiweibo 看起来只有 CopyParamsToGpu CopyParamsToNpu , 自定义设备需要自己提PR是吗? |
b6aa9f5 已经完成修复。现在Custom Device也有了自己的IR Pass处理,能极大减少IO性能消耗,提升推理速度。 |
bug描述 Describe the Bug
使用Custom_Device 导入任意带有权重的模型
使用export GLOG_v=6 运行控制台
LOG中在运行一个matmul_v2的OpenCL算子,
X[linear_68.tmp_0:float3, 512, 312(Place(OpenCL:0)) 是上一个模型的输入
Y[linear_51.w_0:float312, 2(Place(cpu)) 是模型的权重
无论运行多少次,权重一直存在CPU上,每次都要对设备拷贝进行转换
如何避免转换的过程,让权重存在OpenCL的内存上
其他补充信息 Additional Supplementary Information
No response
The text was updated successfully, but these errors were encountered: