Practical Dependence Test Gina Goff, Ken Kennedy, Chau-Wen Tseng PLDI ’91 presented by Chong Liang Ooi.

Slides:



Advertisements
Similar presentations
Etter/Ingber Arrays and Matrices. Etter/Ingber One-Dimensional Arrays 4 An array is an indexed data structure 4 All variables stored in an array are of.
Advertisements

Optimizing Compilers for Modern Architectures Copyright, 1996 © Dale Carnegie & Associates, Inc. Dependence Testing Allen and Kennedy, Chapter 3 thru Section.
5.1 Real Vector Spaces.
Optimizing Compilers for Modern Architectures Syllabus Allen and Kennedy, Preface Optimizing Compilers for Modern Architectures.
Lecture 24 MAS 714 Hartmut Klauck
© 2003, Yishai Feldman Proving Sufficient Completeness Example: Set ADT.
Rigorous Software Development CSCI-GA Instructor: Thomas Wies Spring 2012 Lecture 11.
FTP Biostatistics II Model parameter estimations: Confronting models with measurements.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 7- 1 Overview 7.1 Introduction to Arrays 7.2 Arrays in Functions 7.3.
Enforcing Sequential Consistency in SPMD Programs with Arrays Wei Chen Arvind Krishnamurthy Katherine Yelick.
Dependence Analysis Kathy Yelick Bebop group meeting, 8/3/01.
Chapter 1 Computing Tools Data Representation, Accuracy and Precision Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction.
Parallel and Cluster Computing 1. 2 Optimising Compilers u The main specific optimization is loop vectorization u The compilers –Try to recognize such.
Stanford University CS243 Winter 2006 Wei Li 1 Loop Transformations and Locality.
CMPUT680 - Fall 2006 Topic A: Data Dependence in Loops José Nelson Amaral
Discrete Mathematics Lecture 4 Harper Langston New York University.
Graph COMP171 Fall Graph / Slide 2 Graphs * Extremely useful tool in modeling problems * Consist of: n Vertices n Edges D E A C F B Vertex Edge.
Stanford University CS243 Winter 2006 Wei Li 1 Data Dependences and Parallelization.
CSE 830: Design and Theory of Algorithms
Dependence Testing Optimizing Compilers for Modern Architectures, Chapter 3 Allen and Kennedy Presented by Rachel Tzoref and Rotem Oshman.
Data Dependences CS 524 – High-Performance Computing.
Arrays. Objectives Learn about arrays Explore how to declare and manipulate data into arrays Learn about “array index out of bounds” Become familiar with.
History-Dependent Petri Nets Kees van Hee, Alexander Serebrenik, Natalia Sidorova, Wil van der Aalst ?
1 Efficient Discovery of Conserved Patterns Using a Pattern Graph Inge Jonassen Pattern Discovery Arwa Zabian 13/07/2015.
Optimizing Compilers for Modern Architectures Dependence: Theory and Practice Allen and Kennedy, Chapter 2 pp
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Design and Analysis of Algorithms - Chapter 11 Algorithm An algorithm is a.
CS0007: Introduction to Computer Programming Introduction to Arrays.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 7 Mälardalen University 2010.
ECON 1150 Matrix Operations Special Matrices
Domain testing Tor Stålhane. Domain testing revisited We have earlier looked at domain testing as a simple strategy for selecting test cases. We will.
Aug 15-18, Montreal, Canada1 Recurrence Chain Partitioning of Non-Uniform Dependences Yijun Yu Erik H. D ’ Hollander.
DISCRETE MATHEMATICS I CHAPTER 11 Dr. Adam Anthony Spring 2011 Some material adapted from lecture notes provided by Dr. Chungsim Han and Dr. Sam Lomonaco.
Array Dependence Analysis COMP 621 Special Topics By Nurudeen Lameed
Arrays and 2D Arrays.  A Variable Array stores a set of variables that each have the same name and are all of the same type.  Member/Element – variable.
EGR 2261 Unit 8 One-dimensional Arrays  Read Malik, pages in Chapter 8.  Homework #8 and Lab #8 due next week.  Quiz next week.
Approximate XML Joins Huang-Chun Yu Li Xu. Introduction XML is widely used to integrate data from different sources. Perform join operation for XML documents:
Experiences with Enumeration of Integer Projections of Parametric Polytopes Sven Verdoolaege, Kristof Beyls, Maurice Bruynooghe, Francky Catthoor Compiler.
Carnegie Mellon Lecture 14 Loop Optimization and Array Analysis I. Motivation II. Data dependence analysis Chapter , 11.6 Dror E. MaydanCS243:
1 Theory and Practice of Dependence Testing Data and control dependences Scalar data dependences  True-, anti-, and output-dependences Loop dependences.
Chapter 3 Part II Describing Syntax and Semantics.
1 Partitioning Loops with Variable Dependence Distances Yijun Yu and Erik D’Hollander Department of Electronics and Information Systems University of Ghent,
Structuring Data: Arrays ANSI-C. Representing multiple homogenous data Problem: Input: Desired output:
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 23 Algorithm Efficiency.
UniMAP Sem2-10/11 DKT121: Fundamental of Computer Programming1 Arrays.
CR18: Advanced Compilers L02: Dependence Analysis Tomofumi Yuki 1.
1 JOB SEQUENCING WITH DEADLINES The problem is stated as below. There are n jobs to be processed on a machine. Each job i has a deadline d i ≥ 0 and profit.
1. Searching The basic characteristics of any searching algorithm is that searching should be efficient, it should have less number of computations involved.
CS357 Lecture 13: Symbolic model checking without BDDs Alex Aiken David Dill 1.
Application: Algorithms Lecture 19 Section 3.8 Tue, Feb 20, 2007.
Arrays Declaring arrays Passing arrays to functions Searching arrays with linear search Sorting arrays with insertion sort Multidimensional arrays Programming.
Prof. Amr Goneid, AUC1 Analysis & Design of Algorithms (CSCE 321) Prof. Amr Goneid Department of Computer Science, AUC Part 3. Time Complexity Calculations.
Chapter 15 Running Time Analysis. Topics Orders of Magnitude and Big-Oh Notation Running Time Analysis of Algorithms –Counting Statements –Evaluating.
Dependence Analysis and Loops CS 3220 Spring 2016.
KUKUM-06/07 EKT120: Computer Programming 1 Week 6 Arrays-Part 1.
Theory of Computational Complexity Yusuke FURUKAWA Iwama Ito lab M1.
Applied Discrete Mathematics Week 2: Functions and Sequences
Chapter 4 C Program Control Part I
CS314 – Section 5 Recitation 13
Data Dependence, Parallelization, and Locality Enhancement (courtesy of Tarek Abdelrahman, University of Toronto)
Pole Placement and Decoupling by State Feedback
Enough Mathematical Appetizers!
Parallelization, Compilation and Platforms 5LIM0
Chapter 4 - Program Control
7.2 Area Between Two Curves
Applied Discrete Mathematics Week 6: Computation
Support Vector Machines
Collision Detection.
Ack: Several slides from Prof. Jim Anderson’s COMP 202 notes.
Application: Algorithms
Introduction to Computer Science
Presentation transcript:

Practical Dependence Test Gina Goff, Ken Kennedy, Chau-Wen Tseng PLDI ’91 presented by Chong Liang Ooi

Contribution Efficient and precise dependence test is essential General tests (Banerjee and GCD) are unnecessary Most array refs in scientific Fortran program are simple Based on these simple cases, this paper proposed Partition-Based Algorithm

Classification of Subscripts 1.Complexity No of unique array indices a subscript has i. ZIV– Zero Index Variable ii. SIV – Single Index Variable iii. MIV – Multiple Index Variable DO 10 i DO 10 j DO 10 k 10A(5, i+1, j) = A(N, i, k) + c

Classification of Subscripts 2. Separability Separable if indices do not occur in other subscript Otherwise, coupled A(i, j, j) = A(i, j, k) + c

Partition-Based Algorithm Partition subscripts separable & minimal coupled group Label each subscript as ZIV, SIV or MIV Apply Single Subscript Test based on complexity Apply Multiple Subscript Test to coupled group If any test yields independence, no dependence exist Otherwise, merge all direction vectors into single set

Single Subscript Test – ZIV ZIV takes 2 loop invariant expressions Proves 2 expressions cannot be equal Can be extended for symbolic expressions If differences is non-zero constant  independence

SS Test – Strong SIV Ref pair of form: for a Є [1,10] Dependence Distance, d = i’-i = (c 1 -c 2 )/a Dependence exist, if |d| <= U - L Dependence Direction = 0 = if d = 0 > if d < 0 Exact & efficient Extendable to Symbolic Expr by eval d symbolically

SS Test – Weak-Zero SIV Ref pair of form: for a 1 != a 2 a 1 i+c 1 =a 2 i’+c 2 is a line in 2D space of i vs i’ Check whether line intersect with any integer points Weak-zero SIV For a 1 =0 or a 2 =0 Let a 2 =0  i=(c 2 -c 1 )/a 1 Check i Є I and |i| < U - L

SS Test – Weak-Zero SIV Usually, i=0 or last iteration Loop peeling transformation can help DO 10 i=1, N 10 Y(i, N)=Y(1,N)+Y(N,N) Y(1,N)=Y(1,N)+Y(N,N) DO 10 i=2, N-1 10 Y(i, N)=Y(1,N)+Y(N,N) Y(N,N)=Y(1,N)+Y(N,N)

SS Test – Weak-Crossing SIV Weak-Crossing SIV For a 2 = -a 1 Let i=i’  i=(c 2 -c 1 )/2a 1 Check |i| < U – L and i Є I or 1/2 Typically in Choleskey decomposition

SS Test – Weak-Crossing SIV Loop splitting transformation can help DO 10 i=1, N 10 A(i)=A(N-i+1)+C DO 10 i=1, (N+1)/2 10 A(i)=A(N-i+1)+C DO 20 i=(N+1)/2+1, N 20 A(i)=A(N-i+1)+C

SS Test – Restricted Double Index Var Ref pair of form: SIV Tests can be used with 2 loop bounds for i & j

Coupled Subscripts – Delta Test Subscript-by-subscript test may yield false dep. Delta Test Algorithm

Delta Test Constraints Assertions on indices derived from subscripts  a 1 i - a 2 i’= c 2 - c 1 Constraint vector, C=(del 1, del 2, …) one constraint for each index in the coupled group Del can be dependence line: dependence distance: dependence point:

Intersecting Delta Test Constraints If the intersect of all constraints is empty set  no dependence

The End Questions?