Beruflich Dokumente
Kultur Dokumente
Goals
Terminology
m-factor ANOVA
1.
2.
ANOVA Summary
Variation
Alternatives
Error
Total
Sum of squares
SSA
SSE
SST
Deg freedom
k 1
k (n 1)
kn 1
Mean square
Computed F
Tabulated F
Generalized Design of
Experiments
Goals
Basic
idea
Terminology
Response
variable
Factors
Levels
Terminology
Replication
Interaction
Two-factor Experiments
Two
factors (inputs)
A, B
Separate
Effect due to A
Effect due to B
Effect due to interaction of A and B (AB)
Experimental error
A = degree of
multiprogramming
B = memory size
AB = interaction of
memory size and
degree of
multiprogramming
B (Mbytes)
A
32
64
128
0.25
0.21
0.15
0.52
0.45
0.36
0.81
0.66
0.50
1.50
1.45
0.70
Two-factor ANOVA
Factor
A a input levels
Factor B b input levels
n measurements for each input combination
abn total measurements
Factor A
Factor B
yijk
n replications
10
Each individual
measurement is
composition of
Overall mean
Effect of alternatives
Measurement errors
i effect due to A
eij measurement error
11
Two-factor ANOVA
Each individual
measurement is
composition of
Overall mean
Effects
Interactions
Measurement errors
i effect due to A
j effect due to B
ij effect due to interaction of A and B
eijk measurement error
12
Sum-of-Squares
Degrees of freedom
df(SSA) = a 1
df(SSB) = b 1
df(SSAB) = (a 1)(b 1)
df(SSE) = ab(n 1)
df(SST) = abn - 1
13
Two-Factor ANOVA
AB
Error
Sum of squares
SSA
SSB
SSAB
SSE
Deg freedom
a 1
b 1
(a 1)(b 1)
ab(n 1)
Mean square
Computed F
Tabulated F
2
sa2 SSA (a 1) sb2 SSB (b 1) sab
SSAB [(a 1)(b 1)] se2 SSE [ab(n 1)]
Fa sa2 se2
Fb sb2 se2
2
Fab sab
se2
14
n=1
Only one measurement of each configuration
Can
Since
We
have
SSE = 0
Copyright 2004 David
15
when n=1
SSE = 0
No information about measurement errors
Cannot
16
Example
A = degree of
multiprogramming
B = memory size
AB = interaction
Error
Need replications to
separate error
B (Mbytes)
A
32
64
128
0.25
0.21
0.15
0.52
0.45
0.36
0.81
0.66
0.50
1.50
1.45
0.70
17
Example
B (Mbytes)
A
32
64
128
0.25
0.21
0.15
0.28
0.19
0.11
0.52
0.45
0.36
0.48
0.49
0.30
0.81
0.66
0.50
0.76
0.59
0.61
1.50
1.45
0.70
1.61
1.32
0.68
2
3
4
18
Example
AB
Error
Sum of squares
3.3714
0.5152
0.4317
0.0293
Deg freedom
12
Mean square
1.1238
0.2576
0.0720
0.0024
Computed F
460.2
105.5
29.5
Tabulated F
19
20
Generalized m-factor
Experiments
Effects for 3
factors:
m factors
m main effects
m
two - factor interactions
2
m
three - factor interactions
3
m
1 m - factor interactions
m
A
B
C
AB
AC
BC
ABC
2 m 1 total effects
21
= (a-1)
df(SSB) = (b-1)
df(SSC) = (c-1)
df(SSAB) = (a-1)(b-1)
df(SSAC) = (a-1)(c-1)
df(SSE) = abc(n-1)
df(SSAB) = abcn-1
Copyright 2004 David
22
2.
3.
4.
5.
6.
23
A Problem
Full
n vm experiments
m
24
High, low
On, off
Find
25
n2m Experiments
AB
Sum of squares
Deg freedom
Mean square
Computed F
SSA
1
sa2 SSA 1
Fa sa2 se2
SSB
1
sb2 SSB 1
Fb sb2 se2
SSAB
SSE
1
2 m (n 1)
2
sab
SSAB 1 se2 SSE [2 m (n 1)]
2
Fab sab
se2
Tabulated F
Error
26
Factor A
Factor B
yAB
High
High
yAb
High
Low
yaB
Low
High
yab
Low
Low
27
n2m Contrasts
wA y AB y Ab yaB yab
wB y AB y Ab yaB yab
wAB y AB y Ab yaB yab
Copyright 2004 David
28
w
SSA
n2
wB2
SSB m
n2
2
wAB
SSAB m
n2
SSE SST SSA SSB SSAB
Copyright 2004 David
29
AB
Sum of squares
Deg freedom
Mean square
Computed F
SSA
1
sa2 SSA 1
Fa sa2 se2
SSB
1
sb2 SSB 1
Fb sb2 se2
SSAB
SSE
1
2 m (n 1)
2
sab
SSAB 1 se2 SSE [2 m (n 1)]
2
Fab sab
se2
Tabulated F
Error
30
Contrast
wa
wb
wab
yAB
yAb
yaB
yab
wA y AB y Ab yaB yab
wB y AB y Ab yaB yab
wAB y AB y Ab yaB yab
Copyright 2004 David
31
Contrast
wa
wb
wc
wab
wac
wbc
wabc
yabc
yAbc
yaBc
32
33
Important Points
Experimental
design is used to
Expand
34
Multifactorial designs
Effects
Requires
O(m) experiments
35
X = next multiple of 4 m
PB design matrix
Rows = configurations
Columns = parameters values in each config
High/low = +1/ -1
First row = from P&B paper
Subsequent rows = circular right shift of preceding row
Last row = all (-1)
36
PB Design Matrix
Config
Response
+1
+1
+1
-1
+1
-1
-1
-1
+1
+1
+1
-1
+1
-1
-1
-1
+1
+1
+1
-1
+1
+1
-1
-1
+1
+1
+1
-1
-1
+1
-1
-1
+1
+1
+1
+1
-1
+1
-1
-1
+1
+1
+1
+1
-1
+1
-1
-1
+1
-1
-1
-1
-1
-1
-1
-1
Effect
37
PB Design Matrix
Config
Response
+1
+1
+1
-1
+1
-1
-1
-1
+1
+1
+1
-1
+1
-1
11
-1
-1
+1
+1
+1
-1
+1
+1
-1
-1
+1
+1
+1
-1
-1
+1
-1
-1
+1
+1
+1
+1
-1
+1
-1
-1
+1
+1
+1
+1
-1
+1
-1
-1
+1
-1
-1
-1
-1
-1
-1
-1
Effect
38
PB Design Matrix
Config
Response
+1
+1
+1
-1
+1
-1
-1
-1
+1
+1
+1
-1
+1
-1
11
-1
-1
+1
+1
+1
-1
+1
+1
-1
-1
+1
+1
+1
-1
-1
+1
-1
-1
+1
+1
+1
+1
-1
+1
-1
-1
+1
+1
74
+1
+1
-1
+1
-1
-1
+1
-1
-1
-1
-1
-1
-1
-1
Effect
39
PB Design Matrix
Config
Response
+1
+1
+1
-1
+1
-1
-1
-1
+1
+1
+1
-1
+1
-1
11
-1
-1
+1
+1
+1
-1
+1
+1
-1
-1
+1
+1
+1
-1
-1
+1
-1
-1
+1
+1
+1
+1
-1
+1
-1
-1
+1
+1
74
+1
+1
-1
+1
-1
-1
+1
-1
-1
-1
-1
-1
-1
-1
Effect
65
40
PB Design Matrix
Config
Response
+1
+1
+1
-1
+1
-1
-1
-1
+1
+1
+1
-1
+1
-1
11
-1
-1
+1
+1
+1
-1
+1
+1
-1
-1
+1
+1
+1
-1
-1
+1
-1
-1
+1
+1
+1
+1
-1
+1
-1
-1
+1
+1
74
+1
+1
-1
+1
-1
-1
+1
-1
-1
-1
-1
-1
-1
-1
Effect
65
-45
41
PB Design Matrix
Config
Response
+1
+1
+1
-1
+1
-1
-1
-1
+1
+1
+1
-1
+1
-1
11
-1
-1
+1
+1
+1
-1
+1
+1
-1
-1
+1
+1
+1
-1
-1
+1
-1
-1
+1
+1
+1
+1
-1
+1
-1
-1
+1
+1
74
+1
+1
-1
+1
-1
-1
+1
-1
-1
-1
-1
-1
-1
-1
Effect
65
-45
75
-75
-75
73
67
42
PB Design
Only
In
Sign is meaningless
43
Provides
44
Exec. Time
+1
+1
+1
-1
+1
-1
-1
-1
+1
+1
+1
-1
+1
-1
11
-1
-1
+1
+1
+1
-1
+1
+1
-1
-1
+1
+1
+1
-1
-1
+1
-1
-1
+1
+1
+1
+1
-1
+1
-1
-1
+1
+1
74
+1
+1
-1
+1
-1
-1
+1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
+1
-1
+1
+1
17
+1
-1
-1
-1
+1
-1
+1
76
+1
+1
-1
-1
-1
+1
-1
-1
+1
+1
-1
-1
-1
+1
31
+1
-1
+1
+1
-1
-1
-1
19
-1
+1
-1
+1
+1
-1
-1
33
-1
-1
+1
-1
+1
+1
-1
+1
+1
+1
+1
+1
+1
+1
112
191
19
111
-13
79
55
239
45
Case Study #1
46
47
Simulation Environment
SimpleScalar
sim-outorder 3.0
Selected
simulator
MinneSPEC
48
Low Value
High Value
Int ALUs
2 Cycles
1 Cycle
FP ALUs
FP ALU Latency
5 Cycles
1 Cycle
FP ALU Throughputs
15 Cycles
2 Cycles
80 Cycles
10 Cycles
FP Mult/Div Units
FP Mult Latency
5 Cycles
2 Cycles
FP Div Latency
35 Cycles
10 Cycles
FP Sqrt Latency
35 Cycles
15 Cycles
FP Mult Throughput
FP Div Throughput
FP Sqrt Throughput
49
Low Value
High Value
L1 I-Cache Size
4 KB
128 KB
L1 I-Cache Assoc
1-Way
8-Way
16 Bytes
64 Bytes
L1 I-Cache Latency
4 Cycles
1 Cycle
L1 D-Cache Size
4 KB
128 KB
L1 D-Cache Assoc
1-Way
8-Way
16 Bytes
64 Bytes
L1 D-Cache Latency
4 Cycles
1 Cycle
L2 Cache Size
256 KB
8192 KB
L2 Cache Assoc
1-Way
8-Way
64 Bytes
256 Bytes
50
Low Value
High Value
L2 Cache Latency
20 Cycles
5 Cycles
200 Cycles
50 Cycles
Mem Bandwidth
4 Bytes
32 Bytes
I-TLB Size
32 Entries
256 Entries
4 KB
4096 KB
I-TLB Assoc
2-Way
Fully Assoc
I-TLB Latency
80 Cycles
30 Cycles
D-TLB Size
32 Entries
256 Entries
D-TLB Assoc
2-Way
D-TLB Latency
Fully-Assoc
51
Low Value
High Value
32
Branch Predictor
2-Level
Perfect
10 Cycles
2 Cycles
RAS Entries
64
BTB Entries
16
512
BTB Assoc
2-Way
Fully-Assoc
In Commit
In Decode
Decode/Issue Width
4-Way
ROB Entries
64
LSQ Entries
0.25 * ROB
1.0 * ROB
Memory Ports
52
Config
Response
+1
+1
+1
-1
+1
-1
-1
-1
+1
+1
+1
-1
+1
-1
-1
-1
+1
+1
+1
-1
+1
Effect
53
Across configurations
Config
Response
+1
+1
+1
-1
+1
-1
-1
-1
+1
+1
+1
-1
+1
-1
-1
-1
+1
+1
+1
-1
+1
Effect
65
54
Benchmark 1
Benchmark 2
Benchmark 3
12
29
22
55
Average
12
7.67
29
22
18.3
56
Parameter
ROB Entries
2.77
L2 Cache Latency
4.00
27
7.69
29
9.08
L1 D-Cache Latency
10.00
L1 I-Cache Size
12
10.23
L2 Cache Size
10.62
16
10
11.77
36
12.31
10
LSQ Entries
10
12
39
12.62
11
28
16
18.23
Average
57
General Procedure
58
Case Study #2
59
metrics
Speedup,
Simple
analysis
Discards
60
Find
Compare
parameter ranks
61
Example: Instruction
Precomputation
Profile
Insert
62
The Effect of
Instruction Precomputation
Average Rank
Parameter
Before
ROB Entries
2.77
L2 Cache Latency
4.00
7.69
9.08
L1 D-Cache Latency
10.00
L1 I-Cache Size
10.23
L2 Cache Size
10.62
11.77
12.31
LSQ Entries
12.62
After
Difference
63
The Effect of
Instruction Precomputation
Average Rank
Parameter
Before
After
ROB Entries
2.77
2.77
L2 Cache Latency
4.00
4.00
7.69
7.92
9.08
10.54
L1 D-Cache Latency
10.00
9.62
L1 I-Cache Size
10.23
10.15
L2 Cache Size
10.62
10.54
11.77
11.38
12.31
11.62
LSQ Entries
12.62
13.00
Difference
64
The Effect of
Instruction Precomputation
Average Rank
Parameter
Before
After
Difference
ROB Entries
2.77
2.77
0.00
L2 Cache Latency
4.00
4.00
0.00
7.69
7.92
-0.23
9.08
10.54
-1.46
L1 D-Cache Latency
10.00
9.62
0.38
L1 I-Cache Size
10.23
10.15
0.08
L2 Cache Size
10.62
10.54
0.08
11.77
11.38
0.39
12.31
11.62
0.69
LSQ Entries
12.62
13.00
-0.38
65
Case Study #3
66
Benchmark Classification
By
By
application type
Floating-point code
Integer code
Memory intensive code
Etc.,
etc.
Copyright 2004 David
67
Another Point-of-View
Classify
Define:
How
68
Similarity metric
Use
x1 = rank of parameter 1
x2 = rank of parameter 2
69
70
Similarity Metric
D [( x1 y1 ) 2 ( x2 y2 ) 2 ( xn 1 yn 1 ) 2 ( xn yn ) 2 ]1/ 2
71
Parameter
gcc
ROB Entries
L2 Cache Latency
27
29
L1 D-Cache Latency
L1 I-Cache Size
12
L2 Cache Size
16
10
36
10
LSQ Entries
10
12
39
11
28
16
gzip
art
72
Distance Computation
Rank
vectors
Gcc = (4, 2, 5, 8, )
Gzip = (1, 4, 2, 3, )
Art = (2, 4, 27, 29, )
Euclidean
distances
73
gcc
gzip
gcc
gzip
art
mcf
81.9
92.6
94.5
113.5
109.6
98.6
art
mcf
74
Dendogram of Distances
Showing (Dis-)Similarity
75
Benchmarks
Gzip,mesa
Vpr-Place,twolf
Vpr-Route, parser, bzip2
Gcc, vortex
Art
Mcf
Equake
ammp
Copyright 2004 David
76
Important Points
Multifactorial
Logically
77
Summary
Design of experiments
Isolate effects of each input variable.
Determine effects of interactions.
Determine magnitude of experimental error
m-factor ANOVA (full factorial design)
All effects, interactions, and errors
78
Summary
n2m
designs
All
high/low
on/off
79
Summary
Plackett
No interactions
For
80