2016年4月27日 星期三

Opencl , linux

Ubuntu 14.04 LTS

ref:
https://software.intel.com/en-us/intel-opencl/faq
https://www.freedesktop.org/wiki/Software/Beignet/

Support OS List :
https://software.intel.com/en-us/intel-opencl

Download Runtime :
https://software.intel.com/en-us/articles/opencl-drivers#lin64


安裝 ubuntu 14.04 LTS Desktop

裝 vmtool
./vmware-install.pl


apt-get install nautilus-open-terminal
apt-get install openssh-server

apt-get install lsb-core
apt-get install rpm libnuma1 alien

apt-cache search opencl
apt-get install clinfo
apt-get install opencl-headers
apt-get install ocl-icd-dbg
apt-get install ocl-icd-libopencl1
apt-get install ocl-icd-opencl-dev
apt-get install ocl-icd-dev
apt-get install opencl-1.2-man-doc

裝 SDK
intel_sdk_for_opencl_2016_ubuntu_6.0.0.1049_x64.tgz
裝runtime
opencl_runtime_16.1_x64_ubuntu_5.2.0.10002.tgz

問題:
clinfo I: ICD loader reports no usable platforms
-->沒有裝 runtime

~# clinfo
Number of platforms:                             1
  Platform Profile:                              FULL_PROFILE
  Platform Version:                              OpenCL 1.2 LINUX
  Platform Name:                                 Intel(R) OpenCL
  Platform Vendor:                               Intel(R) Corporation
  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


  Platform Name:                                 Intel(R) OpenCL
Number of devices:                               1
  Device Type:                                   CL_DEVICE_TYPE_CPU
  Device ID:                                     32902
  Max compute units:                             16
  Max work items dimensions:                     3
    Max work items[0]:                           8192
    Max work items[1]:                           8192
    Max work items[2]:                           8192
  Max work group size:                           8192
  Preferred vector width char:                   1
  Preferred vector width short:                  1
  Preferred vector width int:                    1
  Preferred vector width long:                   1
  Preferred vector width float:                  1
  Preferred vector width double:                 1
  Native vector width char:                      16
  Native vector width short:                     8
  Native vector width int:                       4
  Native vector width long:                      2
  Native vector width float:                     4
  Native vector width double:                    2
  Max clock frequency:                           2930Mhz
  Address bits:                                  64
  Max memory allocation:                         2092821504
  Image support:                                 Yes
  Max number of images read arguments:           480
  Max number of images write arguments:          480
  Max image 2D width:                            16384
  Max image 2D height:                           16384
  Max image 3D width:                            2048
  Max image 3D height:                           2048
  Max image 3D depth:                            2048
  Max samplers within kernel:                    480
  Max size of kernel argument:                   3840
  Alignment (bits) of base address:              1024
  Minimum alignment (bytes) for any datatype:    128
  Single precision floating point capability
    Denorms:                                     Yes
    Quiet NaNs:                                  Yes
    Round to nearest even:                       Yes
    Round to zero:                               No
    Round to +ve and infinity:                   No
    IEEE754-2008 fused multiply-add:             No
  Cache type:                                    Read/Write
  Cache line size:                               64
  Cache size:                                    262144
  Global memory size:                            8371286016
  Constant buffer size:                          131072
  Max number of constant args:                   480
  Local memory type:                             Global
  Local memory size:                             32768
  Error correction support:                      0
  Unified memory for Host and Device:            1
  Profiling timer resolution:                    1
  Device endianess:                              Little
  Available:                                     Yes
  Compiler available:                            Yes
  Execution capabilities:
    Execute OpenCL kernels:                      Yes
    Execute native function:                     Yes
  Queue properties:
    Out-of-Order:                                Yes
    Profiling :                                  Yes
  Platform ID:                                   0xb90a10
  Name:                                          Intel(R) Xeon(R) CPU           X5670  @ 2.93GHz
  Vendor:                                        Intel(R) Corporation
  Device OpenCL C version:                       OpenCL C 1.2
  Driver version:                                1.2.0.10002
  Profile:                                       FULL_PROFILE
  Version:                                       OpenCL 1.2 (Build 10002)
  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