1 / 12

Nonlinear and Symbolic Data Dependence Testing

Nonlinear and Symbolic Data Dependence Testing. William Blume, Rudolf Eigenmann. Presented by Chen-Yong Cher http://min.ecn.purdue.edu/~chenyong/rangetest.ppt. Background. 80s-90s Benerjee, Omega Can’t handle symbolic and non-linear expr Example:

rolf
Download Presentation

Nonlinear and Symbolic Data Dependence Testing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Nonlinear and Symbolic Data Dependence Testing William Blume, Rudolf Eigenmann Presented by Chen-Yong Cher http://min.ecn.purdue.edu/~chenyong/rangetest.ppt

  2. Background • 80s-90s Benerjee, Omega • Can’t handle symbolic and non-linear expr • Example: • i3, i2, c*i where c not a known constant • Often arise after compiler transformations • Range Test (1998) • Check if certain symbolic inequalities hold

  3. Range Test – high level view • Disproves Dependences • No dependence if from iteration i to i+1 • Range (i) not overlap Range(i+1) • No overlap if • max(range(i)) < min(range(i+1)) • Key: able to evaluate inqualities symbolically

  4. for i for j A[f(i,j)] = … = A[g(i,j)] Examples Case 1 : Disprove independence by Theorem 1 g(*,*) f(*,*) n 2n 0 Array subscript Case 2 : Disprove by Theorem 2 or Theorem 3 f(0,*) g(0,*) f(1,*) g(1,*) f(2,*) g(2,*) 2n 3n 4n 5n 6n 0 n Case 3 : Reduced to case 1 or 2 through permutation f(0,1) g(0,1) f(1,1) g(1,1) 2n 4n 0

  5. Theorem 1 If fjmax (i1, … ij) < gjmin (i1,…,ij) for all (i1,…,ij) € Rj, then there’s no dependence min max g(i1,…,ij) f(i1,…,ij) 0

  6. Theorem 2 If gjmin (i1,…,ij) is monotonically non-decreasing for ij and If fjmax (i1, … ij) < gjmin (i1,…,ij+stridej) for all (i1,…,ij) € Rj, and lowerj <= ij <= upperj – stridej then there’s no dependence Note: Need to apply for f->g and g->f

  7. Theorem 3 If gjmin (i1,…,ij) is monotonically non-increasing for ij and If fjmax (i1, … ij) < gjmin (i1,…,ij-stridej) for all (i1,…,ij) € Rj, and Lowerj + stridej <= ij <= upperj then there’s no dependence Note: Need to apply for f->g and g->f

  8. Permuting Loops for Testing • For Case 3, all 3 theorems fail • Permute loops to reduce to case 1 or 2 • Does not try all possible permutations • Tries to move loop inwards • Make range continuous

  9. Algorithm • Refer to paper

  10. Generalizing the Range Test • Multidimentional arrays • Negetive strides • Loop-variant variables • Not perfectly nested loops

  11. Symbolic Range Propagation • Collect and propagate symbolic ranges • 2 parts • Range propagation algorithm • Symbolic expression comparison facility • Example code segment If (a<100) THEN {BODY (know a < 100)} Else if (a < 200) THEN { know a < 200) } {merge point, know a < 100}

  12. Conclusions • Identify parallel loops effectively • Handle non-linear, symbolic expressions • The only dependence test in Polaris • Parallelize Perfect as well as hand-written • Acceptable execution time w/ memoization

More Related