Compiler Optimisation 2014 Course Project

Similar documents
Compiler Optimisation

Assignment Tutorial.

ENCM 501 Winter 2018 Assignment 2 for the Week of January 22 (with corrections)

ENCM 501 Winter 2016 Assignment 1 for the Week of January 25

L25: Modern Compiler Design Exercises

Assignment 1: Understanding Branch Prediction

Student Instructions SD# /16 Awards Program

Today. An Animated Introduction to Programming. Prerequisites. Computer programming

Your submitted proj3.c must compile and run on linprog as in the following example:

Understanding and Exploring Memory Hierarchies

CS / Cloud Computing. Recitation 11 November 5 th and Nov 8 th, 2013

How to Reserve a Practice Room on EMS.

C152 Laboratory Exercise 5

Assignment 1: Communicating with Programs

- b: size of block in bytes. - s: number of sets in the cache (or total number of sets between split caches). - n: associativity of cache.

Lecture 5. Defining Functions

Your submitted proj3.c must compile and run on linprog as in the following example:

Physics 2660: Fundamentals of Scientific Computing. Lecture 7 Instructor: Prof. Chris Neu

School of Informatics, University of Edinburgh

Assignment 2: Understanding Data Cache Prefetching

Computers and programming languages introduction

Design Project Computation Structures Fall 2018

Chapter 7:: Data Types. Mid-Term Test. Mid-Term Test (cont.) Administrative Notes

CS2 Practical 6 CS2Bh 24 January 2005

Due: March 8, 11:59pm. Project 1

Submitting Coursework via SurreyLearn

1.204 Computer Algorithms in Systems Engineering Spring 2010 Problem Set 4: Satellite data sets Due: 12 noon, Monday, March 29, 2010

Timesheet Submission in Academica TRIO Upward Bound Summer Program June 25, 2018 Room 1700

C152 Laboratory Exercise 5

COMP 3500 Introduction to Operating Systems Project 5 Virtual Memory Manager

Advanced Client-Side Web Programming CSCI 491/595 Syllabus Fall 2018

Department of Computer Science. COS 122 Operating Systems. Practical 3. Due: 22:00 PM

Pradip Bose Tom Conte IEEE Computer May 1998

Programming Assignment IV Due Thursday, June 1, 2017 at 11:59pm

Important Project Dates

CS 118 Project Phase 2 P2P Networking

Programming Standards: You must conform to good programming/documentation standards. Some specifics:

King s Learning Institute

The Assignment-2 Specification and Marking Criteria

Physics 2660: Fundamentals of Scientific Computing. Lecture 3 Instructor: Prof. Chris Neu

EECE.2160: ECE Application Programming Spring 2017

Part 1: Written Questions (60 marks):

Banking System Upgrade - Frequently Asked Questions (FAQs)

5COS005W Coursework 2 (Semester 2)

King Abdulaziz University Faculty of Computing and Information Technology Computer Science Department

Programming Assignment 5 (100 Points) START EARLY!

Spring CS Homework 2 p. 1. CS Homework 2. To practice with PL/SQL stored procedures and functions, and possibly exception handling.

COMPUTER SCIENCE TRIPOS, PART IA, 2019

CpSc 1111 Lab 9 2-D Arrays

CSE 504: Compiler Design

Programming Assignment IV Due Thursday, November 18th, 2010 at 11:59 PM

MTAT : Software Testing

DM811 - Heuristics for Combinatorial Optimization

Digital Circuits ECS 371

CprE 488 Embedded Systems Design. Exam 2 Review

Memory. Hakim Weatherspoon CS 3410, Spring 2013 Computer Science Cornell University

CSC209. Software Tools and Systems Programming.

Homework 1 Due Monday April 24, 2017, 11 PM

CSCI544, Fall 2016: Assignment 2

The University of Queensland School of Information Technology and Electrical Engineering Semester 2, 2005 CSSE1000 PROJECT

START STEP 1 PURPOSE. - Taxation year - Form type (T4/T4A/T5018/RL-1) - Business number and RP/RS extension - Number of slips per form type

C152 Laboratory Exercise 1

A4: HTML Validator/Basic DOM Operation

Technology Services: Work Requests Submissions

You must pass the final exam to pass the course.

FIT3056 Secure and trusted software systems. Unit Guide. Semester 2, 2010

General Instructions. You can use QtSpim simulator to work on these assignments.

CS 116. Lab Assignment # 1 1

Assignment 1: Random Number Generator

ITP489 In-Memory DBMS for Real Time Analytics

COMP 3331/9331: Computer Networks & Applications Programming Assignment 2 for Session 1, 2016

Conditionals & Control Flow

Programming Karel the Robot

Homework Assignment #3

ENCM 501 Winter 2017 Assignment 3 for the Week of January 30

CSE 374 Programming Concepts & Tools. Brandon Myers Winter 2015 Lecture 11 gdb and Debugging (Thanks to Hal Perkins)

CSCI 1301: Introduction to Computing and Programming Spring 2018 Project 3: Hangman 2.0 (A Word Guessing Game)

Welcome to today s Webcast. Thank you so much for joining us today!

Claims Management - Delay analysis Online Workshop. Week No. 1: concept of claims

Final Programming Project

a f b e c d Figure 1 Figure 2 Figure 3

Topics. Operating System. What is an Operating System? Let s Get Started! What is an Operating System? Where in the Book are we?

L41: Lab 1 - Getting Started with Kernel Tracing - I/O

CpSc 1111 Lab 4 Part a Flow Control, Branching, and Formatting

CSE 374 Programming Concepts & Tools

MSIS-DL 317 Syllabus. Faisal Akkawi, Ph.D. Introduction to Databases Fall 09

