正在上传图片(0/1)

妙算如何调用GPU

 0
手机看帖 1 958
import tensorflow as tf
import numpy as np

config = tf.ConfigProto(log_device_placement=True, allow_soft_placement=False)
config.gpu_options.allow_growth = True

with tf.Session(config=config) as sess:
    a = tf.placeholder(tf.int32)
    b = tf.placeholder(tf.int32)
    add = tf.add(a, b)
    sum = sess.run(add, feed_dict={a: 3, b: 4})
    print(sum)

执行上面一段代码会出现: kernel driver does not appear to be running on this host (manifold2): /proc/driver/nvidia/version does not exist
程序能用CPU正常运行。

请问下如何才能正常调用妙算内置的GPU。
妙算环境: opencv3.3.1 cuda9.0 cudnn7.x
tensorflow_gpu-1.9.0+nv18.8-cp35-cp35m-linux_aarch64.whl  用这个安装的TensorFlow-gpu.

评论
上传
你需要登录之后才能回帖    登录 | 注册
楼主   2020-7-8 3#
已经解决 ,添加sudo
收藏 点赞 评论
分享至:
回复:
上传
取消 评论
快速回复 返回顶部 返回列表