Ubuntu 16.04下静态编译OpenCV 3.4.14集成OpenCL调用Intel(R) HD Graphics NEO实现GPU加速

本文档详细介绍了如何在Ubuntu16.04系统上安装IntelGPUOpenCL驱动,并通过编译OpenCV3.4.14来验证驱动的正确安装。首先,从Github下载适用于Ubuntu16.04的OpenCL驱动,并安装deb包。然后,使用clinfo确认驱动安装成功。接着,配置编译环境,下载OpenCV源码并进行编译。最后,编译并运行一个简单的OpenCV程序来检测OpenCL支持。

编译环境

  • 系统环境:Ubuntu 16.04.7 xenial LTS Desktop
  • CPU:Intel® Core™ i7-6700 CPU @ 3.40GHz

安装Intel GPU OpenCL驱动

[Github - intel/compute-runtime]上下载支持Ubuntu16.04版本的驱动,我这里下载的版本是18.45.11804,可点击[此处]直接下载对应版本。
此版本支持的CPU架构详情如下:

Platform OCL Quality
Broadwell 2.1 Production
Skylake 2.1 Production
Kaby Lake 2.1 Production
Coffee Lake 2.1 Production
Cannon Lake 2.1 Experimental
Apollo Lake 1.2 Production
Gemini Lake 1.2 Production

创建neo目录

mkdir neo # 在磁盘上找个位置,创建一个空的neo文件夹

下载deb安装包

cd neo
wget https://github.com/intel/compute-runtime/releases/download/18.45.11804/intel-gmmlib_18.4.0.348_amd64.deb
wget https://github.com/intel/compute-runtime/releases/download/18.45.11804/intel-igc-core_18.44.1060_amd64.deb
wget https://github.com/intel/compute-runtime/releases/download/18.45.11804/intel-igc-opencl_18.44.1060_amd64.deb
wget https://github.com/intel/compute-runtime/releases/download/18.45.11804/intel-opencl_18.45.11804_amd64.deb

以root权限安装deb包

sudo dpkg -i *.deb

安装clinfo

sudo apt-get install clinfo

查看Intel GPU OpenCL驱动信息

Number of platforms                               1
  Platform Name                                   Intel(R) OpenCL HD Graphics # 成功识别到Intel(R) OpenCL HD Graphics
  Platform Vendor                                 Intel(R) Corporation
  Platform Version                                OpenCL 2.1 
  Platform Profile                                FULL_PROFILE
  Platform Extensions                             cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_fp16 cl_khr_depth_images cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_icd cl_khr_image2d_from_buffer cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_intel_subgroups cl_intel_required_subgroup_size cl_intel_subgroups_short cl_khr_spir cl_intel_accelerator cl_intel_media_block_io cl_intel_driver_diagnostics cl_intel_device_side_avc_motion_estimation cl_khr_priority_hints cl_khr_throttle_hints cl_khr_create_command_queue cl_khr_fp64 cl_khr_subgroups cl_khr_il_program cl_khr_mipmap_image cl_khr_mipmap_image_writes cl_intel_planar_yuv cl_intel_packed_yuv cl_intel_motion_estimation cl_intel_advanced_motion_estimation 
  Platform Host timer resolution                  1ns
  Platform Extensions function suffix             INTEL

  Platform Name                                   Intel(R) OpenCL HD Graphics
Number of devices                                 1
  Device Name                                     Intel(R) Gen9 HD Graphics NEO
  Device Vendor                                   Intel(R) Corporation
  Device Vendor ID                                0x8086
  Device Version                                  OpenCL 2.1 NEO 
  Driver Version                                  18.45.11804 # 驱动版本与下载的版本一致
  Device OpenCL C Version                         OpenCL C 2.0 
  Device Type                                     GPU
  Device Profile                                  FULL_PROFILE
  Max compute units                               24
  Max clock frequency                             1150MHz
  Device Partition                                (core)
    Max number of sub-devices                     0
    Supported partition types   
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值