Advanced Programming Concepts. CIS 15 : Spring 2007

Benchmarks. Benchmark: Program used to evaluate performance. Uses. Guide computer design. Guide purchasing decisions. Marketing tool.

Physics 2660: Fundamentals of Scientific Computing. Lecture 5 Instructor: Prof. Chris Neu

Data Structure and Algorithm Homework #5 Due: 2:00pm, Thursday, May 31, 2012 TA === Homework submission instructions ===

CSC209H Lecture 1. Dan Zingaro. January 7, 2015

LLVM Summer School, Paris 2017

CSCI 4210 Operating Systems CSCI 6140 Computer Operating Systems Project 1 (document version 1.3) Process Simulation Framework

Programming Project 4: COOL Code Generation

Introduction. A more thorough explanation of the overall topic

How to Cloud for Earth Scientists: An Introduction

DATA STRUCTURES AND ALGORITHMS. Sorting algorithms (insertion sort, bubble sort, selection sort)

CSC209. Software Tools and Systems Programming.

Programming with CUDA

Global Optimization. Lecture Outline. Global flow analysis. Global constant propagation. Liveness analysis. Local Optimization. Global Optimization

Transcription:

Compiler Optimisation 2014 Course Project Michael O Boyle Chris Margiolas January 2014

Course Work Based on GCC compiler One piece of course work: 25 % of course mark Set today and due Thursday 4pm February 27th week 6 Feedback due Thursday March 13th week 8 Penalties for late submission. Plagiarism software used. Do your own work!

TheGoalof theproject Evaluate different compiler optimisation settings on a set of benchmarks. Analyse the performance of each benchmark under different settings. Write a report about your methodology and your findings.

Program Optimisation in GCC GCC supports some simple levels of optimisations: -O1, -O2, -O3 At each level, a set of optimisations are enabled (25 for O1, 25+29 for O2 and 19+28+6 for O3) At higher levels, more optimisations are enabled which results in potentially faster code, but also slows down the compilation process. Rather than using these pre-defined optimisation options, the users can enable individual options themselves, e.g. "-funroll-loops". For more information on optimisation options see http://gcc.gnu.org/onlinedocs/gcc/optimize-options.html

Methodology: Evaluating Compiler Flags Always use -O1: basic optimizations, likely to be beneficial Pick 10 optimizations from -O2 and all 6 from -O3; see http://gcc.gnu.org/onlinedocs/gcc/optimize-options.html Additionally consider loop unrolling (-funroll-loops) with max-unroll-times of 2, 4, 8, 16 or 32 2 16 + 2 16 5 = 393216 possible combinations Evaluate 200 randomly chosen configurations (i.e. combinations of optimizations) Use the same configurations for all benchmarks!

Running Experiments Avoid noise: Make sure noone else is logged on to the computer (using who) and no other applications are running (using top). Don t run on top of AFS use /disk/scratch or /tmp. BUT: move the results back to your home-directory and don t leave the data accessible to everyone Run benchmarks at least 10 times to get stable results. Determine how many measurements you need to get a stable value. Compute and report average runtime. Also report the variance and the number of iterations you used.

Running Experiments - Cont. Use scripting languages (such as Perl) to automate the process of evaluating optimisations on the benchmark programs. Example (pseudo code) for each b in benchmarks for each o in optimisations compile b with o run b N times and record runtimes calculate average runtime and variance end end

The Benchmarks We use 14 benchmarks from the SPEC CPU2006 and MediaBench II suites. CPU intensive benchmarks developed from real user applications. Download and extract the programs (use wget) from: https://docs.google.com/file/d/0b5gasmlwjhtoatdvafkzuznobdq/edit Let Chris or myself know if you need more disk space!

Directory Structure

Compiling and Running the Benchmarks Compiling a program with certain optimisations enabled and executing it a single time: cd 400.perlbench/src/ make CFLAGS="-funroll-loops --param max-unroll-times=4" cd.././run.sh

Report and Results Maximum 5 pages + 2 pages for results Explain what you have done. Precisely describe the experimental setup. Architecture and platform. Timing method. Number of runs per benchmark/configuration For every program report performance of: Baseline -O0, -O1, -O2, -O3 Best found flags for individual program. Best found single set of flags across all programs. Average across all flag settings (expected random performance). Results should be detailed: per-program, average, variance

Report and Results - contd. Store all raw data in a file. For each program: First line: program name Following lines: flag setting and all runtimes Runtimes in milliseconds, without decimal digits 400.perlbench "-O0" 837 833 890 850 813 828... "-O1" 602 620 610 611 650 580...... 401.bzip2 "-O0" 837 833 890 850 813 828... "-O1" 602 620 610 611 650 580...... e-mail file to: c.margiolas@ed.ac.uk WITH the subject: copt-results

Report Structure Abstract. (Summary of paper) and Introduction Evaluation methodology: Selection of flags, etc. Experimental setup: Platform. How time was measured. Number of runs. Results (for each program) Baseline -O0, -O1, -O2, -O3 Best found flags for individual program. Best found single set of flags across all programs. Average across all flag settings (expected random performance). Analysis and Discussion of Results. Followed by conclusion.

Submission. Awarding of Marks Submit to ITO written report by 4pm Thursday 27th February. Marks are awarded for clear explanation of experimental methodology and thorough analysis of results. Remember wish to see optimization setting that gives best results per program AND the setting that is best for all the benchmarks.

Final Remarks For further questions e-mail: c.margiolas@ed.ac.uk Start early!! It takes time to run the experiments! Deadline: Thursday 27/02/2014 4pm No lecture on Monday 20/1 - next lecture on Thursday 23/1