Eyesweb GpGpu User Manual

12 pages
234 views

Please download to get full document.

View again

of 12
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Share
Description
The GPGPU library is designed to support GPU processing in EyesWeb. The library de- sign is done to support processing on several datatypes such as audio and video streams, numeric matrix, etc. However, the development have focused primarly on supporting image processing, as this is usually the most CPU-consuming activity performed in EyesWeb. Ex- ploiting the GPU for video processing gives a signi cant performance improvement to patch execution, because of the high level of parallelism allowed by modern GPUs. Moreover, the CPU is left free for more general-purpose activities.
Tags
Transcript
  EyesWeb XMI 5.1.0 – GPGPU Library June 10, 2010  Part IDescription 1  Chapter 1GPGPU Library overview 1.1 Overview The GPGPU library is designed to support GPU processing in EyesWeb. The library de-sign is done to support processing on several datatypes such as audio and video streams,numeric matrix, etc. However, the development have focused primarly on supporting imageprocessing, as this is usually the most CPU-consuming activity performed in EyesWeb. Ex-ploiting the GPU for video processing gives a significant performance improvement to patchexecution, because of the high level of parallelism allowed by modern GPUs. Moreover, theCPU is left free for more general-purpose activities.One main advantage of the GPGPU library is that it is designed to store all datatypein the device memory (i.e., on the video card) whenever possible. This means that if youhave a chain of blocks, all working in the GPU, the memory is not transferred forth andback from System memory (i.e., the standard computer memory) to Device memory (i.e.,the memory of the video card) or viceversa. The datatype is entirely stored in the Devicememory throughout all processing steps. The data travelling among the EyesWeb block isa simple lightweight reference to such memory; this avoid many transfers wbetween Systemand Device memory, which might be a bottleneck.Nowadays, different techniques can be used to support GPU processing. The mostwell-known approach are CG, CUDA (by NVIDIA), and ATI Stream (by ATI). CurrentlyEyesWeb provides support for the GPGPU approach and for the CUDA-based approach. 1.1.1 GPU-based video processing By the final user point of view, GPU-based image processing in EyesWeb does not differfrom standard image processing. In most cases the only difference is within the sourceblocks, where a new option is available to select the image type to be used as output for suchblocks. Thus, using the standard Image datatype means that the following image processingis performed on CPU; however, using GPGPU image or CUDA image means that thefollowing blocks will operate on GPU (using OpenGl or CUDA technologies, respectively).Usually, no other special blocks are needed. Many EyesWeb blocks were already designed tosupport working on several datatypes; as an example, the ScalarArithmetic operations canbe performed on several different datatypes (e.g., images, audio, matrices, scalar numbers,time-series, etc.); these blocks will work with the CUDA and GPGPU images too, and, in2  such cases, processing will occur on GPU. Other blocks which were specifically designed forimage processing (e.g., media filter, blur, morphological operators, etc) have been extendedto support the new image types. As a matter of fact, most patches can be changed fromCPU to GPU processing by simply changing the image type. 1.1.2 CUDA vs CG The purpose of both the CUDA-based and CG-based implementations of the image datatypesis the same: to perform processing using the GPU instead of the CPU. However, the under-lying technologies are quite different. The CG-based approach was born to perform videoeffects on textures, in order to obtain visible effects such as bump-mapping, etc. Sincethe approach was born to obtain video effects for visualized images (i.e., visible texturesof a 3D world), there is the need of some magics to use the same approach when workingon image processing and analysis. This cause some overhead if compared to the CUDA-based approach, which was designed as a general purpose language for parallel computation(SIMD). Thus, as a general rule of thumb, prefer CUDA to CG when the same functional-ity is available for both datatypes. However, there are cases where choosing CUDA is notpossible. In particular: ã CUDA needs specific support from the hardware; such support is available on allmodern NVIDIA GPUs, but is not available on older ones. ã Some specific operations have been developed only in one or the either approach. E.g.,ultimatte chroma keying has been implemented only within the CG-based approach,whereas BCDistortion (a background subtraction technique) has been implementedonly in the CUDA-based approach or in the CPU-based approach, 1.1.3 CUDA vs ATI Streams One may wonder why EyesWeb currently supports CUDA but does not support the cor-responding ATI technology, named ATI streams. The reason is mainly due to historicalreasons. When the EyesWeb XMI GPGPU Library library was originally conceived anddesigned, the ATI stream technology was not born yet (at least, it was not publicly avail-able). The general purpose language to program ATI GPUs was named CTF (Close ToFire), and was a very low level technique (almost the same as using an assembly languageinstead of a C language). Thus, the choice was quite naturally oriented toward the CUDAapproach. Nowadays, ATI streams has evolved a lot and the ATI stream technology can beconsidered a valid alternative to CUDA. Although EyesWeb does not provide support forATI streams, when the EyesWeb XMI GPGPU Library library was designed, the possibil-ity to have several alternative implementations was kept into account. The fact that twodifferent implementations are currently available (CG and CUDA) is there to show that thedesign of the library is well suited to host alternative approaches.3
Related Search
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks