




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Streamlt Language, Importance, Common Machine Languages , Streaming Model of Computation , Streamlt Language, Representing Streams Strcutured, Streams Pipeline example, Band Pass Filter, Splitjoin, Example , Equalizer ,Bit-Reversed Ordering,
Typology: Slides
1 / 103
This page cannot be seen from the preview
Don't miss anything!





























































































Languages Have Not Kept Up
Modern architecture
C
von-Neumann
machine
●
Two choices:
^
Develop cool architecture with
li^
t d
d h
l
●
Two choices:
^
Develop cool architecture with
li^
t d
d h
l
●
Two choices:
complicated, ad-hoc language ^
complicated, ad-hoc languageBend over backwards to supportold languages like C/C++
old languages like C/C++
Why a New Language?
Pi^
hi
512
Pi^
hi
Uniprocessors:C is the common
IntelTflops CiscoCSR- PicochipPC
512256128
AmbricAM2045IntelTflops CiscoCSR- PicochipPC
AmbricAM
machine language
Raw
Tflops^ CaviumO t RazaXLR
64 32
Raw
Tflops^ CaviumO t RazaXLR
Raw
Niagara
Octeon Cell XLR
#^
of cores
16 8 4
Opteron 4P
Raw
Niagara
Octeon Cell XLR
Opteron 4P
Broadcom 1480
Pentium
ItaniumP
Power
Opteron
Power Yonah PExtreme
Tanglewood
Xbox PA-
4 2 1
Xeon MP
Power
Opteron
Power Yonah PExtreme
Tanglewood
Xbox PA-
Xeon MP
Broadcom 1480
1985
1990
1980
1970
1975
1995
2000
Itanium 2^2005
20??
1
Athlon
Why a New Language?
What is the common
Pi^
hi
512
Pi^
hi
machine languagefor multicores?
IntelTflops CiscoCSR- PicochipPC
512256128
AmbricAM2045IntelTflops CiscoCSR- PicochipPC
AmbricAM
Raw
Tflops CaviumO t RazaXLR
64 32
Raw
Tflops^ CaviumO t RazaXLR
Raw
Niagara
Octeon Cell XLR
#^
of cores
16 8 4
Opteron 4P
Raw
Niagara
Octeon Cell XLR
Opteron 4P
Broadcom 1480
Pentium
ItaniumP
Power
Opteron
Power Yonah PExtreme
Tanglewood
Xbox PA-
4 2 1
Xeon MP
Power
Opteron
Power Yonah PExtreme
Tanglewood
Xbox PA-
Xeon MP
Broadcom 1480
1985
1990
1980
1970
1975
1995
2000
Itanium 2^2005
20??
1
Athlon
Streaming as a Common Machine Language ●
For programs based on streams of data
A di
id
DSP
t^
ki
d
AtoD FMDemod
^
A
udio, video, DSP, networking, and cryptographic processing kernels ^
Examples: HDTV editing, radar
FMDemodScatter
p^
g,
tracking, microphone arrays, cellphone base stations, graphics
LPF
LPF
LPF
●
Several attractive properties
^
Regular and repeating computation
HPF
HPF
HPF
^
Independent filterswith explicit communication ^
Task data and pipeline parallelism
Gather Adder
^
Task, data, and pipeline parallelism
Adder Speaker
Streaming Models of Computation ●
Many different ways to represent streaming
/^
?
^
Do senders/receivers block? ^
How much buffering is allowed on channels? ^
Is computation deterministic? ^
Is computation deterministic? ^
Can you avoid deadlock?
●
Three common models:1.^
Kahn Process Networks 2
S
h^
D t fl
Synchronous Dataflow
Communicating Sequential Processes
The StreamIt Language ●
A high-level, architecture-independent language for
t^
i^
li^
ti
streaming applications ^
Improves programmer productivity (vs. Java, C) ^
Offers scalable performance on multicores ^
Offers scalable performance on multicores
●
Based on synchronous dataflow, with dynamic
y^
,^
y
extensions ^
Compiler determines execution order of filters ^
Many aggressive optimizations possible
The StreamIt Project ●^
Applications
DES and Serpent [PLDI 05] ^
MPEG-2 [IPDPS 06]
StreamIt Program
[^
]
SAR, DSP benchmarks, JPEG, …
●^
Programmability
StreamIt Language (CC 02) ^
Teleport Messaging (PPOPP 05)
Front-end
Teleport Messaging (PPOPP 05) ^
Programming Environment in Eclipse (P-PHEC 05)
●^
Domain Specific Optimizations
Linear Analysis and Optimization (PLDI 03)
Stream
-Aware
Annotated Java
Simulator
Optimizations for bit streaming (PLDI 05) ^
Linear State Space Analysis (CASES 05)
●^
Architecture Specific Optimizations
Compiling for Communication
-Exposed
Stream
Aware
Optimizations
Simulator (Java Library)
Compiling
for Communication Exposed
Architectures (ASPLOS 02) ^
Phased Scheduling (LCTES 03) ^
Cache Aware Optimization (LCTES 05) ^
Load-Balanced Rendering
C/C++
Streaming
g
(Graphics Hardware 05)
C/C++
StreamingX10 runtime
Representing Streams ●
Conventional wisdom: streams are graphs
G ^
G
raphs have no simple textual representation ^
Graphs are difficult to analyze and optimize
●
Insight: stream programs have structure ●
Insight: stream programs have structure
unstructured
structured
Structured Streamsfilterpipeline
●
Each structure is single-input, single-output
may be
any StreamItlanguage construct
splitjoin
●
Hierarchical andcomposable
joiner
splitter splitjoin
joiner
splitter feedback loop
joiner
splitter
Low Pass Filter in C void FIR(
i t*
●
FIR functionality obscured by
int src,int dest,int* srcIndex,int* destIndex,int srcBufferSize**
FIR
functionality obscured by buffer management details ●
Programmer must commit to a
int
srcBufferSize, int destBufferSize,int N) {float result = 0.0;
particular buffer implementationstrategy
for (int i = 0; i < N; i++) {
**result += weights[i] ***
src[(srcIndex + i) % srcBufferSize];*
} dest[destIndex]*
= result;
srcIndex = (srcIndex + 1) % srcBufferSize;destIndex = (destIndex + 1) % destBufferSize; }**
Pipeline Example: Band Pass Filter float
→
float
pipeline
BandPassFilter (int N,
float low,
LowPassFilter
float high) {
add
LowPassFilter(N, low); add
HighPassFilter(N, high);
HighPassFilter
add
HighPassFilter(N,
high);
}
Building Larger Programs: FMRadio
void->void
pipeline
FMRadio(int N, float lo, float hi) {
add
AtoD();
AtoD
add
FMDemod(); add splitjoin
{
split duplicate
;
FMDemodDuplicate
split
duplicate
;
for (int i=0; i The Beauty of Streaming
“Some programs are elegant, some are
i it
kli
M
l i
exquisite, some are sparkling. My claimis that it is possible to write
grand
programs,
noble
p
rograms, truly
magnificient
ones!”
p
g
,^
y^
g
— Don Knuth, ACM Turing Award Lecture