Intel OpenVINO 安装显卡驱动
创始人
2024-03-13 09:48:02
0

背景:

使用集合诚KMDA-3301 OpenVINO CPU和GPU 算法加速,用GPU加速时,调动不起来。写下解决过程,以备后用。

过程:

调动GPU 报错:

terminate called after throwing an instance of 'InferenceEngine::GeneralError'what():  Failed to create plugin /opt/intel/openvino_2021/deployment_tools/inference_engine/lib/intel64/libclDNNPlugin.so for device GPU
Please, check your environment
[CLDNN ERROR]. clGetPlatformIDs error -1001

先查 openvino环境配置
openvinotoolkit/openvino
得知没有显卡驱动:

$ cd /opt/intel/openvino_2021/install_dependencies/
$ sudo -E ./install_NEO_OCL_driver

使用原脚本下载时,所有 neo 目录下的文件可能下载不全,导致安装失败
这时修改下载方式

_download_packages_ubuntu()
{case $INSTALL_DRIVER_VERSION in"19.41.14441")curl -L -O https://github.com/intel/compute-runtime/releases/download/19.41.14441/intel-gmmlib_19.3.2_amd64.debcurl -L -O https://github.com/intel/compute-runtime/releases/download/19.41.14441/intel-igc-core_1.0.2597_amd64.debcurl -L -O https://github.com/intel/compute-runtime/releases/download/19.41.14441/intel-igc-opencl_1.0.2597_amd64.debcurl -L -O https://github.com/intel/compute-runtime/releases/download/19.41.14441/intel-opencl_19.41.14441_amd64.debcurl -L -O https://github.com/intel/compute-runtime/releases/download/19.41.14441/intel-ocloc_19.41.14441_amd64.deb;;"20.35.17767")#curl -L -O https://github.com/intel/compute-runtime/releases/download/20.35.17767/intel-gmmlib_20.2.4_amd64.deb#curl -L -O https://github.com/intel/compute-runtime/releases/download/20.35.17767/intel-igc-core_1.0.4756_amd64.deb#curl -L -O https://github.com/intel/compute-runtime/releases/download/20.35.17767/intel-igc-opencl_1.0.4756_amd64.deb#curl -L -O https://github.com/intel/compute-runtime/releases/download/20.35.17767/intel-opencl_20.35.17767_amd64.deb#curl -L -O https://github.com/intel/compute-runtime/releases/download/20.35.17767/intel-ocloc_20.35.17767_amd64.deb#curl -L -O https://github.com/intel/compute-runtime/releases/download/20.35.17767/intel-level-zero-gpu_1.0.17767_amd64.debwget https://github.com/intel/compute-runtime/releases/download/20.35.17767/intel-gmmlib_20.2.4_amd64.debwget https://github.com/intel/compute-runtime/releases/download/20.35.17767/intel-igc-core_1.0.4756_amd64.debwget https://github.com/intel/compute-runtime/releases/download/20.35.17767/intel-igc-opencl_1.0.4756_amd64.debwget https://github.com/intel/compute-runtime/releases/download/20.35.17767/intel-opencl_20.35.17767_amd64.debwget https://github.com/intel/compute-runtime/releases/download/20.35.17767/intel-ocloc_20.35.17767_amd64.debwget https://github.com/intel/compute-runtime/releases/download/20.35.17767/intel-level-zero-gpu_1.0.17767_amd64.deb;;"21.29.20389")return 0;;*)echo "ERROR: Unrecognized driver ${INSTALL_DRIVER_VERSION}."echo "Available values: ${AVAILABLE_DRIVERS[*]}"exit $EXIT_WRONG_ARGesac
}

and

