Optimization Overview - PowerPoint PPT Presentation

1 / 25
About This Presentation
Title:

Optimization Overview

Description:

Title: Optimization Overview Author: Eric W Moore Last modified by: ChenJian Created Date: 4/10/2001 6:37:26 PM Document presentation format: – PowerPoint PPT presentation

Number of Views:32
Avg rating:3.0/5.0
Slides: 26
Provided by: EricW64
Category:

less

Transcript and Presenter's Notes

Title: Optimization Overview


1
??????
  • ??
  • 2003/3

2
????????????? gtgt ?????
for(i0iltNUMi) for(j0jltNUMj)
for(k0kltNUMk) cij cij
aik bkj
for(i0iltNUMi) for(k0kltNUMk)
for(j0jltNUMj) cij cij
aik bkj
SELF RELEASE OPT4 IMSL CXML ATLAS MKL50 MKL51
16.676s 5.445s 5.457s 10.996s 3.328s 0.762s 0.848s 0.738s
3
(No Transcript)
4
(No Transcript)
5
??
  • ???????????
  • ?????????????
  • ??Intel??????

6
Agenda
  • Performance Cycle Overview
  • The Performance Cycle
  • When to Start
  • Performance Gains
  • When to Stop
  • Putting it into Perspective
  • Performance Cycle Details
  • Summary

7
????
8
When (why) to Start
  • User Requirement?
  • Software Vendor Requirement?
  • Put Performance Requirement into the Requirements
    Document
  • Performance should be considered at every stage
    of the product life cycle (Requirements
    Gathering, Design, and Testing)
  • Exception Do code tuning after the
    simple/readable non-optimized version of the
    application exists.

9
?? vs. ??
10
When to Stop
  • Architecture is at Maximum Efficiency?
  • Be sure you know what this is Calculate
    Theoretical Maximum
  • Performance Requirement is satisfied
  • Incrementally do Wide Mesh Optimizations2 until
    done

11
????
  • We should forget about small efficiencies, say
    about 97 of the time premature optimization is
    the root of all evil.
  • Donald Knuth
  • Quality Code is
  • Portable
  • Readable
  • Maintainable
  • Reliable
  • Intelligently Sacrifice Quality for Performance

12
Agenda
  • Performance Cycle Overview
  • Performance Cycle Details
  • Gather Performance Data
  • Analyze Data and Identify Issues
  • Generate Alternatives to Resolve Issues
  • Implement Enhancements
  • Summary

13
??????
  • Timer
  • Use to get wall clock time
  • Accuracy, Low Overhead
  • Use Intel VTune Performance Analyzer
  • Profiler Gather Information about Code Usage
  • Performance Monitor Gather Information about
    System Resource Usage

14
???
  • A good workload should have these
    characteristics
  • measurable
  • reproducible
  • static
  • representative

15
????????
  • Baseline Current Performance
  • Examine Hot Spots
  • Identify Bottlenecks
  • Calculate Potential Maximum Performance

16
Examine Hot Spots
  • The Pareto Principle, a.k.a. the 80/20 Rule
  • Concentrate on the vital few vs. the trivial many
  • Hot Spot ???????????????
  • Generally consists of a Loop
  • For Applications that dont have hot spots,
    examine
  • Memory Layout
  • Exceptions
  • Effective Compiler Usage

17
????
  • Big O
  • Utilization, Efficiency, Throughput, Latency
  • Bottlenecks
  • I/O, Memory, CPU
  • MIPS/FLOPS/CPI
  • Concurrency, Parallelism
  • Scalability
  • Loads/Stores per Calculation

18
Agenda
  • Performance Cycle Overview
  • Performance Cycle Details
  • Gather Performance Data
  • Analyze Data and Identify Issues
  • Generate Alternatives to Resolve Issues
  • Implement Enhancements
  • Summary

19
??????
  • ????
  • ????
  • ???????
  • ????
  • ????
  • ????

20
????
  • ?????
  • ????
  • C ????
  • ???
  • ????
  • ??????
  • ???

Hardest to develop and maintain Easiest to
develop, port and maintain
21
Code Tuning
  • If Parallel Processing
  • Break Algorithm up across Clusters (Distributed
    Memory)
  • Single Node Optimization
  • Break Algorithm up across Processors (SMP)

22
????????
  • Use Intel Libraries
  • Use Various Compiler Switches
  • Find out if the compiler or hardware does the
    enhancements automatically - before implementing
    yourself
  • Modify Source (i.e. Loop Transformations,
    SWP, SIMD, OpenMP, Intrinsics, Assembly)

23
Test!
  • Make sure Applications still runs correctly
    (Regression Testing)
  • Make sure enhancement actually increases
    performance
  • Calculate Speed-up
  • Decide if youre done optimizing

24
Speed-Up
The Two Basic Formulas
25
Summary
  • Optimization Tasks
  • Gather Performance Data
  • Analyze Data Identify Issues
  • Generate Alternatives to Resolve Issue
  • Implement Enhancements
  • Test Results
  • Use Intel Software Development Tools for every
    step in the process
Write a Comment
User Comments (0)
About PowerShow.com