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

FatestDet线程设置没用,同样设置YOLO-fastestv2正常 #45

Open
Zi-x opened this issue Aug 15, 2023 · 1 comment
Open

FatestDet线程设置没用,同样设置YOLO-fastestv2正常 #45

Zi-x opened this issue Aug 15, 2023 · 1 comment

Comments

@Zi-x
Copy link

Zi-x commented Aug 15, 2023

由于项目需要单线程运行,对于YOLO-fastestv2,在amd平台的虚拟机和rk3588上单线程设置都是正常的,查看cpu占用一般只有一到两个核心高。但是配置在Fastestdet的用同样设置上对于虚拟机平台,1-12cpu都在30-40%,而对于rk3588,1-8cpu都在70%左右。
上述都是设置的单线程。使用
ncnn::Net net;
net.opt.num_threads = 1; //此处配置的单线程和下面的ex.set_num_threads(1);保持一致,对于yolofastestv2也是同样的设置
net.load_param("FastestDet.param");
net.load_model("FastestDet.bin");
但是实际上则不像fastestv2的占用,特别是rk3588上的测试,设置单线程,但8核都在70%左右。

@touchinglie
Copy link

作者在知乎说明好像有几层是不能使用多线程的,必须要用单线程处理,数据和速度才正常,ex.set_num_threads(1);是作者固定设置的,多了就木桶效应,还是差不多那个速度

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

2 participants