简体   繁体   English

在theano 0.9中对gpu使用3D卷积时的高CPU利用率

[英]High cpu utilization while using 3D convolution on gpu in theano 0.9

My cpu utilization is 100% when using theano.tensor.nnet.conv3d I am adding conv3d_fft, convgrad3d_fft and convtransp3d_fft to my compiling mode in the theano function. 使用theano.tensor.nnet.conv3d时,我的cpu利用率为100%我将conv3d_fft,convgrad3d_fft和convtransp3d_fft添加到theano函数中的编译模式。 The interesting part is my gpu utilization is also high. 有趣的是我的gpu利用率也很高。 My data is all on gpu memory. 我的数据全部都在gpu内存上。

Any ideas about why it cpu utilization is so high? 有关cpu利用率为何如此之高的任何想法?

Thanks! 谢谢!

Update: I tried the same convolution in Keras with Theano backend. 更新:我在Keras和Theano后端尝试了相同的卷积。 It is shockingly faster than theano despite the fact that it also uses conv3d. 尽管它也使用了conv3d,但它比theano更快。

For invoking a task on the GPU, the CPU has to do some work (not negligible). 为了在GPU上调用任务,CPU必须做一些工作(不可忽略)。 If the tasks on the GPU are small, the tasks on the CPU become comparatively big. 如果GPU上的任务很小,则CPU上的任务变得相对较大。 By the way, memory transfers are done by the DMA and do not cause CPU load except of invoking the transfer. 顺便说一句,内存传输由DMA完成,除了调用传输之外不会导致CPU负载。

I had a CUDA program, where the CPU invoked a GPU task every ~100µs. 我有一个CUDA程序,CPU每隔约100μs调用一次GPU任务。 Profiling the program I found out, that it was CPU bound, while nothing was done on CPU except invoking GPU tasks. 分析我发现的程序,它是CPU绑定的,除了调用GPU任务之外没有在CPU上完成任何操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM