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

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

相关内容

热门资讯

AWSECS:访问外部网络时出... 如果您在AWS ECS中部署了应用程序,并且该应用程序需要访问外部网络,但是无法正常访问,可能是因为...
AWSElasticBeans... 在Dockerfile中手动配置nginx反向代理。例如,在Dockerfile中添加以下代码:FR...
AWR报告解读 WORKLOAD REPOSITORY PDB report (PDB snapshots) AW...
AWS管理控制台菜单和权限 要在AWS管理控制台中创建菜单和权限,您可以使用AWS Identity and Access Ma...
北信源内网安全管理卸载 北信源内网安全管理是一款网络安全管理软件,主要用于保护内网安全。在日常使用过程中,卸载该软件是一种常...
​ToDesk 远程工具安装及... 目录 前言 ToDesk 优势 ToDesk 下载安装 ToDesk 功能展示 文件传输 设备链接 ...
Azure构建流程(Power... 这可能是由于配置错误导致的问题。请检查构建流程任务中的“发布构建制品”步骤,确保正确配置了“Arti...
群晖外网访问终极解决方法:IP... 写在前面的话 受够了群晖的quickconnet的小水管了,急需一个新的解决方法&#x...
AWSECS:哪种网络模式具有... 使用AWS ECS中的awsvpc网络模式来获得最佳性能。awsvpc网络模式允许ECS任务直接在V...
不能访问光猫的的管理页面 光猫是现代家庭宽带网络的重要组成部分,它可以提供高速稳定的网络连接。但是,有时候我们会遇到不能访问光...