presentación gpus maeb 2012

26
GPU Computation in Bioinspired Algorithms. A review M.G. Arenas, A.M. Mora, G. Romero, P.A. Castillo Depto. Arquitectura y Tecnología de Computadores

Upload: gustavoromero

Post on 21-Jan-2015

652 views

Category:

Education


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Presentación GPUs MAEB 2012

GPU Computation in Bioinspired Algorithms. A review

M.G. Arenas, A.M. Mora, G. Romero, P.A. CastilloDepto. Arquitectura y Tecnología de Computadores

Page 2: Presentación GPUs MAEB 2012

1. Introduction

• Growing interest in GPU computation

• A GPU is able to perform graphics manipulation at high speed

• Developers can write their own high-level programs to run on GPU

• These architectures suited to run large computational problems (bioinformatics area)

GPU Computation in Bioinspired Algorithms. A review

Page 3: Presentación GPUs MAEB 2012

1. Introduction

• GPUs can be seen as SIMD multi-core processors

• Internally the GPU contains a number of small processors that are used to perform calculations

• Depending on the GPU, the number of threads that can be executed in parallel is in the order of hundreds

GPU Computation in Bioinspired Algorithms. A review

Page 4: Presentación GPUs MAEB 2012

GPU Computation in Bioinspired Algorithms. A review

Index

1. Introduction

2. Throughput, parallelism and GPUs

3. GPUs Programming

4. Bioinspired Methods on GPUs

5. Conclusions

Page 5: Presentación GPUs MAEB 2012

2. Throughput, parallelism and GPUs

• For years, processor makers increased clock rates and instruction-level paralelism => sequential code run faster

• Nowadays, they design multicore-chips

=> software adapted to

multithreaded / multiprocess

GPU Computation in Bioinspired Algorithms. A review

Page 6: Presentación GPUs MAEB 2012

2. Throughput, parallelism and GPUs

• GPUs have matured, becoming general purpose computational devices for highly parallel work-loads

GPU Computation in Bioinspired Algorithms. A review

Page 7: Presentación GPUs MAEB 2012

GPU Computation in Bioinspired Algorithms. A review

Index

1. Introduction

2. Throughput, parallelism and GPUs

3. GPUs Programming

4. Bioinspired Methods on GPUs

5. Conclusions

Page 8: Presentación GPUs MAEB 2012

3. GPUs Programming. Programming Model

• APIs based on C-like languages

• nVidia => GeForce => CUDA

• ATI => Radeon => Close to metal

• Aple => OpenCL

• Microsoft => DirectCompute

GPU Computation in Bioinspired Algorithms. A review

Page 9: Presentación GPUs MAEB 2012

3. GPUs Programming. Programming Model

• OpenCL applications:• GPUs, multi-core CPUs, FPGAs

• portable across different platforms

• keep functionality and correctness

GPU Computation in Bioinspired Algorithms. A review

Page 10: Presentación GPUs MAEB 2012

3. GPUs Programming. Execution Model

• Applications have serial portions and parallel portions (kernel)

• A kernel applies a single stream of instructions to many data (SIMD)

GPU Computation in Bioinspired Algorithms. A review

Page 11: Presentación GPUs MAEB 2012

3. GPUs Programming. Execution Model

• Terminology:

– Each piece of data = work-item (thread)– A kernel has thousands of work-items– A kernel is organized into many work-groups (thread block)

– Each work-group process many work-items

GPU Computation in Bioinspired Algorithms. A review

Page 12: Presentación GPUs MAEB 2012

3. GPUs Programming. Memory Model

• Define how the data is stored and communicated between CPU and GPU

• Global memoryCPU->rw / work-items->rw

• Constant memoryCPU->rw / work-items->ro

• Private memoryCPU->X / single work-item->rw

• Local memoryCPU->X / work-group->rw

GPU Computation in Bioinspired Algorithms. A review

Page 13: Presentación GPUs MAEB 2012

GPU Computation in Bioinspired Algorithms. A review

Index

1. Introduction

2. Throughput, parallelism and GPUs

3. GPUs Programming

4. Bioinspired Methods on GPUs

5. Conclusions

Page 14: Presentación GPUs MAEB 2012

4. Bioinspired Methods on GPUs

• Review of different evolutionary computation approaches using GPU

• Master-slave

• Fine-grained• Island-model

• ANN on GPUs

GPU Computation in Bioinspired Algorithms. A review

Page 15: Presentación GPUs MAEB 2012

4.1 Master-slave approaches:

• Some actions are executed in the CPU (main loop)• Evaluation and mutation are run on GPU

• Competition and selection are performed on the CPU, while mutation, reproduction and evaluation on the GPU

GPU Computation in Bioinspired Algorithms. A review

CPU

GPU

Page 16: Presentación GPUs MAEB 2012

4.1 Master-slave approaches

References

• Zhang, S., He, Z.: Implementation of parallel genetic algorithm based on cuda. In et al., Z.C., Lecture Notes in Computer Science, vol 5821. 2009

• Wong, M., Wong, T., Fok, K.: Parallel evolutionary algorithms on graphics processing unit. CEC 2005

• Harding, S., Banzhaf, W.: Fast genetic programming and artificial developmental systems on gpus. High Performance Computing Systems and Applications. 2007

GPU Computation in Bioinspired Algorithms. A review

Page 17: Presentación GPUs MAEB 2012

4.2 Fine-grained approaches:

• The whole evolutionary process is run on the GPU• Each EA individual is set to each GPU processor• Store individuals and fitness in the GPU global memory

• Problem: random number generation (on CPU)

GPU Computation in Bioinspired Algorithms. A review

Page 18: Presentación GPUs MAEB 2012

4.2 Fine-grained approaches

References

• Wong, M., Wong, T.: Parallel hybrid genetic algorithms on Consumer-Level graphics hardware. CEC 2006

• Wong, M., Wong, T.: Implementation of parallel genetic algorithms on graphics processing units. Studies in Computational Intelligence, vol 187, pp. 197–216. 2009

• Yu, Q., Chen, C., Pan, Z.: Parallel genetic algorithms on programmable graphics hardware. Lecture Notes in Computer Science, vol 3612, pp. 1051–1059. 2005

• Luo, Z., Liu, H.: Cellular genetic algorithms and local search for 3-SAT problem on graphic hardware. CEC 2006

• Li, J.,Wang, X., He, R., Chi, Z.: An efficient fine-grained parallel genetic algorithm based on GPU-Accelerated. Network and Parallel Computing Workshop. 2007

• Li, J., Zhang, L., Liu, L.: A parallel immune algorithm based on fine-grained model with gpu-acceleration. International Conference on Innovative Computing. 2009

• Vidal, P., Alba, E.: Cellular genetic algorithm on graphic processing units. NICSO 2010

GPU Computation in Bioinspired Algorithms. A review

Page 19: Presentación GPUs MAEB 2012

4.3 Coarse-grained approaches (island model):

• Code an “island” (EA) on GPU• Generate the initial population on CPU and copy it to the GPU VRAM• Each subpopulation evolves in each GPU processor• At some generations, individuals in subpopulations are shuffled via the

GPU VRAM

GPU Computation in Bioinspired Algorithms. A review

Page 20: Presentación GPUs MAEB 2012

4.3 Island-model approaches

References• Pospichal, P., Jaros., J.: Gpu-based acceleration of the genetic algorithm.

Technical report, GECOO competition (2009)

• Tsutsui, S., Fujimoto, N.: Solving quadratic assignment problems by genetic algorithms with gpu computation: a case study. GECCO 2009

• Luong, T.V., Melab, N., Talbi, E.G.: GPU-based Island Model for Evolutionary Algorithms. GECCO 2010

• Pospichal, P., Jaros, J., Schwarz, J.: Parallel genetic algorithm on the cuda architecture. Lecture Notes in Computer Science, vol 6024. 2010

• Pospichal, P., Schwarz, J., Jaros, J.: Parallel genetic algorithm solving 0/1 knapsack problem running on the gpu. International Conference on Soft Computing 2010

GPU Computation in Bioinspired Algorithms. A review

Page 21: Presentación GPUs MAEB 2012

4.4 ANN approaches

• Widely used in pattern recognition

• Usually the computation for ANN is inherently parallel

• However, many algorithms require some steps that are difficult to parallelize

GPU Computation in Bioinspired Algorithms. A review

Page 22: Presentación GPUs MAEB 2012

4.4 ANN approaches

References• http://www.irontaco.com/Documents/MeuthNeuralGPGPUSurvey.pdf• Kyoung-Su Oh, Keechul Jung, GPU implementation of neural networks, Pattern

Recognition, vol. 37, n.6, 2004• Z.Luo, H. Liu and X.Wu, Artificial Neural Network Computation on Graphic

Process Unit, IJCNN 2005 • M. Martínez-Zarzuela et al. Fuzzy ART Neural Network Parallel Computing on

the GPU. IWANN 2007

Libraries:• http://www.codeproject.com/KB/graphics/GPUNN.aspx

GPU Computation in Bioinspired Algorithms. A review

Page 23: Presentación GPUs MAEB 2012

GPU Computation in Bioinspired Algorithms. A review

Index

1. Introduction

2. Throughput, parallelism and GPUs

3. GPUs Programming

4. Bioinspired Methods on GPUs

5. Conclusions

Page 24: Presentación GPUs MAEB 2012

5. Conclusions

• GPU computing approach

• Overview current programming languages and software tools

• Review the use of GPUs to implement bioinspired algorithms

GPU Computation in Bioinspired Algorithms. A review

Page 25: Presentación GPUs MAEB 2012

5. Conclusions

• Most of the bioinspired methods use the GPU to speed-up the fitness evaluation

• Competition and selection are performed on CPU

• Fitness, mutation and reproduction are performed on GPU

• Speed-ups up to several thousands times higher on GPU compared to CPU sequential versions

GPU Computation in Bioinspired Algorithms. A review

Page 26: Presentación GPUs MAEB 2012

Thank you!

[email protected]

http://atc.ugr.es/~pedro/research/gpu/

GPU Computation in Bioinspired Algorithms. A review