Presentation is loading. Please wait.

Presentation is loading. Please wait.

March 4, 2008http://csg.csail.mit.edu/arvindDF3-1 Dynamic Dataflow Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology.

Similar presentations


Presentation on theme: "March 4, 2008http://csg.csail.mit.edu/arvindDF3-1 Dynamic Dataflow Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology."— Presentation transcript:

1 March 4, 2008http://csg.csail.mit.edu/arvindDF3-1 Dynamic Dataflow Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology

2 March 4, 2008 DF3-2http://csg.csail.mit.edu/arvind/ Static Dataflow: Problems/Limitations Mismatch between the model and the implementation The model requires unbounded FIFO token queues per arc but the architecture provides storage for one token per arc The architecture does not ensure FIFO order in the reuse of an operand slot The merge operator has a unique firing rule The static model does not support Function calls Data Structures - No easy solution in the static framework - Dynamic dataflow provided a framework for solutions

3 March 4, 2008 DF3-3http://csg.csail.mit.edu/arvind/ Dynamic Dataflow Architectures Allocate instruction templates, i.e., a frame, dynamically to support each loop iteration and procedure call termination detection needed to deallocate frames The code can be shared if we separate the code and the operand storage frame pointer instruction pointer a token

4 March 4, 2008 DF3-4http://csg.csail.mit.edu/arvind/ A Frame in Dynamic Dataflow Program 1 2 3 4 5 + * - + 3 1 2 4 5 3L, 4L 3R, 4R 5L 5R out * a b +*7 -+ * y x 12 3 4 5 Need to provide storage for only one operand/operator 1 2 4 5 7 3 Frame

5 March 4, 2008 DF3-5http://csg.csail.mit.edu/arvind/ Data Structures in Dataflow.. P P Memory Data structures reside in a structure store  tokens carry pointers I-structures: Write-once, Read multiple times or allocate, write, read,..., read, deallocate  No problem if a reader arrives before the writer at the memory location I-fetch a I-store a v

6 March 4, 2008 DF3-6http://csg.csail.mit.edu/arvind/ I-Structure Storage: Split-phase operations & Presence bits I-Fetch t s 1 2 3 4 a a a a v2v2 fp.ip I-structure Memory Need to deal with multiple deferred reads other operations: fetch/store, take/put, clear  v1v1 address to be read t I-Fetch s split phase forwarding address

7 March 4, 2008 DF3-7http://csg.csail.mit.edu/arvind/ Dynamic Dataflow Graphs

8 March 4, 2008 DF3-8http://csg.csail.mit.edu/arvind/ Firing Rules Input tokens must have identical tags + L R s:s: t1: LR t2: + S: t2:t1: p1 p2 p1 p2 context (fp) inst no (ip) port

9 March 4, 2008 DF3-9http://csg.csail.mit.edu/arvind/ Well Behaved Graphs c s 1 c s n c t 1 c t m 1. One-in-one-out property. 2. Self Cleaning: Initially the graph contains no tokens; when all the output tokens have been produced no tokens remain in the graph.

10 March 4, 2008 DF3-10http://csg.csail.mit.edu/arvind/ Consequences of Tagging No need of merge in well behaved dataflow graphs. Even if f(x1) completes after g(x2) the output tokens will carry the "correct" tag. X F T x2 x1 T F f g

11 March 4, 2008 DF3-11http://csg.csail.mit.edu/arvind/ Making Graphs Well Behaved Sometimes extra inputs and outputs have to be provided to make graphs well behaved. constants 3 3 trigger input.

12 March 4, 2008 DF3-12http://csg.csail.mit.edu/arvind/ Making Conditionals Well Behaved All unconnected outputs of switches are collected to generate a signal. XY b p f T F X signal X S

13 March 4, 2008 DF3-13http://csg.csail.mit.edu/arvind/ I-Structure Operations I-store v s t p s t p I-structure Storage signal   I-store: 1 x 2 x p address value signal I-store won't be well behaved without a signal output

14 March 4, 2008 DF3-14http://csg.csail.mit.edu/arvind/ Well Behaved Blocks All the signals in a block or a procedure are collected via a tree of synchronizing gates to generate a single signal. signal S S S signal inputs

15 March 4, 2008 DF3-15http://csg.csail.mit.edu/arvind/ Procedure Linkage Operators f get frame extract tag change Tag 0 Graph for f change Tag 1 a1 1: change Tag n an n:... change Tag 1 Fork token in frame 0 token in frame 1 Like standard call/return but caller & callee can be active simultaneously

16 March 4, 2008 DF3-16http://csg.csail.mit.edu/arvind/ Unbounded Loop Schema loop body X X change tag release context change tag T F p parent context get context X

17 March 4, 2008 DF3-17http://csg.csail.mit.edu/arvind/ Reusing Contexts Can we tie the allocation of context in iteration i with the release of context in iteration i-k? Start with k contexts, c0, c1,... ck-1 Bound the loop so that no more than k iterations can execute concurrently. At the end of iteration i, use the context from iteration (i+1) mod k. Release the contexts when the loop terminates..... c k-1 c0c0 c1c1

18 March 4, 2008 DF3-18http://csg.csail.mit.edu/arvind/ Bounded Loops The parent allocates k frames and stores the linking information and the loop constants. The name of the previous frame and the parent frame is stored in all frames but the next frame slot of the last frame is left empty. When an iteration begins it empties the next slot and when it completes it fills the next slot of the previous frame.... next previous parent loop constants 0 1 k-1

19 March 4, 2008 DF3-19http://csg.csail.mit.edu/arvind/ Unbounded Loop Schema loop body X X change tag release context change tag T F p parent context get context X Bounded get “next” extract “context” put “previous”

20 March 4, 2008 DF3-20http://csg.csail.mit.edu/arvind/ Next: Id/pH to Dataflow Graphs


Download ppt "March 4, 2008http://csg.csail.mit.edu/arvindDF3-1 Dynamic Dataflow Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology."

Similar presentations


Ads by Google