Lecture 2: Implementation and Optimization of Matrix Multiplication
Background Material
- C programming language.
- Assembly language - IA32 (Chapter 3 of Bryant and O'Hallaron)
Reading
Topics
- Performance of Matrix Multiplication
- Numerical Recipes
- Optimization flags
- Machine parameters (/proc/cpuinfo, mem_info, cpuid, manuals)
- Variants of Matrix multiplication (rearranging loops,
block matrix multiplication)
- Performance counters (PAPI)
- Analysis of Assembly code
Tasks
- Time and count instructions for loop.c (optimized and unoptimized)
- Determine the number of cycles per iteration for loop.c
(optimized and unoptimized)
- Time and instrument matrix multiplication code.
- Experiment with variants of matrix multiplication.
Lecture Notes
Resources
Assignments
Created: Sept. 27, 2006 by jjohnson@cs.drexel.edu