'Computer Sience/H264-OpenCL'에 해당되는 글 2건

  1. 2012.03.26 OpenCL(NVIDIA) Linux에 설치 (1)
  2. 2012.01.02 OpenCl Programming Guide

1. 필요한 패키지 설치

~$ sudo apt-get install freeglut3-dev build-essential libx11-dev

libxmu-dev libxi-dev libgl1-mesa-glx libglu1-mesa libglu1-mesa-dev

~$ sudo apt-get install libxmu6 libxmu-dev


2. 임시폴더 생성

~$ mkdir temp

~$ cd temp/


3. 파일 다운 받기 (http://developer.nvidia.com/cuda-toolkit-40#Linux)

3-1. DEV DRIVER

~/temp$ wget http://developer.download.nvidia.com/compute/cuda/4_0/drivers/devdriver_4.0_linux_32_270.41.19.run

3-2. Toolkit (ubuntu 10.10)

~/temp$ wget http://developer.download.nvidia.com/compute/cuda/4_0/toolkit/cudatoolkit_4.0.17_linux_32_ubuntu10.10.run

3-3. SDK & code Samples

~/temp$ wget  http://developer.download.nvidia.com/compute/cuda/4_0/sdk/gpucomputingsdk_4.0.17_linux.run


4. x window 끄기

~/temp$ sudo service gdm stop

gdm stop/waiting


5. driver 설치 시도

~/temp$ chmod +x *

~/temp$ sudo ./devdriver_4.0_linux_32_270.41.19.run


6. Nouveau kernel driver 오류 리부팅 (설정 자동 고쳐짐)

~/temp$ sudo reboot


7. 다시 설치

~/$ cd temp

~/temp$ sudo service gdm stop

gdm stop/waiting

~/temp$ sudo ./devdriver_4.0_linux_32_270.41.19.run


8. toolkit 설치

~/temp$ sudo ./cudatoolkit_4.0.17_linux_32_ubuntu10.10.run


8-1. 환경변수 설정

* Please make sure your PATH includes /usr/local/cuda/bin

* Please make sure your LD_LIBRARY_PATH

*   for 32-bit Linux distributions includes /usr/local/cuda/lib

*   for 64-bit Linux distributions includes /usr/local/cuda/lib64:/usr/local/cuda/lib

* OR

*   for 32-bit Linux distributions add /usr/local/cuda/lib

*   for 64-bit Linux distributions add /usr/local/cuda/lib64 and /usr/local/cuda/lib

* to /etc/ld.so.conf and run ldconfig as root

* Installation Complete


9. GPU computing SDK code sample 설치

~/temp$ ./gpucomputingsdk_4.0.17_linux.run


9-1. 환경변수 설정

* Please make sure your PATH includes /usr/local/cuda/bin

* Please make sure your LD_LIBRARY_PATH includes /usr/local/cuda/lib

* Installation Complete


10. make

$ cd ~/NVIDIA_GPU_Computing_SDK/OpenCL

~/NVIDIA_GPU_Computing_SDK/OpenCL$ make

...

Finished building all


11. 실행

~/NVIDIA_GPU_Computing_SDK/OpenCL$ cd bin/linux/release/

~/NVIDIA_GPU_Computing_SDK/OpenCL/bin/linux/release/$ oclDeviceQuery


12. oclDeviceQuery 결과

[oclDeviceQuery] starting...

./oclDeviceQuery Starting...


OpenCL SW Info:


 CL_PLATFORM_NAME:     NVIDIA CUDA

 CL_PLATFORM_VERSION:   OpenCL 1.0 CUDA 4.0.1

 OpenCL SDK Revision:     7027912



OpenCL Device Info:


 1 devices found supporting OpenCL:


 ---------------------------------

 Device GeForce 8500 GT

 ---------------------------------

  CL_DEVICE_NAME:                       GeForce 8500 GT

  CL_DEVICE_VENDOR:                     NVIDIA Corporation

  CL_DRIVER_VERSION:                     270.41.19

  CL_DEVICE_VERSION:                     OpenCL 1.0 CUDA

  CL_DEVICE_TYPE:                 CL_DEVICE_TYPE_GPU

  CL_DEVICE_MAX_COMPUTE_UNITS:          2

  CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS:   3

  CL_DEVICE_MAX_WORK_ITEM_SIZES: 512 / 512 / 64

  CL_DEVICE_MAX_WORK_GROUP_SIZE: 512

  CL_DEVICE_MAX_CLOCK_FREQUENCY:       1570 MHz

  CL_DEVICE_ADDRESS_BITS:         32

  CL_DEVICE_MAX_MEM_ALLOC_SIZE:         128 MByte

  CL_DEVICE_GLOBAL_MEM_SIZE:            511 MByte

  CL_DEVICE_ERROR_CORRECTION_SUPPORT:   no

  CL_DEVICE_LOCAL_MEM_TYPE:             local

  CL_DEVICE_LOCAL_MEM_SIZE:             16 KByte

  CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE:   64 KByte

  CL_DEVICE_QUEUE_PROPERTIES:            CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE

  CL_DEVICE_QUEUE_PROPERTIES:            CL_QUEUE_PROFILING_ENABLE

  CL_DEVICE_IMAGE_SUPPORT:              1

  CL_DEVICE_MAX_READ_IMAGE_ARGS: 128

  CL_DEVICE_MAX_WRITE_IMAGE_ARGS:       8

  CL_DEVICE_SINGLE_FP_CONFIG:            INF-quietNaNs round-to-nearest round-to-zero round-to-inf fma


  CL_DEVICE_IMAGE <dim>                  2D_MAX_WIDTH    4096

                                        2D_MAX_HEIGHT   32768

                                        3D_MAX_WIDTH    2048

                                        3D_MAX_HEIGHT   2048

                                        3D_MAX_DEPTH    2048


  CL_DEVICE_EXTENSIONS:                  cl_khr_byte_addressable_store

                                        cl_khr_icd

                                        cl_khr_gl_sharing

                                        cl_nv_compiler_options

                                        cl_nv_device_attribute_query

                                        cl_nv_pragma_unroll

                                        cl_khr_global_int32_base_atomics

                                        cl_khr_global_int32_extended_atomics



  CL_DEVICE_COMPUTE_CAPABILITY_NV:      1.1

  NUMBER OF MULTIPROCESSORS:           2

  NUMBER OF CUDA CORES:                 16

  CL_DEVICE_REGISTERS_PER_BLOCK_NV:      8192

  CL_DEVICE_WARP_SIZE_NV:         32

  CL_DEVICE_GPU_OVERLAP_NV:             CL_TRUE

  CL_DEVICE_KERNEL_EXEC_TIMEOUT_NV:     CL_TRUE

  CL_DEVICE_INTEGRATED_MEMORY_NV:      CL_FALSE

  CL_DEVICE_PREFERRED_VECTOR_WIDTH_<t>  CHAR 1, SHORT 1, INT 1, LONG 1, FLOAT 1, DOUBLE 0



  ---------------------------------

  2D Image Formats Supported (71)

  ---------------------------------

  #     Channel Order   Channel Type         


  1     CL_R            CL_FLOAT             

  2     CL_R            CL_HALF_FLOAT        

  3     CL_R            CL_UNORM_INT8        

  4     CL_R            CL_UNORM_INT16       

  5     CL_R            CL_SNORM_INT16       

  6     CL_R            CL_SIGNED_INT8       

  7     CL_R            CL_SIGNED_INT16      

  8     CL_R            CL_SIGNED_INT32      

  9     CL_R            CL_UNSIGNED_INT8     

  10    CL_R            CL_UNSIGNED_INT16    

  11    CL_R            CL_UNSIGNED_INT32    

  12    CL_A            CL_FLOAT             

  13    CL_A            CL_HALF_FLOAT        

  14    CL_A            CL_UNORM_INT8        

  15    CL_A            CL_UNORM_INT16       

  16    CL_A            CL_SNORM_INT16       

  17    CL_A            CL_SIGNED_INT8       

  18    CL_A            CL_SIGNED_INT16      

  19    CL_A            CL_SIGNED_INT32      

  20    CL_A            CL_UNSIGNED_INT8     

  21    CL_A            CL_UNSIGNED_INT16    

  22    CL_A            CL_UNSIGNED_INT32    

  23    CL_RG           CL_FLOAT             

  24    CL_RG           CL_HALF_FLOAT        

  25    CL_RG           CL_UNORM_INT8        

  26    CL_RG           CL_UNORM_INT16       

  27    CL_RG           CL_SNORM_INT16       

  28    CL_RG           CL_SIGNED_INT8       

  29    CL_RG           CL_SIGNED_INT16      

  30    CL_RG           CL_SIGNED_INT32      

  31    CL_RG           CL_UNSIGNED_INT8     

  32    CL_RG           CL_UNSIGNED_INT16    

  33    CL_RG           CL_UNSIGNED_INT32    

  34    CL_RA           CL_FLOAT             

  35    CL_RA           CL_HALF_FLOAT        

  36    CL_RA           CL_UNORM_INT8        

  37    CL_RA           CL_UNORM_INT16       

  38    CL_RA           CL_SNORM_INT16       

  39    CL_RA           CL_SIGNED_INT8       

  40    CL_RA           CL_SIGNED_INT16      

  41    CL_RA           CL_SIGNED_INT32      

  42    CL_RA           CL_UNSIGNED_INT8     

  43    CL_RA           CL_UNSIGNED_INT16    

  44    CL_RA           CL_UNSIGNED_INT32    

  45    CL_RGBA         CL_FLOAT             

  46    CL_RGBA         CL_HALF_FLOAT        

  47    CL_RGBA         CL_UNORM_INT8        

  48    CL_RGBA         CL_UNORM_INT16       

  49    CL_RGBA         CL_SNORM_INT16       

  50    CL_RGBA         CL_SIGNED_INT8       

  51    CL_RGBA         CL_SIGNED_INT16      

  52    CL_RGBA         CL_SIGNED_INT32      

  53    CL_RGBA         CL_UNSIGNED_INT8     

  54    CL_RGBA         CL_UNSIGNED_INT16    

  55    CL_RGBA         CL_UNSIGNED_INT32    

  56    CL_BGRA         CL_UNORM_INT8        

  57    CL_BGRA         CL_SIGNED_INT8       

  58    CL_BGRA         CL_UNSIGNED_INT8     

  59    CL_ARGB         CL_UNORM_INT8        

  60    CL_ARGB         CL_SIGNED_INT8       

  61    CL_ARGB         CL_UNSIGNED_INT8     

  62    CL_INTENSITY    CL_FLOAT             

  63    CL_INTENSITY    CL_HALF_FLOAT        

  64    CL_INTENSITY    CL_UNORM_INT8        

  65    CL_INTENSITY    CL_UNORM_INT16       

  66    CL_INTENSITY    CL_SNORM_INT16       

  67    CL_LUMINANCE    CL_FLOAT             

  68    CL_LUMINANCE    CL_HALF_FLOAT        

  69    CL_LUMINANCE    CL_UNORM_INT8        

  70    CL_LUMINANCE    CL_UNORM_INT16       

  71    CL_LUMINANCE    CL_SNORM_INT16       


  ---------------------------------

  3D Image Formats Supported (71)

  ---------------------------------

  #     Channel Order   Channel Type         


  1     CL_R            CL_FLOAT             

  2     CL_R            CL_HALF_FLOAT        

  3     CL_R            CL_UNORM_INT8        

  4     CL_R            CL_UNORM_INT16       

  5     CL_R            CL_SNORM_INT16       

  6     CL_R            CL_SIGNED_INT8       

  7     CL_R            CL_SIGNED_INT16      

  8     CL_R            CL_SIGNED_INT32      

  9     CL_R            CL_UNSIGNED_INT8     

  10    CL_R            CL_UNSIGNED_INT16    

  11    CL_R            CL_UNSIGNED_INT32    

  12    CL_A            CL_FLOAT             

  13    CL_A            CL_HALF_FLOAT        

  14    CL_A            CL_UNORM_INT8        

  15    CL_A            CL_UNORM_INT16       

  16    CL_A            CL_SNORM_INT16       

  17    CL_A            CL_SIGNED_INT8       

  18    CL_A            CL_SIGNED_INT16      

  19    CL_A            CL_SIGNED_INT32      

  20    CL_A            CL_UNSIGNED_INT8     

  21    CL_A            CL_UNSIGNED_INT16    

  22    CL_A            CL_UNSIGNED_INT32    

  23    CL_RG           CL_FLOAT             

  24    CL_RG           CL_HALF_FLOAT        

  25    CL_RG           CL_UNORM_INT8        

  26    CL_RG           CL_UNORM_INT16       

  27    CL_RG           CL_SNORM_INT16       

  28    CL_RG           CL_SIGNED_INT8       

  29    CL_RG           CL_SIGNED_INT16      

  30    CL_RG           CL_SIGNED_INT32      

  31    CL_RG           CL_UNSIGNED_INT8     

  32    CL_RG           CL_UNSIGNED_INT16    

  33    CL_RG           CL_UNSIGNED_INT32    

  34    CL_RA           CL_FLOAT             

  35    CL_RA           CL_HALF_FLOAT        

  36    CL_RA           CL_UNORM_INT8        

  37    CL_RA           CL_UNORM_INT16       

  38    CL_RA           CL_SNORM_INT16       

  39    CL_RA           CL_SIGNED_INT8       

  40    CL_RA           CL_SIGNED_INT16      

  41    CL_RA           CL_SIGNED_INT32      

  42    CL_RA           CL_UNSIGNED_INT8     

  43    CL_RA           CL_UNSIGNED_INT16    

  44    CL_RA           CL_UNSIGNED_INT32    

  45    CL_RGBA         CL_FLOAT             

  46    CL_RGBA         CL_HALF_FLOAT        

  47    CL_RGBA         CL_UNORM_INT8        

  48    CL_RGBA         CL_UNORM_INT16       

  49    CL_RGBA         CL_SNORM_INT16       

  50    CL_RGBA         CL_SIGNED_INT8       

  51    CL_RGBA         CL_SIGNED_INT16      

  52    CL_RGBA         CL_SIGNED_INT32      

  53    CL_RGBA         CL_UNSIGNED_INT8     

  54    CL_RGBA         CL_UNSIGNED_INT16    

  55    CL_RGBA         CL_UNSIGNED_INT32    

  56    CL_BGRA         CL_UNORM_INT8        

  57    CL_BGRA         CL_SIGNED_INT8       

  58    CL_BGRA         CL_UNSIGNED_INT8     

  59    CL_ARGB         CL_UNORM_INT8        

  60    CL_ARGB         CL_SIGNED_INT8       

  61    CL_ARGB         CL_UNSIGNED_INT8     

  62    CL_INTENSITY    CL_FLOAT             

  63    CL_INTENSITY    CL_HALF_FLOAT        

  64    CL_INTENSITY    CL_UNORM_INT8        

  65    CL_INTENSITY    CL_UNORM_INT16       

  66    CL_INTENSITY    CL_SNORM_INT16       

  67    CL_LUMINANCE    CL_FLOAT             

  68    CL_LUMINANCE    CL_HALF_FLOAT        

  69    CL_LUMINANCE    CL_UNORM_INT8        

  70    CL_LUMINANCE    CL_UNORM_INT16       

  71    CL_LUMINANCE    CL_SNORM_INT16       


oclDeviceQuery, Platform Name = NVIDIA CUDA, Platform Version = OpenCL 1.0 CUDA 4.0.1, SDK Revision = 7027912, NumDevs = 1, Device = GeForce 8500 GT


System Info:


 Local Time/Date =  17:14:33, 03/26/2012

 CPU Name: Intel(R) Core(TM)2 CPU 6300 @ 1.86GHz

 # of CPU processors: 2

 Linux version 2.6.35-22-generic (buildd@rothera) (gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu4) ) #33-Ubuntu SMP Sun Sep 19 20:34:50 UTC 2010



