level 2
love暗恋你的我
楼主
我使用的是AMD vega 56显卡。。在ubuntu环境下安装了ROCm。。ROCm也成功的查找到了GPU。。但是在anaconda3虚拟环境下运行代码报错:
InvalidArgumentError (see above for traceback): Cannot assign a device for operation 'add': Operation was explicitly assigned to /device:GPU:0 but available devices are [ /job:localhost/replica:0/task:0/device:CPU:0 ]. Make sure the device specification refers to a valid device.
[[Node: add = Add[T=DT_FLOAT, _device="/device:GPU:0"](a, b)]]
说是只找到了CPU:0没有找到GPU,然后运行
from tensorflow.python.client import device_lib as dv
print(dv.list_local_devices())
也只返回了CPU,没有返回GPU;
2019年06月20日 13点06分
1
InvalidArgumentError (see above for traceback): Cannot assign a device for operation 'add': Operation was explicitly assigned to /device:GPU:0 but available devices are [ /job:localhost/replica:0/task:0/device:CPU:0 ]. Make sure the device specification refers to a valid device.
[[Node: add = Add[T=DT_FLOAT, _device="/device:GPU:0"](a, b)]]
说是只找到了CPU:0没有找到GPU,然后运行
from tensorflow.python.client import device_lib as dv
print(dv.list_local_devices())
也只返回了CPU,没有返回GPU;