pycomparch python based modules for exploring computer
play

PyCompArch: Python-Based Modules for Exploring Computer Architecture - PowerPoint PPT Presentation

PyCompArch: Python-Based Modules for Exploring Computer Architecture Concepts Workshop on Computer Architecture Education 2015 Dan Connors, Kyle Dunn, Ryan Bueter Department of Electrical Engineering University of Colorado Denver Overview


  1. PyCompArch: Python-Based Modules for Exploring Computer Architecture Concepts Workshop on Computer Architecture Education 2015 Dan Connors, Kyle Dunn, Ryan Bueter Department of Electrical Engineering University of Colorado Denver

  2. Overview Ø Motivation Ø IPython Notebook Ø PyCompArch Concept Notebooks Ø Multiprocessing: Mandelbrot, Amdahl’s, Speedup, and Efficiency Ø ParallelSchedule: Job Scheduling Ø Synthetic Speedup: Interactive Ø PyCompArch Concept Notebooks Ø Dynamic frequency scaling Ø Computer Vision (CV) Ø Code Box

  3. Motivation Ø Visualization of concepts of parallelism Ø Explore concepts from learner’s perspective versus single static graph of parameters Ø Explore/perform experiments on hands-on devices Ø Raspberry PI Ø Streamline collection, comparison, and visualization

  4. IPython Notebook Overview The IPython Notebook is a At Scale Learning – MOOC Ø web-based interactive computational environment Ø A well-structured code development environment Ø A framework for observing and recording and results of code execution Ø Linking text such as comments, equation generators for mathematics Ø Embedded plots and other rich media formatting options Ø The cloud coding advantage is that the IPython Notebook Viewer renders the code as a web page and users can read and interact with a remote system without having to install anything on their device. Ø Changes can be rolled back also, encouraging experimentation without creating excessive copies of source material

  5. Example: Jupyter (www.jupyter.org) 5

  6. PyCompArch Explore Raspberry Pi Explore Concepts Parallel Amdahl’s Law Code Box DVFS Parameters Collect Results Matplotlib Visualization

  7. Python Ø IPython Notebooks Ø Interactive lectures Ø Code and see: embed visualization of parallel performance trade-offs Ø Assignment template Ø Related work: ISCA 2015 Workshop PyMTL and Pydgin Tutorial: Python Frameworks for Highly Productive Computer Architecture Research Ø PyMTL is a hardware modeling framework Ø Pydgin is a framework for rapidly developing instruction-set simulators (ISSs) from a Python- based architecture description language.

  8. IPython Ø Computer Architecture Concepts - Python Parallelism Ø Multithreading and multiprocessing support Ø Speedup and efficiency Ø Amdahl’s law Ø Overhead Ø Explore Experiments Ø Benchmarking (Example: OpenCV) Ø Collecting, displaying, and comparing results Ø Dynamic frequency scaling on Raspberry Pi

  9. Mandelbrot Calculation : Block Size Ø Overhead of work assignment

  10. Parallelism – Python’s Multiprocessing Module

  11. Speedup and Efficiency

  12. Base Graph

  13. Parallelism Exploration Slider control in IPython figure

  14. Parallel Exploration Ø Serial fraction Ø Overhead

  15. Execution Time

  16. Speedup

  17. Efficiency

  18. Amdahl Law’s Evaluation

  19. Amdahl Law’s Evaluation

  20. Single Job Timeline

  21. Parallel Job Scheduling Timeline (8 cores)

  22. Worker Workload Summary

  23. Computer Architecture Education and Raspberry PI Ø http://www.raspberrypi.org Ø Center piece of course

  24. Raspberry PI Stats Ø $35 is inexpensive … must be a toy? Ø “It’s just a slightly under- powered computer without a screen, and anything you can do on it you could do on a laptop” Ø True, but also: Ø Students can’t destroy the systems with software. Ø It changes mindsets because the systems are easily accessible. Ø What about Arduino? Ø Similar aims, but Raspberry Pi runs Linux- full operating system, is a modern 32-bit ARM processor

  25. OpenCV Algorithm Evaluation on Raspberry Pi 25 Ø Evaluate selected set of various OpenCV functions Ø rotate, convolution, sobel, median blur, resize, histogram, erosion, etc Ø Benchmark various image file sizes: 720x480 1280x720 1920x1080 3840x2160

  26. Raspberry Pi- DFS (Dynamic Frequency Scaling)

  27. Code Box Ø Code compiled

  28. Code Box Ø Execution time observed

  29. Summary and Future Plans Ø New opportunities for exploring concepts related to computer architecture Ø Theoretical concepts – Amdahl’s law Ø Evaluation of Python multiprocessing module for parallelism Ø Code Box – Evaluation of performance of small code examples Ø Sharing content between developers [github] Ø Raspberry Pi support Ø Enhance development of projects and independent learning by having set functions for gathering performance results Ø Dynamic frequency scaling Ø OpenCV evaluation Ø Future work: Python-based Numba generates optimized machine code using the LLVM compiler infrastructure at import time, runtime, or statically (using the included pycc tool). Ø Numba supports compilation of Python to run on either CPU or GPU hardware.

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend