简体   繁体   English

Keras - RTX 2080 ti 训练比 CPU 和 GTX 1070 都慢?

[英]Keras - RTX 2080 ti training slower than both CPU-only and GTX 1070?

I just got my 2080 ti today and hooked it right up to experiment with Keras on my models.我今天刚拿到我的 2080 ti,并把它连接起来,在我的模型上试验 Keras。 But for some reason, when I train on a dense model the 2080 ti is 2 times slower than my CPU (an i7 4790k) and definitely slower than my old GTX 1070 (don't have exact numbers to compare it to).但是由于某种原因,当我在密集的 model 上训练时,2080 ti 比我的 CPU(i7 4790k)慢 2 倍,并且肯定比我的旧 GTX 1070 慢(没有确切的数字可以比较)。

To train one epoch on my CPU it takes 27 seconds while the 2080 ti is taking 67 seconds with nothing about the model or data changing.要在我的 CPU 上训练一个 epoch 需要 27 秒,而 2080 ti 需要 67 秒,而 model 或数据更改无关紧要。 Same batch size of 128, etc. This is also significantly slower than my 1070 I just had in the machine last night.相同的批量大小为 128 等。这也比我昨晚在机器上的 1070 慢得多。 I checked the GPU usage while training and the memory usage goes up to max, and the GPU usage goes up to about 20%, while idle is 4%.我在训练时检查了 GPU 的使用率,memory 的使用率达到最大值,GPU 的使用率上升到大约 20%,而空闲为 4%。 I have CUDA 10, and the latest CuDNN on NVIDIA's site: v7.6.5.我有 CUDA 10,以及 NVIDIA 网站上的最新 CuDNN:v7.6.5。 TensorFlow is 1.15 TensorFlow 为 1.15

Does anyone have any clue what is going on here?有谁知道这里发生了什么? If any more details are needed, just comment I can add them.如果需要更多详细信息,只需评论我可以添加它们。

I figured it out, Thanks to the suggestion of a friend who got a 2060 recently, he noted that the default power mode is maximum power savings in the Nvidia Control Panel, or P8 power mode according to nvidia-smi (which is half clock speeds).我想通了,感谢最近拿到2060的朋友的建议,他注意到默认的电源模式是Nvidia控制面板中的最大省电模式,或者根据nvidia-smi P8电源模式(即半时钟速度) )。 After setting to prefer maximum performance in 3D settings, training times have significantly been reduced.在 3D 设置中设置为首选最高性能后,训练时间显着减少。

I also have problems with 1.15.我也有1.15的问题。 Do you see an error like this by any chance?( https://github.com/tensorflow/models/issues/7640 ):您是否偶然看到这样的错误?( https://github.com/tensorflow/models/issues/7640 ):

Internal: Invoking ptxas not supported on Windows Relying on driver to perform ptx compilation.内部:Windows 上不支持调用 ptxas 依赖驱动程序执行 ptx 编译。 This message will be only logged once.此消息将仅记录一次。

Other people with this error have slow training as well.其他有此错误的人的训练速度也很慢。

Downgrading to Tensorflow 1.14 fixed it for me.降级到 Tensorflow 1.14 为我修复了它。

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

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