Today Using Fourier-Motzkin elimination for code generation Using Fourier-Motzkin elimination for determining schedule constraints

Similar documents
Loop Transformations, Dependences, and Parallelization

LLVM passes and Intro to Loop Transformation Frameworks

Polyhedral Compilation Foundations

Loop Permutation. Loop Transformations for Parallelism & Locality. Legality of Loop Interchange. Loop Interchange (cont)

Loop Transformations for Parallelism & Locality. Review. Scalar Expansion. Scalar Expansion: Motivation

Vectorization in the Polyhedral Model

Parallelism for Nested Loops with Non-uniform and Flow Dependences

ADJUSTING A PROGRAM TRANSFORMATION FOR LEGALITY

Efficient Code Generation for Automatic Parallelization and Optimization

GSLM Operations Research II Fall 13/14

Solving two-person zero-sum game by Matlab

Support Vector Machines. CS534 - Machine Learning

Intra-Parametric Analysis of a Fuzzy MOLP

Smoothing Spline ANOVA for variable screening

The Greedy Method. Outline and Reading. Change Money Problem. Greedy Algorithms. Applications of the Greedy Strategy. The Greedy Method Technique

Programming in Fortran 90 : 2017/2018

Lobachevsky State University of Nizhni Novgorod. Polyhedron. Quick Start Guide

6.854 Advanced Algorithms Petar Maymounkov Problem Set 11 (November 23, 2005) With: Benjamin Rossman, Oren Weimann, and Pouya Kheradpour

Estimation of Parallel Complexity with Rewriting Techniques

An Application of the Dulmage-Mendelsohn Decomposition to Sparse Null Space Bases of Full Row Rank Matrices

Optimization Methods: Integer Programming Integer Linear Programming 1. Module 7 Lecture Notes 1. Integer Linear Programming

Improving Low Density Parity Check Codes Over the Erasure Channel. The Nelder Mead Downhill Simplex Method. Scott Stransky

Harvard University CS 101 Fall 2005, Shimon Schocken. Assembler. Elements of Computing Systems 1 Assembler (Ch. 6)

11. APPROXIMATION ALGORITHMS

U.C. Berkeley CS294: Beyond Worst-Case Analysis Handout 5 Luca Trevisan September 7, 2017

Computer Animation and Visualisation. Lecture 4. Rigging / Skinning

REDUCING hardware design time is more than ever a

Algorithmic Transformation Techniques for Efficient Exploration of Alternative Application Instances

Outline. Midterm Review. Declaring Variables. Main Variable Data Types. Symbolic Constants. Arithmetic Operators. Midterm Review March 24, 2014

Agenda & Reading. Simple If. Decision-Making Statements. COMPSCI 280 S1C Applications Programming. Programming Fundamentals

Today s Outline. Sorting: The Big Picture. Why Sort? Selection Sort: Idea. Insertion Sort: Idea. Sorting Chapter 7 in Weiss.

Cost-efficient deployment of distributed software services

Kent State University CS 4/ Design and Analysis of Algorithms. Dept. of Math & Computer Science LECT-16. Dynamic Programming

An Optimal Algorithm for Prufer Codes *

Esc101 Lecture 1 st April, 2008 Generating Permutation

Learning the Kernel Parameters in Kernel Minimum Distance Classifier

SENSITIVITY ANALYSIS IN LINEAR PROGRAMMING USING A CALCULATOR

Machine Learning 9. week

Exercises (Part 4) Introduction to R UCLA/CCPR. John Fox, February 2005

Support Vector Machines

CHAPTER 2 PROPOSED IMPROVED PARTICLE SWARM OPTIMIZATION

Message-Passing Algorithms for Quadratic Programming Formulations of MAP Estimation

Parallel Numerics. 1 Preconditioning & Iterative Solvers (From 2016)

Wavefront Reconstructor

For instance, ; the five basic number-sets are increasingly more n A B & B A A = B (1)

Machine Learning: Algorithms and Applications

Assembler. Shimon Schocken. Spring Elements of Computing Systems 1 Assembler (Ch. 6) Compiler. abstract interface.

Line Clipping by Convex and Nonconvex Polyhedra in E 3

Cluster Analysis of Electrical Behavior

A Fast Content-Based Multimedia Retrieval Technique Using Compressed Data

A New Approach For the Ranking of Fuzzy Sets With Different Heights

Modeling and Solving Nontraditional Optimization Problems Session 2a: Conic Constraints

