Title: Influence of Compiler Optimizations on System Power
1Influence of Compiler Optimizations on System
Power
- M. Kandemir, N. Vijaykrishnan, M. J. Irwin, W. Ye
- Microsystems Design Lab
- The Pennsylvania State University
- http//www.cse.psu.edu/mdl
2Outline
- Motivation
- Energy Estimation Framework
- Compiler Optimizations
- Experimental Results
- Conclusions
3Motivation
- Energy is a critical design constraint
- Increasing software content inembedded devices
- Compilers traditionally consider performance
Are performance-oriented optimizations suitable
for energy?
4SimplePower Framework
compiler transformations
5Memory System Model
Addr Pads
SimplePower Datapath
Memory
Data Pads
6Compiler Optimizations
- Linear Loop Transformations
- Iteration Space Tiling
- Loop Unrolling
- Loop Fusion and Fission (Distribution)
- Scalar Expansion
These transformations are used for enhancing data
locality and improving coarse/fine-grain
parallelism!
7Compiler Framework
Input Code
Parafrase-II
Omega Library
Output Code
Native Compiler (cc,gcc,MIPSpro,)
Executable
8Loop Fusion and Fission
for(I0 Iltn I) UIXVI for(I0 Iltn
I) UIUIUI
for(I0 Iltn I) UIXVI UIUIU
I
9Linear Loop Transformations
for(j0 jltn j) for(l0 lltn
l) UjIVjI
for(I0 Iltn I) for(j0 jltn
j) UjIVjI
with row-major memory layouts
10Iteration Space (Loop) Tiling
- for(I0 Iltn I)
- for(j0 jltn j)
- for(k0 kltn k)
- UIjVIkWkj
(t is the tile size)
for(I10 I1ltn I1t) for(j10 j1ltn
j1t) for(k10 k1ltn k1t)
for(Il1 Iltmin(l1t, n) I)
for(jj1 jltmin(j1t, n) j)
for(kk1 kltmin(k1t, n) k)
UIjVIkWkj
11Loop Unrolling
- for(I0 Iltn I)
- for(j0 jltn j)
- for(k0 kltn k)
- UIjVIkWkj
(b is the unrolling factor)
for(I0 Iltn Ib) for(j0 jltn j)
for(k0 kltn k)
UIjVIkWkj
UI1jVI1kWkj . .
. UIb-1jVIb-1kWkj
12Scalar Expansion
for(I0 Iltn I) KIUIUI-1
VIKI1/KI
for(I0 Iltn I) KUIUI-1
VIK1/K
Scalar Expansion
13Core Energy Consumption (J)
Matrix Multiplication
14Memory Energy Consumption (J)
Matrix Multiplication
15Memory Energy Consumption (J)
Matrix Multiplication
16Memory Energy Consumption (J)
17Conclusions
- Original Codes Energy consumed in memory is
higher than core energy - Optimized Codes The gap is reduced
- Memory energy is reduced
- Core energy is increased
- Miss rate is not a good indicator for energy
More information
http//www.cse.psu.edu/mdl