[oclDeviceQuery] test results...

PASSED


Press ENTER to exit...




ETC.

prb)

/usr/bin/ld: cannot find -lGL

sol)

$ rm /usr/lib/libGL.so

$ ln -s /usr/lib/libGL.so.295.33 /usr/lib/libGL.so


prb)

fatal error: GL/glx.h: No such file or directory

sol)

$ sudo apt-get install libgl1-mesa-dev


prb)

fatal error: CL/cl.h: No such file or directory

sol)

$ export C_INCLUDE_PATH=/usr/local/cuda/include

신고

'Computer Sience > H264-OpenCL' 카테고리의 다른 글

OpenCL(NVIDIA) Linux에 설치  (1) 2012.03.26
OpenCl Programming Guide  (0) 2012.01.02
Posted by Leo 리오 트랙백 0 : 댓글 1
ref: http://code.google.com/p/opencl-book-samples/wiki/Installation
http://blog.naver.com/toses3?Redirect=Log&logNo=40140926000  
 

# Install CMake
http://www.cmake.org/cmake/resources/software.html 

# Install ATI Stream SDK or NVIDIA GPU Computing SDK
http://developer.nvidia.com/cuda-downloads
*GPU Computing SDK - complete package including all code samples



# Downloads Examples
http://code.google.com/p/opencl-book-samples/source/checkout

# Build examples
run 'cmake-gui'
points 'where code' to downloaded location.
sets 'where binaries' to somewhere.
select 'configure' and select a vs#.
select 'generate'



# Open and Test HelloWorld at VISUAL
open CL_BOOK.sln
right click on 'HelloWorld' prj -> set as a start project
ctrl+F5

#결과




Opencl Programming Guide (Paperback / 1st Ed.)
외국도서
저자 : Aaftab Munshi
출판 : Pearson 2011.07.23
상세보기

Heterogeneous Computing with OpenCL (Paperback)
외국도서
저자 : Benedict Gaster, David R. Kaeli, Lee Howes, Perhaad Mistry
출판 : Morgan Kaufmann Publishers 2011.08.31
상세보기



신고

'Computer Sience > H264-OpenCL' 카테고리의 다른 글

OpenCL(NVIDIA) Linux에 설치  (1) 2012.03.26
OpenCl Programming Guide  (0) 2012.01.02
Posted by Leo 리오 트랙백 0 : 댓글 0