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

CPU训练无法满载 #3

Open
ghost opened this issue Mar 21, 2017 · 6 comments
Open

CPU训练无法满载 #3

ghost opened this issue Mar 21, 2017 · 6 comments

Comments

@ghost
Copy link

ghost commented Mar 21, 2017

24核心,48线程的2695 v2,始终无法满载。使用率30%左右。每次训练大约耗时1秒。

使用GPU(GTX960)的话,每次训练大约耗时0.5秒。

ubuntu 16.04,CUDA 8.0, cuDNN 5.1。tensorflow是本地编译的。

@ghost
Copy link
Author

ghost commented Mar 21, 2017

是否和优化有关?是否只用了一个线程生成图像,因而这里是瓶颈?

@luyishisi
Copy link
Owner

一方面线程瓶颈是有的,其次的看看该生成图像是否有存为本地文件,可能存在磁盘io瓶颈

@ghost
Copy link
Author

ghost commented Mar 31, 2017 via email

@leng-yue
Copy link
Contributor

leng-yue commented Oct 1, 2018

是否和优化有关?是否只用了一个线程生成图像,因而这里是瓶颈?

这里确实是和优化有关, 事实上在正常使用中不应该一边生成图片一边训练

@kotori2
Copy link

kotori2 commented May 17, 2019

我这里试了一下,生成batch用了254ms,GPU训练用了13ms。。。结果就是GPU完全空载,CPU六个核只有一个在慢慢生成训练批次

@kotori2
Copy link

kotori2 commented May 17, 2019

试图优化了一下,开了12个线程同时生成图片数据,最后可以做到160ms的训练数据生成速度,再多开线程好像影响不大

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

4 participants
@luyishisi @kotori2 @leng-yue and others