Ubuntu TensorFlow找不到集成的GPU

Ubuntu TensorFlow找不到集成的GPU,ubuntu,tensorflow,opencl,gpu,Ubuntu,Tensorflow,Opencl,Gpu,我正在尝试在我的集成英特尔GPU上运行TensorFlow,这台计算机既有集成图形卡,也有离散图形卡 user@host:~$ lscpu | grep "Model name" Model name: Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz 当我运行TensorFlow的脚本检查设备列表时 from tensorflow.python.client import device_lib def get_available_gpus(

我正在尝试在我的集成英特尔GPU上运行TensorFlow,这台计算机既有集成图形卡,也有离散图形卡

user@host:~$ lscpu | grep "Model name"
Model name:          Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz
当我运行TensorFlow的脚本检查设备列表时

from tensorflow.python.client import device_lib

def get_available_gpus():
    local_device_protos = device_lib.list_local_devices()
    return [x.name for x in local_device_protos]
    print(get_available_gpus())
我得到以下结果

18:30:21.335442: E tensorflow/stream_executor/cuda/cuda_driver.cc:397] failed call to cuInit: CUDA_ERROR_UNKNOWN
18:30:21.335465: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:145] kernel driver does not appear to be running on this host (host): /proc/driver/nvidia/version does not exist
['/device:CPU:0', '/device:XLA_CPU:0', '/device:XLA_GPU:0'] 
我想这可能与OpenCL的一些问题有关,因为当我运行clinfo时

user@host:~$ clinfo
Number of platforms                               0
user@host:~$ ls /etc/OpenCL/vendors/
intel.icd  nvidia.icd
另一件事是,当我运行一些在线发现的示例测试应用程序时

#include "CL/cl.h"
#include <stdio.h>

int main()
{
    cl_platform_id pid;
    cl_uint num;
    cl_uint n=1;
    cl_int error=clGetPlatformIDs(1,&pid,&num);
    printf("Error code= %d\nNo. of platforms= %d",error,num);
    getchar();
}
切换到nvidia clinfo也能正常工作

我正在运行Ubuntu18.04 LTS

user@host:~$ uname -a
Linux host 4.15.0-30-generic #32-Ubuntu SMP Thu Jul 26 17:42:43 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
我认为可能有助于调试的其他信息是,我正在远程操作这台机器,没有任何直接连接的显示器


我非常感谢任何关于我在这里所缺少的修复TensorFlow和clinfo问题的建议。

TensorFlow gpu仅支持NVIDIA gpu卡moment@BugKiller这不太准确。我在AMD上运行Tensorflow r1.9,性能卓越。但它不支持英特尔GPUyet@geekonedge我的错在任何情况下,ICD似乎是坏的;我建议为您的OpenCL设备重新安装驱动程序,并首先让clinfo运行,否则任何OpenCL应用程序都无法使用它。@BugKiller我不使用tensorflow gpu。
user@host:~$ uname -a
Linux host 4.15.0-30-generic #32-Ubuntu SMP Thu Jul 26 17:42:43 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux