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

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

相关内容

热门资讯

保存时出现了1个错误,导致这篇... 当保存文章时出现错误时,可以通过以下步骤解决问题:查看错误信息:查看错误提示信息可以帮助我们了解具体...
汇川伺服电机位置控制模式参数配... 1. 基本控制参数设置 1)设置位置控制模式   2)绝对值位置线性模...
不能访问光猫的的管理页面 光猫是现代家庭宽带网络的重要组成部分,它可以提供高速稳定的网络连接。但是,有时候我们会遇到不能访问光...
表格中数据未显示 当表格中的数据未显示时,可能是由于以下几个原因导致的:HTML代码问题:检查表格的HTML代码是否正...
本地主机上的图像未显示 问题描述:在本地主机上显示图像时,图像未能正常显示。解决方法:以下是一些可能的解决方法,具体取决于问...
表格列调整大小出现问题 问题描述:表格列调整大小出现问题,无法正常调整列宽。解决方法:检查表格的布局方式是否正确。确保表格使...
不一致的条件格式 要解决不一致的条件格式问题,可以按照以下步骤进行:确定条件格式的规则:首先,需要明确条件格式的规则是...
Android|无法访问或保存... 这个问题可能是由于权限设置不正确导致的。您需要在应用程序清单文件中添加以下代码来请求适当的权限:此外...
【NI Multisim 14...   目录 序言 一、工具栏 🍊1.“标准”工具栏 🍊 2.视图工具...
银河麒麟V10SP1高级服务器... 银河麒麟高级服务器操作系统简介: 银河麒麟高级服务器操作系统V10是针对企业级关键业务...