Optimization on Heterogeneous Systems Kerry A. Seitz, Jr. and Mark - - PowerPoint PPT Presentation

optimization on heterogeneous systems
SMART_READER_LITE
LIVE PREVIEW

Optimization on Heterogeneous Systems Kerry A. Seitz, Jr. and Mark - - PowerPoint PPT Presentation

Virtual Machine and Bytecode for Optimization on Heterogeneous Systems Kerry A. Seitz, Jr. and Mark C. Lewis Trinity University, San Antonio, TX Acknowledgments Trinity University Department of Computer Science Trinity University Mach


slide-1
SLIDE 1

Virtual Machine and Bytecode for Optimization on Heterogeneous Systems

Kerry A. Seitz, Jr. and Mark C. Lewis Trinity University, San Antonio, TX

slide-2
SLIDE 2

Acknowledgments

 Trinity University Department of Computer Science  Trinity University Mach Fellowship Program

slide-3
SLIDE 3

Overview

 Introduction  Bytecode Design  Implementation  Conclusion

slide-4
SLIDE 4

Heterogeneous Computing

 Use all hardware

components available

 CPU, GPU, FPGA, DSP

 Increase Performance  Hardware independent

| Introduction | Bytecode Design | Implementation | Conclusion |

slide-5
SLIDE 5

Heterogeneous Computing Challenges

 Different programming models  Different combinations of devices  Little development tool support

 OpenCL, CUDA

 Developer training

| Introduction | Bytecode Design | Implementation | Conclusion |

slide-6
SLIDE 6

Motivations

 Make heterogeneous computing easier  Runtime code optimizations  Platform independence

| Introduction | Bytecode Design | Implementation | Conclusion |

slide-7
SLIDE 7

Annotation

 Provide optimization hints to VM  Can be disregarded until optimization  Backwards compatibility  Two formats

 Within instructions  Annotation file

| Introduction | Bytecode Design | Implementation | Conclusion |

slide-8
SLIDE 8

Annotation Examples

 Immutability  Escape thread/stack frame  Generics/Type Erasure  Specify Device

| Introduction | Bytecode Design | Implementation | Conclusion |

slide-9
SLIDE 9

Popular Virtual Machines

 Java – stack-based  Dalvik – register-based (16 registers)  Both have issues

| Introduction | Bytecode Design | Implementation | Conclusion |

slide-10
SLIDE 10

Virtual Machine Design

 Variables

 216 per stack frame  Type associated with each  Annotations

 Class Files

 Header modeled after Dalvik  Annotations

| Introduction | Bytecode Design | Implementation | Conclusion |

slide-11
SLIDE 11

Instruction Format

| Introduction | Bytecode Design | Implementation | Conclusion |

slide-12
SLIDE 12

Instruction Format

| Introduction | Bytecode Design | Implementation | Conclusion |

slide-13
SLIDE 13

Instruction Format

| Introduction | Bytecode Design | Implementation | Conclusion |

slide-14
SLIDE 14

Instruction Format

| Introduction | Bytecode Design | Implementation | Conclusion |

slide-15
SLIDE 15

Programming Language

Scala OpenCL

 High-level  Object oriented/functional  Compiles to JVM  Lower-level  Heterogeneous  Platform independent

(with correct drivers)

| Introduction | Bytecode Design | Implementation | Conclusion |

slide-16
SLIDE 16

GPU Execution

 Uses OpenCL (through JavaCL)  Compiles bytecode instructions into OpenCL kernel  Parallelizes over an array of data

| Introduction | Bytecode Design | Implementation | Conclusion |

slide-17
SLIDE 17

Summary

 Heterogeneous computing is hard, but increasingly

essential

 Designed bytecode to aid in heterogeneous computing

 Optimization hints in annotations  Platform independent

 Implementation in Scala with OpenCL

| Introduction | Bytecode Design | Implementation | Conclusion |

slide-18
SLIDE 18

Future research

 Design more annotations  Implement more annotations  Develop lower level interpreter/JIT compiler  Explore program analysis techniques

| Introduction | Bytecode Design | Implementation | Conclusion |

slide-19
SLIDE 19

Questions?