赞
踩
大神说:
也就是说APU比较适合计算部分少,但传输耗时多的情况;而GPU相反。
请注意APU的一些细节, 如何才能做到无传输.
https://software.intel.com/en-us/articles/getting-the-most-from-opencl-12-how-to-increase-performance-by-minimizing-buffer-copies-on-intel-processor-graphics
另外VPU是个好东西,目前谷歌和大疆无人机在使用,但太贵了就先不说了。
*******************************************心累******************************************************
从好好的AMD-GPU回到Intel核显,想以此来避免data transfer的耗时。因为我们买不起贵的AMD-GPU。
machine:Intel HD graphics 4600 + AMD Rx560 (已成功安装的driver) +CentOS7
终端输入 lspci | grep VGA 但只显示了AMD显卡信息,并没有看到Intel核显相关信息。。。
按照某大神说:The Intel video drivers are already included in CentOS 7: just yum install xorg-x11-drv-intel 然后重启后还是没看到Intel的相关信息。
或者按照 https://xpressrazor.wordpress.com/2013/01/13/how-to-setup-amdintel-hybrid-graphics-cards-in-linux-ubuntu/ 但仍旧dont work
然而:有人说 My CPU is intel i5-4590 of which GPU is Intel HD Graphics 4600. However, it's said that Intel SDK for OpenCL 2.0 doesn't support HD Graphics 4600, while download of SDK for OpenCL 1.2 seems to be removed from intel website.
这就尴尬了。。。
不管如何,我还是决定自己试一试。。。
https://software.intel.com/en-us/articles/getting-started-with-opencl-code-builder
一、 去官网下Intel SDK for OpenCL
https://registrationcenter.intel.com/en/products/postregistration/?sn=c69g-kd7n5h3j&EmailID=1603926823@qq.com&Sequence=2151318&dnld=t
1、解压 tar zxvf intel_sdk_for_....tgz
2、进入这个解压后的文件夹:sh install.sh 然后会出现很多说明 按空格键跳过 后续又会出现很多选择问你接不接受等等 按1或者accept即可
然后按提示来,最后安装完成时会显示'Thank you for installing and for using the Intel R SDK for OpenCL TM Applications ...' 表示安装成功。
然而重启时 出问题了 老是叫我Log out 进不去图形界面。。。只能进入shell界面,
后续看来只能在shell界面安装了。
二、去官网下载intel driver
https://software.intel.com/en-us/articles/opencl-drivers
但只看到OpenCL2.0的driver?貌似我的是Intel graphics HD 4600只支持OpenCL1.2?但一点点看着,终于在网页下看到:
然后了解了下这个Release Notes选择了第二个package 根据Installation instructions 进行下载安装。
但shell界面我是没有连接网络的,于是 按照 http://www.jb51.net/article/98539.htm 先把网络连接好
到“cat /etc/sysconfig/network-scripts/ifcfg-enp2s0”修改最后一个no为yes重启后 就表示网络已经连接上了。
这时才能下载driver。。。
下载后解压安装:
然而:
很无奈。。。
然后不管继续:
- $ mkdir intel-opencl
- $ tar -C intel-opencl -Jxf intel-opencl-r4.0-BUILD_ID.x86_64.tar.xz
- $ tar -C intel-opencl -Jxf intel-opencl-devel-r4.0-BUILD_ID.x86_64.tar.xz
- $ tar -C intel-opencl -Jxf intel-opencl-cpu-r4.0-BUILD_ID.x86_64.tar.xz
- $ sudo cp -R intel-opencl/* /
- $ sudo ldconfig
然后又重回去输入刚刚Error的那条信息:依旧还是error:intel-opencl is needed by intel-opencl-cpu-r4.0-58481.x86_64 于是又下另一个driver:
intel-opencl-r5.0 (SRB5.0) Linux driver package 也是按照和上面差不多的步骤安装,但依旧是同样的问题。。。乱试了下:sudo yum install tar libpciaccess numactl-libs
然后重启,然后直接输入clinfo 结果发现:不再是显示AMD的相关信息了!!!??而是显示的Intel的:
这样应该就是成功了吧?!!!!
三、下载安装runtime:
https://software.intel.com/en-us/articles/opencl-drivers#latest_linux_SDK_release 我下的是比较新的runtime
解压这个tgz文件,然后可以看到解压出来有install.sh 直接运行sh install.sh
结果
然后我按了2,查看了下原因,说lsb-core>=4.0 于是我:
yum install redhat-lsb-core
然后再重新 sh install.sh 即重新安装这个runtime。
重启后仍然是只能进shell界面。。。尴尬。。。再次输入clinfo 显示的和之前一样,为什么不是显示Intel HD graphics作为我的device?Intel核显是集成CPU和GPU的,那么应该可以检测出Intel CPU和Intel GPU啊,可是现在只显示Intel CPU?我就在想那些用APU的人怎么用的,APU也是集成CPU和GPU,查到 https://community.amd.com/thread/158884 还是不明白。。。资料好少?
于是我又将我安装的东西全部卸载。。。然后依旧进不去图形界面,只能依旧是shell界面。。。
过了一个周末时间回来,竟然莫名其妙可以进去图形界面了。。。然后我在图形界面输入:clinfo 或者运行监测平台设备的那个程序:
现在可以检测出来2个平台了,这算成功还是失败?之前我的AMD安装环境就是直接将OpenCL的环境与AMD的device绑定的,无论platform还是device都只会检测出AMD的;而现在竟然两个都可以检测出来了?!哈哈哈无心插柳柳成荫?
Number of platforms: 2 CL_PLATFORM_PROFILE: FULL_PROFILE CL_PLATFORM_VERSION: OpenCL 2.0 AMD-APP (2442.7) CL_PLATFORM_VENDOR: Advanced Micro Devices, Inc. CL_PLATFORM_EXTENSIONS: cl_khr_icd cl_amd_event_callback cl_amd_offline_devices Number of devices: 1 CL_DEVICE_TYPE: CL_DEVICE_TYPE_GPU CL_DEVICE_VENDOR_ID: 4098 CL_DEVICE_MAX_COMPUTE_UNITS: 16 CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS: 3 CL_DEVICE_MAX_WORK_ITEM_SIZES: 256 256 256 CL_DEVICE_MAX_WORK_GROUP_SIZE: 256 CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR: 4 CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT: 2 CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT: 1 CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG: 1 CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT: 1 CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE: 1 CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF: 1 CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR: 4 CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT: 2 CL_DEVICE_NATIVE_VECTOR_WIDTH_INT: 1 CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG: 1 CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT: 1 CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE: 1 CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF: 1 CL_DEVICE_MAX_CLOCK_FREQUENCY: 1326 CL_DEVICE_ADDRESS_BITS: 64 CL_DEVICE_MAX_MEM_ALLOC_SIZE: 2836475904 CL_DEVICE_IMAGE_SUPPORT: 1 CL_DEVICE_MAX_READ_IMAGE_ARGS: 128 CL_DEVICE_MAX_WRITE_IMAGE_ARGS: 8 CL_DEVICE_IMAGE2D_MAX_WIDTH: 16384 CL_DEVICE_IMAGE2D_MAX_WIDTH: 16384 CL_DEVICE_IMAGE2D_MAX_HEIGHT: 16384 CL_DEVICE_IMAGE3D_MAX_WIDTH: 2048 CL_DEVICE_IMAGE3D_MAX_HEIGHT: 2048 CL_DEVICE_IMAGE3D_MAX_DEPTH: 2048 CL_DEVICE_MAX_SAMPLERS: 16 CL_DEVICE_MAX_PARAMETER_SIZE: 1024 CL_DEVICE_MEM_BASE_ADDR_ALIGN: 2048 CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE: 128 CL_DEVICE_SINGLE_FP_CONFIG: CL_FP_INF_NAN | CL_FP_ROUND_TO_NEAREST | CL_FP_ROUND_TO_ZERO | CL_FP_ROUND_TO_INF | CL_FP_FMA CL_DEVICE_SINGLE_FP_CONFIG: CL_READ_WRITE_CACHE CL_DEVICE_GLOBAL_MEM_CACHE_TYPE: CL_READ_WRITE_CACHE CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE: 64 CL_DEVICE_GLOBAL_MEM_CACHE_SIZE: 16384 CL_DEVICE_GLOBAL_MEM_SIZE: 3998490624 CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE: 2836475904 CL_DEVICE_MAX_CONSTANT_ARGS: 8 CL_DEVICE_LOCAL_MEM_TYPE: CL_DEVICE_LOCAL_MEM_SIZE: 32768 CL_DEVICE_ERROR_CORRECTION_SUPPORT: 0 CL_DEVICE_HOST_UNIFIED_MEMORY: 0 CL_DEVICE_PROFILING_TIMER_RESOLUTION: 1 CL_DEVICE_ENDIAN_LITTLE: 1 CL_DEVICE_AVAILABLE: 1 CL_DEVICE_COMPILER_AVAILABLE: 1 CL_DEVICE_EXECUTION_CAPABILITIES: CL_EXEC_KERNEL CL_DEVICE_QUEUE_PROPERTIES: CL_QUEUE_PROFILING_ENABLE CL_DEVICE_PLATFORM: 0x7fbb5e7ec478 CL_DEVICE_NAME: Baffin CL_DEVICE_VENDOR: Advanced Micro Devices, Inc. CL_DRIVER_VERSION: 2442.7 CL_DEVICE_PROFILE: FULL_PROFILE CL_DEVICE_VERSION: OpenCL 1.2 AMD-APP (2442.7) CL_DEVICE_OPENCL_C_VERSION: OpenCL C 1.2 CL_DEVICE_EXTENSIONS: cl_khr_fp64 cl_amd_fp64 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_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_fp16 cl_khr_gl_sharing cl_amd_device_attribute_query cl_amd_vec3 cl_amd_printf cl_amd_media_ops cl_amd_media_ops2 cl_amd_popcnt cl_khr_image2d_from_buffer cl_khr_spir cl_khr_gl_event CL_PLATFORM_PROFILE: FULL_PROFILE CL_PLATFORM_VERSION: OpenCL 2.0 CL_PLATFORM_VENDOR: Intel(R) Corporation CL_PLATFORM_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 Number of devices: 1 CL_DEVICE_TYPE: CL_DEVICE_TYPE_CPU CL_DEVICE_VENDOR_ID: 32902 CL_DEVICE_MAX_COMPUTE_UNITS: 4 CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS: 3 CL_DEVICE_MAX_WORK_ITEM_SIZES: 8192 8192 8192 CL_DEVICE_MAX_WORK_GROUP_SIZE: 8192 CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR: 1 CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT: 1 CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT: 1 CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG: 1 CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT: 1 CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE: 1 CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF: 0 CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR: 32 CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT: 16 CL_DEVICE_NATIVE_VECTOR_WIDTH_INT: 8 CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG: 4 CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT: 8 CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE: 4 CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF: 0 CL_DEVICE_MAX_CLOCK_FREQUENCY: 3200 CL_DEVICE_ADDRESS_BITS: 64 CL_DEVICE_MAX_MEM_ALLOC_SIZE: 4152202240 CL_DEVICE_IMAGE_SUPPORT: 1 CL_DEVICE_MAX_READ_IMAGE_ARGS: 480 CL_DEVICE_MAX_WRITE_IMAGE_ARGS: 480 CL_DEVICE_IMAGE2D_MAX_WIDTH: 16384 CL_DEVICE_IMAGE2D_MAX_WIDTH: 16384 CL_DEVICE_IMAGE2D_MAX_HEIGHT: 16384 CL_DEVICE_IMAGE3D_MAX_WIDTH: 2048 CL_DEVICE_IMAGE3D_MAX_HEIGHT: 2048 CL_DEVICE_IMAGE3D_MAX_DEPTH: 2048 CL_DEVICE_MAX_SAMPLERS: 480 CL_DEVICE_MAX_PARAMETER_SIZE: 3840 CL_DEVICE_MEM_BASE_ADDR_ALIGN: 1024 CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE: 128 CL_DEVICE_SINGLE_FP_CONFIG: CL_FP_DENORM | CL_FP_INF_NAN | CL_FP_ROUND_TO_NEAREST CL_DEVICE_SINGLE_FP_CONFIG: CL_READ_ONLY_CACHE | CL_READ_WRITE_CACHE CL_DEVICE_GLOBAL_MEM_CACHE_TYPE: CL_READ_WRITE_CACHE CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE: 64 CL_DEVICE_GLOBAL_MEM_CACHE_SIZE: 262144 CL_DEVICE_GLOBAL_MEM_SIZE: 16608808960 CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE: 131072 CL_DEVICE_MAX_CONSTANT_ARGS: 480 CL_DEVICE_LOCAL_MEM_TYPE: CL_LOCAL | CL_GLOBAL CL_DEVICE_LOCAL_MEM_SIZE: 32768 CL_DEVICE_ERROR_CORRECTION_SUPPORT: 0 CL_DEVICE_HOST_UNIFIED_MEMORY: 1 CL_DEVICE_PROFILING_TIMER_RESOLUTION: 1 CL_DEVICE_ENDIAN_LITTLE: 1 CL_DEVICE_AVAILABLE: 1 CL_DEVICE_COMPILER_AVAILABLE: 1 CL_DEVICE_EXECUTION_CAPABILITIES: CL_EXEC_KERNEL | CL_EXEC_NATIVE_KERNEL CL_DEVICE_QUEUE_PROPERTIES: CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE | CL_QUEUE_PROFILING_ENABLE CL_DEVICE_PLATFORM: 0x12292c0 CL_DEVICE_NAME: Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz CL_DEVICE_VENDOR: Intel(R) Corporation CL_DRIVER_VERSION: 1.2.0.400 CL_DEVICE_PROFILE: FULL_PROFILE CL_DEVICE_VERSION: OpenCL 2.0 (Build 400) CL_DEVICE_OPENCL_C_VERSION: OpenCL C 2.0 CL_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
哦不对,AMD检测到的是 :任何一家的CPU+ AMD GPU。 对我电脑来说 目前是:Intel CPU+AMD GPU Rx560
下面部分Intel检测到的是:Intel的CPU+Intel的CPU (我依旧是没安装正确,如果正确,这里应该是Intel graphics HD 4600)。也就是说应该检测到Intel核显的GPU部分即HD 4600作为Intel的GPU部分(OpenCL的kernel运行环境)
路漫漫。。。。。。。。等公司买来sky lake系列,我再重装一次Intel 核显的OpenCL环境!!!!!!!!!!!!!
终于找到: https://software.intel.com/en-us/forums/opencl/topic/714946 这个 https://software.intel.com/en-us/articles/sdk-for-opencl-gsg 这个教程!等买来就可以试了。。。
*********************************烦躁**************************************************
大神建议我先在windows 7上测试,machine:windows7 + Intel HD graphics 4600 ,core i5-6500 + Nvidia 750 Ti
先下载合适的Intel驱动:https://downloadcenter.intel.com/product/80939/Graphics-Drivers
but 我windows 7 的电脑上安装不成功,后来去同事windows 10的电脑上才安装成功。哎如果要试,只能在他windows10上安装VS,然后运行OpenCL程序。。。
终于知道原因了:刚刚看到官网上给的4个版本的Linux的intel-driver的install instruction: Installation of the intel-opencl-r3.1 driver requires a 5th, 6th or 7th generation Intel® processor with Intel®Processor Graphics Technology not previously disabled by the BIOS or motherboard settings or Intel PentiumJ4000 and Intel Celeron J3000 processors.
而我的HD 4600( core i5-6500) 是属于4th 而不是5th!!!所以不适合我的电脑,和我电脑型号不对!!!!!!!!!!!!!!!天哪郁闷!!!所以如果公司不买个新的Intel核显,是无法继续的。。。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。