Intel核显

编程入门 行业动态 更新时间:2024-10-28 01:19:06

<a href=https://www.elefans.com/category/jswz/34/1762878.html style=Intel核显"/>

Intel核显

Machine :Intel Xeon i7 6700(core) + Intel HD Graphics 530(skyLake) +Linux (CentOS 7.2或7.3,我的7.3)+eclipse(Neon)安装OpenCL环境,希望安装成功后将Intel i7 6700作为host,HD Graphics 530作为device。

搞了半天,才知道Linux下 HD Graphics 530并没有driver,  官网给出的都是windows下的。所以driver这步就省了。

按照:  来安装。

一、安装Intel OpenCL driver

  官网给出了脚本直接安装:.sh_.txt  我之前都是自己新建一个txt将这段脚本复制过去,结果安装时总是出错,不能复制!要直接下载。我放在   可以直接下载。下载完毕以后,直接按照官网的步骤开始安装:

$ mv install_OCL_driver.sh_.txt install_OCL_driver.sh
$ chmod 755 install_OCL_driver.sh
$ sudo su
$ ./install_OCL_driver.sh install
一直选择y 即yes,然后出现:

然后出现一个error:因为我的linux kernel是3.10.0-514.el7.X86_64 所以报错。不满足install的条件。


这个提示出来,我确认我有足够的磁盘空间,于是我又运行install一次,这次就不会报错了。漫长的等待----安装完毕。

然后我按照建议1 将用户root加入到video group了。 第2点不满足就不管它了,然后重启。

也可以自己打开提示的这个网页去手动下载linux-4.7.tar.xz  然后看完 / 的后部分 就会安装了。

二、Intel_OpenCL_SDK

这里给出的是Ubuntu的,没有给CentOS的。但我还是想试试,于是下载这个(不要复制,而是直接下载),然后按照运行:

$ mv install_SDK_prereq_ubuntu.sh_.txt install_SDK_prereq_ubuntu.sh
$ sudo su
$ ./install_SDK_prereq_ubuntu.sh
结果显示:bash: ./install_SDK_prereq_ubuntu.sh: 权限不够 !!!但我是root登录的!我输入clinfo也说我未找到命令!?
后来我想了想,还是自己手动安装SDK,去官网 /?sn=c69g-kd7n5h3j&EmailID=1603926823@qq.com&Sequence=2151318&dnld=t 下的合适我的SDK,当然怎么找合适的,要先看 release note :  看哪个版本适合我。 可以通过install.sh或者install_GUI.sh安装,我是通过sh install_GUI.sh安装的,在安装期间,说我缺少dkms这个包,于是我yum install epel-release dkms 安装,但装了两遍才装成功dkms,然后继续中断的安装步骤。安装完毕会显示成功,出来这个界面。

所以SDK就装完了。

装完后可以看到/opt/instel/下有4个文件(夹):ism opencl opencl-sdk和另一个文件。打开文件夹opencl-sdk可以看到有include和lib64文件夹。。。应该是真的成功了。

三、检查对OpenCL的设备支持

但输入clinfo说权限不够,于是自己去手动下载了clinfo的rpm包,然后:rpm -ivh clinfo-2.1.17.02.09-1.el7.x86_64.rpm 安装成功。然后输入clinfo 即可:哈哈哈终于出现2个平台和2个devices了哈哈哈!!!!!

平台1:Intel(R) OpenCL (设备是:Intel(R) HD Graphics 与 Intel(R) Core(TM) i7-6700 CPU);

平台2:Experimental OpenCL 2.1 CPU Only Platform (设备是:Intel(R) Core(TM) i7-6700 CPU);

