CS498 DHP Program Optimization Fall 2005
Course organization Instructors: Mar í a Garzar á n David Padua Time and location: 1111SC -- WF 11-12:15 Course website: Evaluation: 2 midterms 25% each Term project (serves as final exam) 50%
Course subject Program optimization One of the main topics in computer science although there are few courses focusing on this topic. Improve programs Execution time Power Space Reliability Modularity, Readability Accuracy/completeness Focus on first goal and some discussion of the second. Makes use of a variety of techniques Algorithm complexity. Program analysis/transformation Tools
Importance of reducing execution time Faster programs are better. An interactive environment exacerbates the thirst for speed. More science/better engineering designs in same amount of time Although machines are getting more powerful, sometimes the only way to take advantage of this power is through optimization. Itanium instruction level parallelism Multicore machines
How is a program optimized ? Manually Algorithm choice Library selection Coding -- Bit tweaking of the early days. Need tools to assess progress and understand what is happening. Tradeoff: development and maintenance time vs. performance. Automatically by a compiler By developing code generators that automatically search for best shape of the program. Here the choices are those of the programmer while in a compiler the choices are those of the compiler writer. We will mainly discuss the manual approach in this course although we need to understand compilers unless we are willing to program in assembly language. Understanding the manual approach is important for compiler writers since they should dominate the manual approach before trying to automate it. The manual approach is also important for machine designers so they can understand their choices when mapping programs to their designs.
For performance and power optimization it is necessary to have a good understanding of target machine features. Program optimization is difficult for many reasons: Machine features may interact in ways that are difficult to analyze. Explaining/predicting behavior is difficult and has become more difficult with increasing machine complexity. There many ways to solve a problem and in many cases it is not clear which one is better. It depends on the class of machine, and the characteristics of the input data. For example, it is difficult to know when is quicksort better than radix sort. In general, a “proof” of optimality is unrealistic. Usually difficult to know how much more could be done.
Tentative list of topics Compiler optimizations and compiler switches. Reduction of computation. Locality enhancement. Parallelism Threading Memory models and race conditions. Instruction level parallelism Vector devices Library generators/self adapting codes. Analytical models and search strategies Power optimization.
1) F 8/26Introduction. Course organization. What is program optimization? Optimization and machine organization. David Padua 2) W 8/30Compiler optimizations.David Padua 3) F 9/2Compiler optimizationsDavid Padua 4) W 9/7Reduction of computation/redundancy elimination David Padua 5) F 9/9Vtune.Paul Petersen 6) W 9/14Locality/tilingMaria Garzaran 7) F 9/16Locality/tilingMaria Garzaran 8) W 9/21Locality/Cache Oblivious algorithmsJia Guo 9) F 9/23Empirical search / Multiple-version programs / X-language David Padua Sebastian Donadio 10) W 9/28ThreadingArch Robison 11) F 9/30ThreadingArch Robison 12) W 10/5Threading toolsPaul Petersen 13) F 10/7ThreadingArch Robison 14) 10/121 st Midterm.
15) 10/14Locality/ nonumerical algorithmsMaria Garzaran 16) W 10/19Instruction Level ParallelismMaria Garzaran 17) F 10/21SSE devices and multimedia applications.Gang Ren 18) W 10/26The ATLAS systemMaria Garzaran 19) F 10/28The SPIRAL systemMarkus Pueschel 20) W 11/2SortingXiaoming Li 21) F 11/4Analytical models of locality (I)Basilio Fraguela 22) W 11/9Analytical models of locality (II)Basilio Fraguela 23) F 11/11Search strategies 24) W 11/16Power optimizationXiaoming Li 25) F 11/18Memory Models and their optimizationsDavid Wong 26) W 11/30TBD 27) F 12/2TBD 28) W 12/7TBD 29) F 12/92 nd Midterm.