_verify_checksum_ubuntu()
{case $INSTALL_DRIVER_VERSION in"19.41.14441")curl -L -O https://github.com/intel/compute-runtime/releases/download/19.41.14441/ww41.sumsha256sum -c ww41.sum;;"20.35.17767")#curl -L -O https://github.com/intel/compute-runtime/releases/download/20.35.17767/ww35.sumwget https://github.com/intel/compute-runtime/releases/download/20.35.17767/ww35.sumsha256sum -c ww35.sum;;"21.29.20389")return 0;;*)echo "ERROR: Unrecognized driver ${INSTALL_DRIVER_VERSION}."echo "Available values: ${AVAILABLE_DRIVERS[*]}"exit $EXIT_WRONG_ARGesac
}

then:

groups 
sudo usermod -a -G video
sudo usermod -a -G ls

如果有原先的驱动,得先删除
参考OpenVINO安装之安装openCL

sudo apt purge intel-opencl

这时仍然不能调用GPU ,咨询Intel工程师得知内核得 5.8 以上,而原来内核是

$ uname -r
5.4.0-84-generic
$ uname -a
Linux t-Default-string 5.4.0-84-generic #94~18.04.1-Ubuntu SMP Thu Aug 26 23:17:46 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

这时有两种方法解决内核问题:

一. 升级内核

参考 在ubuntu18.04上更新内核
ubuntu18.04.4更换内核版本

  1. 更新内核,更新到5.10 这时报错
make[1]: *** No rule to make target 'debian/canonical-certs.pem', needed by 'certs/x509_certificate_list'.  Stop.
Makefile:1837: recipe for target 'certs' failed
make: *** [certs] Error 2

参考:

内核错误: No rule to make target ‘debian/canonical-certs.pem‘, needed by ‘certs/x509_certificate_list‘

  1. 报错:
Makefile:1194: recipe for target 'vmlinux' failed
make: *** [vmlinux] Error 1

参考 Ubuntu下通过源码编译方式升级内核

sudo apt install dwarves
  1. 报错:
sed: can't read modules.order: No such file or directory
Makefile:1452: recipe for target '_modinst_' failed
make: *** [_modinst_] Error 2

参考 Linux内核编译错误

编译成功后重启
这时不能正常开机,只能升级系统。

二. 升级系统

升级系统后按上面重装显卡驱动
编译代码时报错:

CMake Error at CMakeLists.txt:3 (project) :No CMAKE_CXX_COMPILER could be found.

参考:
ubuntu20.04 cmake编译出错:No CMAKE_CXX_COMPILER could be found.

sudo apt install -y build-essential

这时系统是
在这里插入图片描述

相关内容

热门资讯

【NI Multisim 14...   目录 序言 一、工具栏 🍊1.“标准”工具栏 🍊 2.视图工具...
银河麒麟V10SP1高级服务器... 银河麒麟高级服务器操作系统简介: 银河麒麟高级服务器操作系统V10是针对企业级关键业务...
不能访问光猫的的管理页面 光猫是现代家庭宽带网络的重要组成部分,它可以提供高速稳定的网络连接。但是,有时候我们会遇到不能访问光...
AWSECS:访问外部网络时出... 如果您在AWS ECS中部署了应用程序,并且该应用程序需要访问外部网络,但是无法正常访问,可能是因为...
Android|无法访问或保存... 这个问题可能是由于权限设置不正确导致的。您需要在应用程序清单文件中添加以下代码来请求适当的权限:此外...
北信源内网安全管理卸载 北信源内网安全管理是一款网络安全管理软件,主要用于保护内网安全。在日常使用过程中,卸载该软件是一种常...
AWSElasticBeans... 在Dockerfile中手动配置nginx反向代理。例如,在Dockerfile中添加以下代码:FR...
AsusVivobook无法开... 首先,我们可以尝试重置BIOS(Basic Input/Output System)来解决这个问题。...
ASM贪吃蛇游戏-解决错误的问... 要解决ASM贪吃蛇游戏中的错误问题,你可以按照以下步骤进行:首先,确定错误的具体表现和问题所在。在贪...
月入8000+的steam搬砖... 大家好,我是阿阳 今天要给大家介绍的是 steam 游戏搬砖项目,目前...