NUMERICAL SOLVING OPTIMAL CONTROL PROBLEMS BY THE METHOD OF VARIATIONS

Collaboratively Regularized Nearest Points for Set Based Recognition

Complex Numbers. Now we also saw that if a and b were both positive then ab = a b. For a second let s forget that restriction and do the following.

Efficient Load-Balanced IP Routing Scheme Based on Shortest Paths in Hose Model. Eiji Oki May 28, 2009 The University of Electro-Communications

Lecture 15: Memory Hierarchy Optimizations. I. Caches: A Quick Review II. Iteration Space & Loop Transformations III.

Lecture 4: Principal components

Machine Learning. Support Vector Machines. (contains material adapted from talks by Constantin F. Aliferis & Ioannis Tsamardinos, and Martin Law)

International Journal of Mathematical Archive-3(11), 2012, Available online through ISSN

Face Recognition University at Buffalo CSE666 Lecture Slides Resources:

Compiler Design. Spring Register Allocation. Sample Exercises and Solutions. Prof. Pedro C. Diniz

Motivations. TCAS Software Verification using Constraint Programming. Agenda. Traffic alert and Collision Avoidance System

A SYSTOLIC APPROACH TO LOOP PARTITIONING AND MAPPING INTO FIXED SIZE DISTRIBUTED MEMORY ARCHITECTURES

The relation between diamond tiling and hexagonal tiling

Outline. Discriminative classifiers for image recognition. Where in the World? A nearest neighbor recognition example 4/14/2011. CS 376 Lecture 22 1

Sorting. Sorted Original. index. index

Collision Detection. Overview. Efficient Collision Detection. Collision Detection with Rays: Example. C = nm + (n choose 2)

Assignment # 2. Farrukh Jabeen Algorithms 510 Assignment #2 Due Date: June 15, 2009.

such that is accepted of states in , where Finite Automata Lecture 2-1: Regular Languages be an FA. A string is the transition function,

UNIT 2 : INEQUALITIES AND CONVEX SETS

Improving High Level Synthesis Optimization Opportunity Through Polyhedral Transformations

Electrical analysis of light-weight, triangular weave reflector antennas

Proposed Simplex Method For Fuzzy Linear Programming With Fuzziness at the Right Hand Side

5 The Primal-Dual Method

Computer Vision. Exercise Session 1. Institute of Visual Computing

Resolving Ambiguity in Depth Extraction for Motion Capture using Genetic Algorithm

Ecient Computation of the Most Probable Motion from Fuzzy. Moshe Ben-Ezra Shmuel Peleg Michael Werman. The Hebrew University of Jerusalem

Computing the Minimum Directed Distances Between Convex Polyhedra

Support Vector Machines

Parallel Solutions of Indexed Recurrence Equations

3D vector computer graphics

Motivation. EE 457 Unit 4. Throughput vs. Latency. Performance Depends on View Point?! Computer System Performance. An individual user wants to:

Analysis of Continuous Beams in General

R s s f. m y s. SPH3UW Unit 7.3 Spherical Concave Mirrors Page 1 of 12. Notes

Communication-Minimal Partitioning and Data Alignment for Af"ne Nested Loops

The Codesign Challenge

A Variable Elimination Approach for Optimal Scheduling with Linear Preferences

Investigation of Transformations and Landscapes for Combinatorial Optimization Problems

A Novel Approach for an Early Test Case Generation using Genetic Algorithm and Dominance Concept based on Use cases

LOOP ANALYSIS. The second systematic technique to determine all currents and voltages in a circuit

Course Introduction. Algorithm 8/31/2017. COSC 320 Advanced Data Structures and Algorithms. COSC 320 Advanced Data Structures and Algorithms

Hierarchical clustering for gene expression data analysis

Assembler. Building a Modern Computer From First Principles.

Pose, Posture, Formation and Contortion in Kinematic Systems

Evaluation of Two Lagrangian Dual Optimization Algorithms for Large-Scale Unit Commitment Problems

Introduction to linear programming

On Some Entertaining Applications of the Concept of Set in Computer Science Course

Genetic Tuning of Fuzzy Logic Controller for a Flexible-Link Manipulator

Overview. Basic Setup [9] Motivation and Tasks. Modularization 2008/2/20 IMPROVED COVERAGE CONTROL USING ONLY LOCAL INFORMATION

Transcription:

