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

pycomparch python based modules for exploring computer
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

PyCompArch: Python-Based Modules for Exploring Computer Architecture Concepts

Dan Connors, Kyle Dunn, Ryan Bueter Department of Electrical Engineering University of Colorado Denver Workshop on Computer Architecture Education 2015

slide-2
SLIDE 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

slide-3
SLIDE 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

slide-4
SLIDE 4

IPython Notebook Overview

Ø The IPython Notebook is a 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

At Scale Learning – MOOC

slide-5
SLIDE 5

Example: Jupyter (www.jupyter.org)

5

slide-6
SLIDE 6

PyCompArch

Matplotlib Visualization

Raspberry Pi Explore

Collect Results

DVFS

Concepts Explore

Code Box

Parallel Amdahl’s Law

Parameters

slide-7
SLIDE 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.

slide-8
SLIDE 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

slide-9
SLIDE 9

Mandelbrot Calculation : Block Size

Ø Overhead of work assignment

slide-10
SLIDE 10

Parallelism – Python’s Multiprocessing Module

slide-11
SLIDE 11

Speedup and Efficiency

slide-12
SLIDE 12

Base Graph

slide-13
SLIDE 13

Parallelism Exploration

Slider control in IPython figure

slide-14
SLIDE 14

Parallel Exploration

Ø Serial fraction Ø Overhead

slide-15
SLIDE 15

Execution Time

slide-16
SLIDE 16

Speedup

slide-17
SLIDE 17

Efficiency

slide-18
SLIDE 18

Amdahl Law’s Evaluation

slide-19
SLIDE 19

Amdahl Law’s Evaluation

slide-20
SLIDE 20

Single Job Timeline

slide-21
SLIDE 21

Parallel Job Scheduling Timeline (8 cores)

slide-22
SLIDE 22

Worker Workload Summary

slide-23
SLIDE 23

Computer Architecture Education and Raspberry PI

Ø http://www.raspberrypi.org Ø Center piece of course

slide-24
SLIDE 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

slide-25
SLIDE 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

slide-26
SLIDE 26

Raspberry Pi- DFS (Dynamic Frequency Scaling)

slide-27
SLIDE 27

Code Box

Ø Code compiled

slide-28
SLIDE 28

Code Box

Ø Execution time

  • bserved
slide-29
SLIDE 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.