Download presentation
Presentation is loading. Please wait.
1
Joint Minimization of Code and Data for Synchronous Dataflow Programs Kaushik Ravindran EE 249 – Presentation
2
Objective Develop a methodology for chain-structured SDF graphs to minimize Code size Buffer memory Extend this into heuristic solutions for general acyclic SDF graphs
3
Quick Overview Dataflow networks Collection of functional actors connected over unbounded FIFO buffers Synchronous Dataflow (SDF) # of tokens produced per actor fixed Deadlock and boundedness are decidable ABC 20102010
4
Motivation Code size minimization Code replication each time an actor appears in schedule Amount of on-chip memory limited Single Appearance schedules – optimally compact inline representation of SDF Buffer memory optimization Choose schedule that minimizes buffer memory
5
Schedules and Loops Revisit Repetitions vector q G = (1, 2, 4) - Minimum number of actor firings q[source(e)] * produce(e) = q[sink(e)]*consume(e) Flat single appearance schedule (ω(1A)(2B)(4C)) (nS 1 S 2 …S k ) – ‘n’ successive firings of S 1 …S k ABC 20102010
6
Impact of schedule on buffer size Valid schedulesBuffer size 1.ABCBCCC50 2.A(2B(2C))40 3.A(2B)(4C)60 4.A(2BC)(2C)50 For a consistent SDF graph, there exists a fully reduced single appearance schedule occupying minimum possible buffer memory ABC 20102010
7
R-Schedules Recursively decompose chain-structured graph (G) into left (S L ) and right (S R ) subgraphs Set or R-schedules always contains a schedule that attains minimum buffer requirement Number of R-schedules = (1/n)(2n-2 C n-1) where n = number of actors in chain SDF
8
Dynamic Programming Algorithm Determine R-schedule that minimizes buffer memory requirement Minimum buffer memory requirement is cost of subgraphs and cost of split b[i,j] = min(b[i,k] + b[k+1,j] + c i,j [k]) for i <= k < j Running time O(n 3 )
9
Heuristic Solution Introduce split on edge where minimum amount of data is transferred Average run timeO(n * log (n)) Can apply heuristic to arbitrary acyclic SDF Partition SDF into smaller subgraphs Apply exact dynamic programming algorithm to minimum size subgraphs
10
Directed Acyclic SDF graphs Topological sort Ordering of vertices, such that source vertex of each edge occurs earlier than sink vertex Flat single appearance schedule corresponds to any valid topological sort Four possible topological sorts A B C D s t
11
Heuristic – Minimum legal cuts into Bounded Sets Extend heuristic for chain-structured graph Find cut with minimum amount of data transferred Kernighan and Lin approach Recursively partition left and right halves to obtain schedule bodies Run dynamic programming algorithm to optimize schedule
12
In retrospect Main objectives Minimize code size Through single appearance schedules Minimize buffer memory Through buffer optimal looped schedules Dynamic programming algorithm For well ordered SDF graphs Heuristic algorithms For general acyclic SDF graphs
13
Possible improvements – future work Consideration of a shared buffer approach Calculate minimum shared buffer size for looped schedules Trade-offs between code size Vs buffer size Consider a multiple appearance schedule that could optimize buffer usage Extend study to arbitrary SDF graphs
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.