Fourer Motzkn Elmnaton Logstcs HW10 due Frday Aprl 27 th Today Usng Fourer-Motzkn elmnaton for code generaton Usng Fourer-Motzkn elmnaton for determnng schedule constrants Unversty Fourer-Motzkn Elmnaton 1 Why Transformaton Frameworks? Currently Frameworks used n compler to abstract loops, memory accesses, and data dependences n loop specfy the effect of a sequence of loop transformatons on the loop, ts memory accesses, and ts data dependences generate code from the transformed loop Loop transformatons affect the schedule of the loop Future How can framework technology be exposed n the programmng model? Frameworks Unmodular Polyhedral Presburger Sparse Polyhedral Unversty Fourer-Motzkn Elmnaton 2

Algorthms needed for automaton Operatons on sets and relatons Unon teraton space sets Unon relatons that represent dependences Apply a relaton to a set to model transformng a loop and to check transformaton legalty Compose two relatons to model composng transformatons Schedulng Determne an effcent and legal schedule Determne whch loops should be parallel Storage Mappng If not usng UOV, then need to do ths n coordnaton wth the schedulng Code Generaton Gven a schedule and whch loops to parallelze and/or tle, generate effcent code Code generaton for parameterzed tles Unversty Fourer-Motzkn Elmnaton 3 Code Generaton Goals express outermost loop bounds n terms of symbolc constants and constants express nner loop bounds n terms of any enclosng loop varables, symbolc constants, and constants Approach Proect out nner loop teraton varables to determne loop bounds for outer loops Fourer Motzkn elmnaton s the algorthm that proects a varable out of a polyhedron CS553 Lecture 4

Fourer-Motzkn Elmnaton: The Idea Polyhedron convex ntersecton of a set of nequaltes model for teraton spaces <=5 1 >= Problem gven a polyhedron how do we generate loop bounds that scan all of ts ponts? example: two possble loop orders (, ) (, ) <= CS553 Lecture 5 Fourer-Motzkn Elmnaton: The Algorthm FM( P, _k ) => P Input: Output: Algorthm: for each lower bound of for each upper bound of CS553 Lecture 6

Dstngushng Upper and Lower Bounds Smple Algorthm gven that the polyhedron s represented as follows: any constrant wth a postve coeffcent for _k s a lower bound any constrant wth a negatve coeffcent for _k s an upper bound <=5 <= CS553 Lecture 7 1 >= Trangular Iteraton Space Example (, ) for target teraton space <=5 <= (, ) for target teraton space 1 >= CS553 Lecture 8

General Algorthm for Generatng Loop Bounds Input: where the vector s the desred loop order Output: Algorthm: for k = d to 1 by -1 CS553 Lecture 9 Loop Skewng and Permutaton Orgnal code do = 1,6 do = 1,5 A(,) = A(-1,+1)+1 Dstance vector: (1, -1) Skewng followed by Permutaton: CS553 Lecture 10

Transformng the Dependences and Array Accesses Orgnal code do = 1,6 do = 1,5 A(,) = A(-1,+1)+1 Dependence vector: New Array Accesses: CS553 Lecture 11 Transformng the Loop Bounds Orgnal code do = 1,6 do = 1,5 A(,) = A(-1,+1)+1 Bounds: Transformed code (use general loop bound alg) do = 2,11 do = max( -5,1), mn(6, -1) A(, - ) = A( -1, - +1)+1 CS553 Lecture 12

Fourer Motzkn for Schedulng Recall We need to proect out the lambdas Now we know how to do that automatcally CS553 Lecture 13 Usng the Farkas lemma Assume the followng dependence polyhedron Assume a schedule functon of the form We need Unversty Fourer-Motzkn Elmnaton 14

The process of determnng set of legal schedules (1) Change all of the equalty constrants n to nequalty constrants. (2) Use the Farkas lemma to create a set of constrants for the schedule. θ S () θ R () 1=λ 0 + λ T (A λ 0 0 and λ 0 θ R () =v T + b θ S () = w T + c (3) Solve for v, w, b, and c vector constrants by proectng out lambdas. p 1 ) Unversty Fourer-Motzkn Elmnaton 15 Example of usng the Farkas lemma Orgnal code do = 1,6 do = 1,5 A(,) = A(-1,+1)+1 (1) Dependence polyhedron (2) Farkas lemma to set up constrants (3) Proect out lambdas to determne set of legal schedules Unversty Fourer-Motzkn Elmnaton 16

Next Tme Lecture Code generaton for parameterzed tlng Schedule HW10 due Frday Aprl 27 th Unversty Fourer-Motzkn Elmnaton 17