Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Practical Dependence Test Gina Goff, Ken Kennedy, Chau-Wen Tseng PLDI ’91 presented by Chong Liang Ooi."— Presentation transcript:

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

2 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

3 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

4 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

5 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

6 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

7 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

8 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

9 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)

10 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

11 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

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

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

14 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:

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

16 The End Questions?


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

Similar presentations


Ads by Google