New Transformation Structures in AOG - PowerPoint PPT Presentation

1 / 22
About This Presentation
Title:

New Transformation Structures in AOG

Description:

AOG: Control implicit in operators and data. Derive custom, integrated control structure ... about parts at creation time. Optimization trajectories of parts ... – PowerPoint PPT presentation

Number of Views:24
Avg rating:3.0/5.0
Slides: 23
Provided by: softwareg
Category:

less

Transcript and Presenter's Notes

Title: New Transformation Structures in AOG


1
New Transformation Structures in AOG
  • Ted J. Biggerstaff

2
Overriding Problem Antagonistic Goals
  • High level operators and operands provide
    programming leverage variations
  • E.g., (image ? neighborhood) convolution
  • But fracture and de-localize code pieces
  • b((a ? s)2 (a ? s)2 )1/2
  • Needed optimizations code sharing, re-org.
    re-weaving
  • Conventional Optimization approaches induce large
    search spaces (EXPLOSION)

3
Constraint Propagation NP Complete
Reuse Library
Alternative Refinements of
Program
Refine to
4
Large Grain Data Operators Imply Control
b(a ? s)
5
Control Diffusion In Extended Expressions
(?p, q (a vp , wq sp , q))
(?p, q (a ip , jq sp , q))
b((a ? s)2 (a ? s)2 )1/2
(?i, j a i , j)
(?v,w a v , w)
(?d,e a d,e)
6
Control Localization
  • Explicit control considered harmful
  • AOG Control implicit in operators and data
  • Derive custom, integrated control structure
  • Coordinate set of constraints over expression
  • Explosion control
  • Specialized problem
  • Group rules by object phase
  • Use domain knowledge

7
Global Constraints Affect Code
  • SIMD (MMX), DB, UI, middleware, network
  • Shape of code determined by external constraints
  • Correctness preserving transformations
  • Re-shaping code (Architectural Shaping)

8
Non-Parallel Architectural Effects
9
Non-Parallel Pseudo-Code
If (Off Edge) then bi,j 0 else bi,j (
ai-1, j-1(-1) ai-1, j(-2)
ai-1, j1(-1) ai1, j-11 ai1,
j2 ai1, j11 )
10
b(a ? s)2 (a ? s)21/2
INT JM1, JP1, IM1, IP1
FOR (I0 I lt (M-1) I)
IM1I-1 IP1 I1
FOR (J0 J lt (N-1) J)
JM1 J-1 JP1 J1
IF(I0 J0 (I(M-1)) (J(N-1)))
THEN BI, J 0
ELSE
T1AIP1 , JP1 - AIP1 , JM1
(AI , JP1 2) - (AI , JM1 2)
AIM1 , JP1 - AIM1 , JM1
T2 AIP1 , JP1 (AIP1 , J 2)
AIP1 , JM1 - AIM1 , JP1 -
(AIM1 , J 2) - AIM1 , JM1
BI, J SQRT(T1T1 T2T2 )
11
Parallel Architectural Effects
12
Parallel Pseudo-Code
bi,j unpackadd(padd2(padd2(pmadd3((ai-1,j-1
), (s-1, -1)),
pmadd3((ai, j-1),
(s0, -1))), pmadd3((ai1,j-1),
(s 1, -1)))
13
Version for MMX Architecture
int s(-11), (-11)-1, 0, 1, -2, 0 , 2,
-1, 0, 1 int sp (-11), (-11)-1, -2,
-1, 0, 0, 0, -1, -2, -1 for (j0 j lt n
j) b0,j 0 for (i0 i lt m i) bi,0
0 for (j0 j lt n j) b(m-1),j 0 for
(i0 i lt m i) bi,(n-1) 0 for (i1 i lt
(m-1) i) for (j1 j lt (n-1) j)
t1 UNPACKADD(PADD2 (PADD2(PMADD3
((ai-1, j-1), (s-1, -1)) ,
PMADD3 ((ai, j-1), (s 0, -1))), PMADD3
((ai1,j-1), (s 1, -1))) t2
UNPACKADD(PADD2 (PADD2(PMADD3 ((ai-1,
j-1), (sp-1, -1)), PMADD3 ((ai,
j-1), (sp 0, -1))), PMADD3 ((ai1,
j-1), (sp 1, -1))))) bi,j
sqrt(t1t1 t2t2)
14
Architectural Shaping
  • Computational structure shaped per external
    constraints
  • SIMD (MMX), DB, UI, middleware, network
  • Much DK known about parts at creation time
  • Optimization trajectories of parts known at
    creation
  • Tags express domain opt. Knowledge
  • Tags triggered by events

15
Tags Record Properties
?r ? (p q) ?range ? range(s) ?
-11,-11 ?expr ? ai,j s3240p,q
16
Tags Record Properties
?r ? (p q) ?range ? range(s) ?
-11,-11 ?expr ? ai,j s3240p,q
17
But When to Trigger It??
?r ? (p q) ?range ? range(s) ?
-11,-11 ?expr ? ai,j s3240p,q
(_MMXLOOP p q)
18
Event-Driven Tags
  • What optimization to apply
  • Where to apply it
  • When to apply it

19
AOG Mechanisms
  • Control Localization
  • Pattern directed rules
  • Organize in 2D space (objects phases)
  • Architectural reshaping
  • Tag-Directed (TD) transformations
  • (What, where, when)
  • TD Transformations are procedures
  • Large grain, goal oriented, flexible strategies
  • Phases and events
  • Simplification by partial evaluation

20
Problem Context
21
The End
22
Explosion Control
  • DSL-gt DSL translation phases
  • DS optimizations
  • Specialized metaprograms (Control Localization)
  • Group rules by object phase
  • Use domain knowledge
Write a Comment
User Comments (0)
About PowerShow.com