Semi-Automated Parallel Programming in Heterogeneous Intelligent Reconfigurable Environments (SAPPHIRE) Sean Stanek Iowa State University
Total Page:16
File Type:pdf, Size:1020Kb
Iowa State University Capstones, Theses and Graduate Theses and Dissertations Dissertations 2012 Semi-automated parallel programming in heterogeneous intelligent reconfigurable environments (SAPPHIRE) Sean Stanek Iowa State University Follow this and additional works at: https://lib.dr.iastate.edu/etd Part of the Computer Sciences Commons Recommended Citation Stanek, Sean, "Semi-automated parallel programming in heterogeneous intelligent reconfigurable environments (SAPPHIRE)" (2012). Graduate Theses and Dissertations. 12560. https://lib.dr.iastate.edu/etd/12560 This Dissertation is brought to you for free and open access by the Iowa State University Capstones, Theses and Dissertations at Iowa State University Digital Repository. It has been accepted for inclusion in Graduate Theses and Dissertations by an authorized administrator of Iowa State University Digital Repository. For more information, please contact [email protected]. Semi-automated parallel programming in heterogeneous intelligent reconfigurable environments (SAPPHIRE) by Sean Stanek A dissertation submitted to the graduate faculty in partial fulfillment of the requirements for the degree of DOCTOR OF PHILOSOPHY Major: Computer Science Program of Study Committee: Carl Chang, Major Professor Johnny Wong Wallapak Tavanapong Les Miller Morris Chang Iowa State University Ames, Iowa 2012 Copyright © Sean Stanek, 2012. All rights reserved. ii TABLE OF CONTENTS LIST OF TABLES ...................................................................................................................... viii LIST OF FIGURES ....................................................................................................................... ix PROJECT SUMMARY .................................................................................................................. xi CHAPTER 1. INTRODUCTION .................................................................................................. 1 CHAPTER 2. RELATED WORK ................................................................................................ 5 2.1 Program Construction ............................................................................................... 5 2.1.1 DirectShow ....................................................................................................... 5 2.1.2 Circuit Languages ............................................................................................. 6 2.1.3 Aspect Oriented Programming ......................................................................... 6 2.2 Parallel Computing ................................................................................................... 7 2.2.1 Data Parallelism ................................................................................................ 7 2.2.2 Task Parallelism and Stream Programming ...................................................... 8 2.2.3 Hybrid Task and Data Parallelism .................................................................... 9 2.3 Multiprocessor Task Scheduling............................................................................. 10 2.3.1 Homogeneous Task Scheduling ...................................................................... 10 2.3.2 Heterogeneous Task Scheduling ..................................................................... 11 2.3.3 Stream Task Scheduling ................................................................................. 13 2.3.4 Heterogeneous Stream Task Scheduling ........................................................ 15 2.3.5 Windows Task Scheduler ............................................................................... 16 2.4 Endoscopy Video Analysis ..................................................................................... 17 iii 2.4.1 Picture Archiving and Communication Systems (PACS) .............................. 17 2.4.2 Scene Segmentation and Object Detection for Colonoscopy ......................... 18 CHAPTER 3. OVERVIEW OF SAPPHIRE............................................................................... 20 3.1 Design and Overview of SAPPHIRE ..................................................................... 20 3.2 Features and Strategies ........................................................................................... 25 3.2.1 Semi-Automated Program Construction ......................................................... 26 3.2.2 Module Implementation .................................................................................. 28 3.2.3 Data Packets .................................................................................................... 30 3.2.4 Communication ............................................................................................... 32 3.2.5 Synchronization .............................................................................................. 33 3.2.6 Feedback Loop ................................................................................................ 35 3.2.7 Data Filtering .................................................................................................. 35 3.2.8 Profiling .......................................................................................................... 36 3.2.9 Memory Leak Detection ................................................................................. 38 3.2.10 Crash Reporting .............................................................................................. 40 3.3 Common Modules and Data Types......................................................................... 40 3.3.1 Video Data and Modules ................................................................................ 41 3.3.2 Simple Analysis Modules ............................................................................... 44 3.3.3 Helper and Extension Modules ....................................................................... 45 3.4 Example EndoCapture.ini ....................................................................................... 46 3.4.1 Example Task Graph....................................................................................... 47 CHAPTER 4. SAPPHIRE INTERNALS ................................................................................... 48 4.1 Pseudocode for a Main Program ............................................................................. 48 4.2 Program and Virtual Graph Construction ............................................................... 48 iv 4.2.1 Packet Filters and Priority Overrides .............................................................. 50 4.2.2 Generating the Virtual Parallel Task Graph .................................................... 51 4.2.3 Data and Module Pruning ............................................................................... 53 4.2.4 Updating the Internal State ............................................................................. 53 4.2.5 Starting the Program ....................................................................................... 53 4.2.6 Data Processing ............................................................................................... 53 4.3 Work Loop using Windows Scheduler ................................................................... 54 4.4 Data Structures ........................................................................................................ 57 4.4.1 Packets ............................................................................................................ 57 4.4.2 Modules........................................................................................................... 59 4.4.3 Internal Arrays and Lists ................................................................................. 59 4.4.4 Common Data Packet Formats ....................................................................... 59 4.5 Synchronization ...................................................................................................... 61 4.5.1 Middleware Synchronization .......................................................................... 61 4.5.2 Application Synchronization .......................................................................... 62 4.6 Runtime Profiling.................................................................................................... 64 4.7 Memory Leak Detection ......................................................................................... 65 4.8 Crash Reporting ...................................................................................................... 66 4.9 Video Processing Considerations ........................................................................... 68 4.10 Evaluation of SAPPHIRE ....................................................................................... 69 4.10.1 Case Ctudy Implementation ............................................................................ 69 4.10.2 Consistency Checking ..................................................................................... 70 4.10.3 Stress Testing .................................................................................................. 70 4.10.4 Error Reporting ............................................................................................... 71 v 4.11 Summary and Future Work ..................................................................................... 71 CHAPTER 5. TASK SCHEDULING OF STREAM PROGRAMS ON HETEROGENEOUS SYSTEMS ... 73 5.1 Our Contributions