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

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

相关内容

热门资讯

前端-session、jwt 目录:   (1)session (2&#x...
linux入门---制作进度条 了解缓冲区 我们首先来看看下面的操作: 我们首先创建了一个文件并在这个文件里面添加了...
关于测试,我发现了哪些新大陆 关于测试 平常也只是听说过一些关于测试的术语,但并没有使用过测试工具。偶然看到编程老师...
前缀和与对数器与二分法 1. 前缀和 假设有一个数组,我们想大量频繁的去访问L到R这个区间的和,...
nodejs:本地安装nvm实... 一、背景-使用不同版本node的原因 vue3+ts、nuxt3版本,node...
JAVA集合知识整理 Java集合知识整理 HashMap相关 HashMap的底层数据结构:jdk1.8之...
无刷直流电机介绍及单片机控制实... 无刷直流电机介绍及单片机控制实例前言基本概念优势与劣势使用寿命基本结构使用单片机控制实例电子调速器&...
fwdiary(2) dp2 1.传纸条  AcWing 275. 传纸条 - AcWing 走两条路,走一条最大的...
常用的DOS命令 常用的DOS命令 DOS(Disk Operating System,磁...
<C++> 类和对象(下) 1.const成员函数将const修饰的“成员函数”称之为const成员函数,cons...