【问题标题】:Tensorflow does not recognize GPU on AWSTensorFlow 无法识别 AWS 上的 GPU
【发布时间】:2019-07-20 22:18:52
【问题描述】:

就这样吧:我想在 AWS 上使用 TensorFlow 和 GPU - p2.xlarge 计划。不幸的是,一定是出了什么问题,我继续得到:

InvalidArgumentError (see above for traceback): Cannot assign a device to node 'Variable_1': Could not satisfy explicit device specification '/device:GPU:0' because no devices matching that specification are registered in this process; available devices: /job:localhost/replica:0/task:0/cpu:0  

我检查了 CUDA 和 cuDNN:

nvcc -V
cat /usr/local/cuda/include/cudnn.h

分别得到 8.0 和 5.1。

我这样调用gpu:

with tf.device('/gpu:0'):
  a = tf.Variable(tf.truncated_normal([100, 100]))
  b = tf.Variable(tf.truncated_normal([100, 1000]))

with tf.Session() as sess:
  sess.run(tf.matmul(a,b))

如有必要,很乐意发布更多详细信息 - 还不知道什么会有用。

【问题讨论】:

标签: amazon-web-services tensorflow


【解决方案1】:

我想您正在尝试从头开始设置 EC2 实例?这可能很困难。

相反,我强烈建议使用深度学习 AMI (https://aws.amazon.com/machine-learning/amis/)。它预装了您需要的一切(驱动程序、流行的 DL 库等)。它也是免费使用的,您只需为实例本身付费。

【讨论】:

    猜你喜欢
    • 2020-01-14
    • 1970-01-01
    • 1970-01-01
    • 2023-03-12
    • 1970-01-01
    • 1970-01-01
    • 2021-10-24
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多