Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lab Project #4: PerfLab— Code Optimizations and Performance

Similar presentations


Presentation on theme: "Lab Project #4: PerfLab— Code Optimizations and Performance"— Presentation transcript:

1 Lab Project #4: PerfLab— Code Optimizations and Performance
Professor Hugh C. Lauer CS-2011, Machine Organization and Assembly Language (Slides include copyright materials from Computer Systems: A Programmer’s Perspective, by Bryant and O’Hallaron, and from The C Programming Language, by Kernighan and Ritchie) CS-2011, D-Term 2013 Lab Project #4: PerfLab

2 Objective and Approach
To gain a deeper understanding of how the performance of compiled code is affected by the way you handle the data … … by modifying two image processing routines I.e., rotate() and smooth() CS-2011, D-Term 2013 Lab Project #4: PerfLab

3 We will build and run your submission using driver
Obtaining Perflab See handout on course website Click on “Lab Projects,” log in with your WPI user name and password Click on perflab-handout.tar to download You will get a tar file containing source code and makefile to build this project:– kernels.c — the place where you will write your code driver — the primary target of the makefile. Use this to run your code and get performance measurements We will build and run your submission using driver Other stuff — necessary to build and run CS-2011, D-Term 2013 Lab Project #4: PerfLab

4 This Project Two functions to experiment with — rotate() and smooth()
For each one, you must:– Write or modify some C code to traverse two image arrays most efficiently Run them in the driver to get a performance measurement and a comparison against a baseline Challenge:– To achieve the greatest speedup CS-2011, D-Term 2013 Lab Project #4: PerfLab

5 Background and resources
Anything we have learned about IA32 Assembly Anything we have learned about caches and caching Stuff from Chapter 5 that we have not covered in class E.g., code motion, loop unrolling, blocking Substituting adds for multiplies, etc. Maximum gcc optimization levels Anything else you can find CS-2011, D-Term 2013 Lab Project #4: PerfLab

6 Working on Perflab Individually or two-person teams
Entirely in C source code However, you may use your knowledge of IA32 Assembly May be done on any Linux system Possibly also on Macintosh systems Unfortunately, not on Windows with Eclipse Submission:– A single file kernels.c Due date:–April 28, 2013, 11:59 PM CS-2011, D-Term 2013 Lab Project #4: PerfLab

7 Submit via Turnin Naming your file
<userID>-kernels.c for an individual <userID1>-<userID2>-kernels.c for a team Edit team_t team structure in kernels.c Insert names and addresses of team members Will be recognized by autograding system This is called Perflab in Turnin system CS-2011, D-Term 2013 Lab Project #4: PerfLab

8 Questions? CS-2011, D-Term 2013 Lab Project #4: PerfLab


Download ppt "Lab Project #4: PerfLab— Code Optimizations and Performance"

Similar presentations


Ads by Google