Tensorflow takes >1 min on first run on video card with 5.0 compute capability

前端 未结 2 1674
深忆病人
深忆病人 2021-01-13 18:40

I\'m running tensorflow 0.8.0 for python3 (pip installation), and the following file test.py:

import tensorflow as tf                                    


        
相关标签:
2条回答
  • 2021-01-13 19:04

    I think your GPU GTX 860M is a sm_50 device. The default TensorFlow binary supports sm_35 and sm_52 by default. That means your binary only has PTX, and the Cuda runtime has to JIT them into SASS on the first run of that kernel, and that takes one minute or so. But they should be cached in later runs, unless the caching was explicitly disabled.

    0 讨论(0)
  • 2021-01-13 19:07

    The first call to eval() or run() is typically much slower than subsequent calls since it needs to setup the session. Subsequent calls to eval/run are typically much faster.

    0 讨论(0)
提交回复
热议问题