Number of platforms                               2Platform Name                                   Intel(R) OpenCLPlatform Vendor                                 Intel(R) CorporationPlatform Version                                OpenCL 2.0 Platform Profile                                FULL_PROFILEPlatform Extensions                             cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_depth_images cl_khr_fp64 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_khr_spirPlatform Extensions function suffix             INTELPlatform Name                                   Experimental OpenCL 2.1 CPU Only PlatformPlatform Vendor                                 Intel(R) CorporationPlatform Version                                OpenCL 2.1 LINUXPlatform Profile                                FULL_PROFILEPlatform Extensions                             cl_khr_icd cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store cl_khr_depth_images cl_khr_3d_image_writes cl_intel_exec_by_local_thread cl_khr_spir cl_khr_fp64 cl_khr_image2d_from_buffer Platform Host timer resolution                  1nsPlatform Extensions function suffix             INTELPlatform Name                                   Intel(R) OpenCL
Number of devices                                 2Device Name                                     Intel(R) HD GraphicsDevice Vendor                                   Intel(R) CorporationDevice Vendor ID                                0x8086Device Version                                  OpenCL 2.0 Driver Version                                  r5.0.63503Device OpenCL C Version                         OpenCL C 2.0 Device Type                                     GPUDevice Available                                YesDevice Profile                                  FULL_PROFILEMax compute units                               24Max clock frequency                             1150MHzDevice Partition                                (core)Max number of sub-devices                     0Supported partition types                     NoneMax work item dimensions                        3Max work item sizes                             256x256x256Max work group size                             256Compiler Available                              YesLinker Available                                YesPreferred work group size multiple              32Sub-group sizes (Intel)                         8x16x32Preferred / native vector sizes                 char                                                16 / 16      short                                                8 / 8       int                                                  4 / 4       long                                                 1 / 1       half                                                 8 / 8        (cl_khr_fp16)float                                                1 / 1       double                                               1 / 1        (cl_khr_fp64)Half-precision Floating-point support           (cl_khr_fp16)Denormals                                     YesInfinity and NANs                             YesRound to nearest                              YesRound to zero                                 YesRound to infinity                             YesIEEE754-2008 fused multiply-add               YesSupport is emulated in software               NoCorrectly-rounded divide and sqrt operations  NoSingle-precision Floating-point support         (core)Denormals                                     YesInfinity and NANs                             YesRound to nearest                              YesRound to zero                                 YesRound to infinity                             YesIEEE754-2008 fused multiply-add               YesSupport is emulated in software               NoCorrectly-rounded divide and sqrt operations  YesDouble-precision Floating-point support         (cl_khr_fp64)Denormals                                     YesInfinity and NANs                             YesRound to nearest                              YesRound to zero                                 YesRound to infinity                             YesIEEE754-2008 fused multiply-add               YesSupport is emulated in software               NoCorrectly-rounded divide and sqrt operations  NoAddress bits                                    64, Little-EndianGlobal memory size                              13238812672 (12.33GiB)Error Correction support                        NoMax memory allocation                           4294959103 (4GiB)Unified memory for Host and Device              YesShared Virtual Memory (SVM) capabilities        (core)Coarse-grained buffer sharing                 YesFine-grained buffer sharing                   NoFine-grained system sharing                   NoAtomics                                       NoMinimum alignment for any data type             128 bytesAlignment of base address                       1024 bits (128 bytes)Preferred alignment for atomics                 SVM                                           64 bytesGlobal                                        64 bytesLocal                                         64 bytesMax size for global variable                    65536 (64KiB)Preferred total size of global vars             4294959103 (4GiB)Global Memory cache type                        Read/WriteGlobal Memory cache size                        524288 (512KiB)Global Memory cache line                        64 bytesImage support                                   YesMax number of samplers per kernel             16Max size for 1D images from buffer            268434943 pixelsMax 1D or 2D image array size                 2048 imagesBase address alignment for 2D image buffers   4 bytesPitch alignment for 2D image buffers          4 bytesMax 2D image size                             16384x16384 pixelsMax planar YUV image size                     16384x16380 pixelsMax 3D image size                             16384x16384x2048 pixelsMax number of read image args                 128Max number of write image args                128Max number of read/write image args           128Max number of pipe args                         16Max active pipe reservations                    1Max pipe packet size                            1024Local memory type                               LocalLocal memory size                               65536 (64KiB)Max constant buffer size                        4294959103 (4GiB)Max number of constant args                     8Max size of kernel argument                     1024Queue properties (on host)                      Out-of-order execution                        YesProfiling                                     YesQueue properties (on device)                    Out-of-order execution                        YesProfiling                                     YesPreferred size                                131072 (128KiB)Max size                                      67108864 (64MiB)Max queues on device                            1Max events on device                            1024Prefer user sync for interop                    YesProfiling timer resolution                      83nsExecution capabilities                          Run OpenCL kernels                            YesRun native kernels                            NoSPIR versions                                 1.2 printf() buffer size                            4194304 (4MiB)Built-in kernels                                block_motion_estimate_intel;block_advanced_motion_estimate_check_intel;block_advanced_motion_estimate_bidirectional_check_intelMotion Estimation accelerator version (Intel)   2Device-side AVC Motion Estimation version     1Supports texture sampler use                YesSupports preemption                         NoDevice Extensions                               cl_intel_accelerator cl_intel_advanced_motion_estimation cl_intel_device_side_avc_motion_estimation cl_intel_driver_diagnostics cl_intel_media_block_io cl_intel_motion_estimation cl_intel_planar_yuv cl_intel_packed_yuv cl_intel_required_subgroup_size cl_intel_subgroups cl_intel_subgroups_short cl_intel_va_api_media_sharing cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_depth_images cl_khr_fp16 cl_khr_fp64 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_khr_mipmap_image cl_khr_mipmap_image_writes cl_khr_spir cl_khr_subgroups Device Name                                     Intel(R) Core(TM) i7-6700 CPU @ 3.40GHzDevice Vendor                                   Intel(R) CorporationDevice Vendor ID                                0x8086Device Version                                  OpenCL 2.0 (Build 475)Driver Version                                  1.2.0.475Device OpenCL C Version                         OpenCL C 2.0 Device Type                                     CPUDevice Available                                YesDevice Profile                                  FULL_PROFILEMax compute units                               8Max clock frequency                             3400MHzDevice Partition                                (core)Max number of sub-devices                     8Supported partition types                     by counts, equally, by names (Intel)Max work item dimensions                        3Max work item sizes                             8192x8192x8192Max work group size                             8192Compiler Available                              YesLinker Available                                YesPreferred work group size multiple              128Preferred / native vector sizes                 char                                                 1 / 32      short                                                1 / 16      int                                                  1 / 8       long                                                 1 / 4       half                                                 0 / 0        (n/a)float                                                1 / 8       double                                               1 / 4        (cl_khr_fp64)Half-precision Floating-point support           (n/a)Single-precision Floating-point support         (core)Denormals                                     YesInfinity and NANs                             YesRound to nearest                              YesRound to zero                                 NoRound to infinity                             NoIEEE754-2008 fused multiply-add               NoSupport is emulated in software               NoCorrectly-rounded divide and sqrt operations  NoDouble-precision Floating-point support         (cl_khr_fp64)Denormals                                     YesInfinity and NANs                             YesRound to nearest                              YesRound to zero                                 YesRound to infinity                             YesIEEE754-2008 fused multiply-add               YesSupport is emulated in software               NoCorrectly-rounded divide and sqrt operations  NoAddress bits                                    64, Little-EndianGlobal memory size                              16559001600 (15.42GiB)Error Correction support                        NoMax memory allocation                           4139750400 (3.855GiB)Unified memory for Host and Device              YesShared Virtual Memory (SVM) capabilities        (core)Coarse-grained buffer sharing                 YesFine-grained buffer sharing                   NoFine-grained system sharing                   NoAtomics                                       NoMinimum alignment for any data type             128 bytesAlignment of base address                       1024 bits (128 bytes)Preferred alignment for atomics                 SVM                                           64 bytesGlobal                                        64 bytesLocal                                         0 bytesMax size for global variable                    65536 (64KiB)Preferred total size of global vars             65536 (64KiB)Global Memory cache type                        Read/WriteGlobal Memory cache size                        262144 (256KiB)Global Memory cache line                        64 bytesImage support                                   YesMax number of samplers per kernel             480Max size for 1D images from buffer            258734400 pixelsMax 1D or 2D image array size                 2048 imagesBase address alignment for 2D image buffers   64 bytesPitch alignment for 2D image buffers          64 bytesMax 2D image size                             16384x16384 pixelsMax 3D image size                             2048x2048x2048 pixelsMax number of read image args                 480Max number of write image args                480Max number of read/write image args           480Max number of pipe args                         16Max active pipe reservations                    32767Max pipe packet size                            1024Local memory type                               GlobalLocal memory size                               32768 (32KiB)Max constant buffer size                        131072 (128KiB)Max number of constant args                     480Max size of kernel argument                     3840 (3.75KiB)Queue properties (on host)                      Out-of-order execution                        YesProfiling                                     YesLocal thread execution (Intel)                YesQueue properties (on device)                    Out-of-order execution                        YesProfiling                                     YesPreferred size                                4294967295 (4GiB)Max size                                      4294967295 (4GiB)Max queues on device                            4294967295Max events on device                            4294967295Prefer user sync for interop                    NoProfiling timer resolution                      1nsExecution capabilities                          Run OpenCL kernels                            YesRun native kernels                            YesSPIR versions                                 1.2printf() buffer size                            1048576 (1024KiB)Built-in kernels                                Device Extensions                               cl_khr_icd cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store cl_khr_depth_images cl_khr_3d_image_writes cl_intel_exec_by_local_thread cl_khr_spir cl_khr_fp64 cl_khr_image2d_from_buffer Platform Name                                   Experimental OpenCL 2.1 CPU Only Platform
Number of devices                                 1Device Name                                     Intel(R) Core(TM) i7-6700 CPU @ 3.40GHzDevice Vendor                                   Intel(R) CorporationDevice Vendor ID                                0x8086Device Version                                  OpenCL 2.1 (Build 10)Driver Version                                  1.2.0.10Device OpenCL C Version                         OpenCL C 2.0 Device Type                                     CPUDevice Available                                YesDevice Profile                                  FULL_PROFILEMax compute units                               8Max clock frequency                             3400MHzDevice Partition                                (core)Max number of sub-devices                     8Supported partition types                     by counts, equally, by names (Intel)Max work item dimensions                        3Max work item sizes                             8192x8192x8192Max work group size                             8192Compiler Available                              YesLinker Available                                YesPreferred work group size multiple              128Max sub-groups per work group                   1Preferred / native vector sizes                 char                                                 1 / 32      short                                                1 / 16      int                                                  1 / 8       long                                                 1 / 4       half                                                 0 / 0        (n/a)float                                                1 / 8       double                                               1 / 4        (cl_khr_fp64)Half-precision Floating-point support           (n/a)Single-precision Floating-point support         (core)Denormals                                     YesInfinity and NANs                             YesRound to nearest                              YesRound to zero                                 NoRound to infinity                             NoIEEE754-2008 fused multiply-add               NoSupport is emulated in software               NoCorrectly-rounded divide and sqrt operations  NoDouble-precision Floating-point support         (cl_khr_fp64)Denormals                                     YesInfinity and NANs                             YesRound to nearest                              YesRound to zero                                 YesRound to infinity                             YesIEEE754-2008 fused multiply-add               YesSupport is emulated in software               NoCorrectly-rounded divide and sqrt operations  NoAddress bits                                    64, Little-EndianGlobal memory size                              16559001600 (15.42GiB)Error Correction support                        NoMax memory allocation                           4139750400 (3.855GiB)Unified memory for Host and Device              YesShared Virtual Memory (SVM) capabilities        (core)Coarse-grained buffer sharing                 YesFine-grained buffer sharing                   YesFine-grained system sharing                   YesAtomics                                       YesMinimum alignment for any data type             128 bytesAlignment of base address                       1024 bits (128 bytes)Preferred alignment for atomics                 SVM                                           64 bytesGlobal                                        64 bytesLocal                                         0 bytesMax size for global variable                    65536 (64KiB)Preferred total size of global vars             65536 (64KiB)Global Memory cache type                        Read/WriteGlobal Memory cache size                        262144 (256KiB)Global Memory cache line                        64 bytesImage support                                   YesMax number of samplers per kernel             480Max size for 1D images from buffer            258734400 pixelsMax 1D or 2D image array size                 2048 imagesBase address alignment for 2D image buffers   64 bytesPitch alignment for 2D image buffers          64 bytesMax 2D image size                             16384x16384 pixelsMax 3D image size                             2048x2048x2048 pixelsMax number of read image args                 480Max number of write image args                480Max number of read/write image args           480Max number of pipe args                         16Max active pipe reservations                    32767Max pipe packet size                            1024Local memory type                               GlobalLocal memory size                               32768 (32KiB)Max constant buffer size                        131072 (128KiB)Max number of constant args                     480Max size of kernel argument                     3840 (3.75KiB)Queue properties (on host)                      Out-of-order execution                        YesProfiling                                     YesLocal thread execution (Intel)                YesQueue properties (on device)                    Out-of-order execution                        YesProfiling                                     YesPreferred size                                4294967295 (4GiB)Max size                                      4294967295 (4GiB)Max queues on device                            4294967295Max events on device                            4294967295Prefer user sync for interop                    NoProfiling timer resolution                      1nsExecution capabilities                          Run OpenCL kernels                            YesRun native kernels                            YesSub-group independent forward progress        NoIL version                                    SPIR-V_1.0SPIR versions                                 1.2printf() buffer size                            1048576 (1024KiB)Built-in kernels                                Device Extensions                               cl_khr_icd cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store cl_khr_depth_images cl_khr_3d_image_writes cl_intel_exec_by_local_thread cl_khr_spir cl_khr_fp64 cl_khr_image2d_from_buffer NULL platform behaviorclGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...)  No platformclGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...)   No platformclCreateContext(NULL, ...) [default]            No platformclCreateContext(NULL, ...) [other]              Success [INTEL]clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU)  No platformclCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU)  No platformclCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR)  No platformclCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM)  No platformclCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL)  No platform
太开心了!!!!Linux下Intel核显for OpenCL环境搭建完毕!!!
四、用eclipse创建一个OpenCL项目测试

