Skip to content
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

能否提供推 ncnn 理阶段的 VulKan 支持? #42

Open
klmsfot opened this issue Aug 10, 2024 · 1 comment
Open

能否提供推 ncnn 理阶段的 VulKan 支持? #42

klmsfot opened this issue Aug 10, 2024 · 1 comment

Comments

@klmsfot
Copy link

klmsfot commented Aug 10, 2024

数字人 DEMO 在 RK3588 板子上运行流畅,wav驱动数字人说话的时候单帧渲染在 40毫秒以内。但在 RK3568 (4 核心A55 , 4GB 内存)上,说话的时候卡顿很厉害,单帧渲染去到 150毫秒左右。4核心的 CPU 配置在硅基数字人的说明中也是支持的,但卡的这么厉害。
由于我需要在 4核 A55 的环境里运用硅基数字人,所以只能进行优化,目前已经将说话时候的单帧渲染优化到 100 到 120 毫秒左右,还是很卡。主要是在推理的时候花费的时间太长,90 到 100 毫秒,
munet.cpp, domodul() 的 ex.extract("output", outpic); 这个阶段花费的时间太长。

看demo代码以及硅基的说明,ncnn 使用的是纯 CPU 的负载。而 ncnn 是支持 VulKan 的,也就是 GPU 来做推理,RK3568 也支持 VulKan 1.1, 我用 github 上找的 NCNN 的 VULKAN demo((https://github.com/nihui/ncnn-android-squeezenet)) 是可以运行的,使用GPU VULKAN推理没有问题,
硅基的demo 也有开启 GPU 推理的选项:
unet_gpu.opt.use_vulkan_compute = true;
当然是被注释掉了的。我尝试用 VulKan 选项来执行推理,但是每次都崩溃(执行到 ex.extract("output", outpic); 这个阶段就崩溃了)

请问能够提供 Vulkan 的应用方法,这样我们可以尝试在中低端的 CPU 方案上执行硅基的数字人,

@klmsfot
Copy link
Author

klmsfot commented Aug 10, 2024

目前我主要在 RK3566 ,4核心 A55 , 8GB 运行内存的开发板上测试硅基的数字人DEMO,8GB 内存是足够的,观察开发板系统的综合负载( adb shell top -m 16) ,数字人在 wav 驱动的时候,CPU 的负载基本是满的。
目前能优化的,就我观察,也就是将 ncnn 推理阶段把 VulKan 用上,减轻 CPU 负载这个办法了,所以请教硅基数字人的作者,能否提供ncnn VulKan 的方案。
按照我目前测试的,这个 DEMO 在 4 核心的 CPU 方案上,基本是无法正常使用的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant