Answers:
看起来libOpenCL.so
是由ocl-icd-opencl-dev
包装所提供的。要安装此软件包,请运行:
sudo apt update
sudo apt install ocl-icd-opencl-dev
现在libOpenCL.so应该位于 /usr/lib/x86_64-linux-gnu/libOpenCL.so
libOpenCL.so
),则在每个软件包的详细信息页面上都有一个“文件列表”链接,非常方便。
由尼克·温伯格(Nick Weinberg)建议的方法,是安装驱动程序的一个很旧的版本,因此,我建议直接从您的硬件供应商那里下载该驱动程序。
由于您具有Intel CPU,请执行以下操作
下载此归档文件,并按以下说明安装。
tar -pvxf l_opencl_p_18.1.0.013.tgz
cd l_opencl_p_18.1.0.013/`
sudo ./install.sh`
该安装脚本将向其中写入大量库/opt/intel
,并将创建一个符号链接(或替换旧的符号链接)/usr/lib/x86_64-linux-gnu/libOpenCL.so
。
我对该主题的理解是,上述步骤允许OpenCL访问您的Intel CPU。但是,如果您具有Intel HD Graphics,那么也允许OpenCL也使用此集成显卡是有意义的。然后执行以下操作
按照那里的指示进行操作。我刚刚在这里用一个修复程序复制了这些-使用sudo apt
而不是,sudo dpkg -i *.deb
因为dpkg
它不检查依赖项:
mkdir neo
cd neo
wget https://github.com/intel/compute-runtime/releases/download/19.14.12751/intel-gmmlib_19.1.1_amd64.deb
wget https://github.com/intel/compute-runtime/releases/download/19.14.12751/intel-igc-core_19.11.1622_amd64.deb
wget https://github.com/intel/compute-runtime/releases/download/19.14.12751/intel-igc-opencl_19.11.1622_amd64.deb
wget https://github.com/intel/compute-runtime/releases/download/19.14.12751/intel-opencl_19.14.12751_amd64.deb
wget https://github.com/intel/compute-runtime/releases/download/19.14.12751/intel-ocloc_19.14.12751_amd64.deb
sudo apt install ./*deb
请注意,.
in ./*deb
很重要:没有该点,您将得到Unable to locate
和Couldn't find
错误。
PS英特尔网站列出了合适的CPU,请确保您的CPU在此列表中。
我想让OpenCL适用于Ubuntu 19.04 x64上的darktable。
初步darktable-cltest
报告
0.016782 [opencl_init] could not find opencl runtime library 'libOpenCL'
0.016851 [opencl_init] could not find opencl runtime library 'libOpenCL.so'
0.016988 [opencl_init] found opencl runtime library 'libOpenCL.so.1'
0.017020 [opencl_init] opencl library 'libOpenCL.so.1' found on your system and loaded
0.021674 [opencl_init] found 1 platform
0.077428 [opencl_init] found 1 device
0.077458 [opencl_init] discarding device 0 `Intel(R) HD Graphics 5500 BroadWell U-Processor GT2' because the driver `OpenCL 1.2 beignet 1.3' is blacklisted.
0.077464 [opencl_init] no suitable devices found.
0.077469 [opencl_init] FINALLY: opencl is NOT AVAILABLE on this system.
0.077473 [opencl_init] initial status of opencl enabled flag is OFF.
但是之后sudo apt-get install intel-opencl-icd
一切正常。