在相应地方加上/opt/intel/opencl-sdk/include和.../lib64即可!!!

五、Intel opencl samples

可以看看    以及  因为很怕本来0传输的被自己写成内存到内存的传输 那么用核显就没有意义了。。。

 

 

/


 

.html

六、Intel的调试及性能查看tool for linux

我在官网看了那个Amplifier XE要收费,后来查到有Intel VTune Performance Analyzer,我在  下载的这个工具,这里也有下载链接:.html?fromsearch  。另外:.htm  这里还有各个版本的不同比较。  这里是别人的中文介绍。/ 这里是别人的英文介绍。  这个是与eclipse结合后的强大功能介绍。  官网说的调试工具就在sdk里? .html  这个是论坛上别人调试时遇到的问题。             解压准备安装,但提示说需要序列号?!!!!我没有序列号 ,然后Intel官网现在已经没有这个Intel VTune Performance Analyzer 了?!!!!!现在官网上linux的工具只有:  只有这些。没有序列号,无法安装免费的opencl工具,所以只能装这个  使用30的,按照 来安装。

七、一个例子与以前AMD时的对比

以前用AMD 560显卡时:CPU版本耗时约19s,OpenCL版本耗时约4.5s (单线程多线程均如此);

现在用Intel skylake核显:CPU版本耗时约17.3s,单线程的OpenCL版本耗时约5s,但多线程的OpenCL版本竟然要38s?!(将OpenCL版本由单线程改成多线程时应该有问题)



更多推荐

Intel核显

本文发布于:2023-06-24 00:22:56,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/856733.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Intel   核显

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!