CS3210 Parallel computing

Home

❯

Tutorials

❯

CPU programming and performance

❯

Tutorial 4: Performance optimizations for CPU-based applications

Tutorial 4: Performance optimizations for CPU-based applications

CS3210 Site Preview Version
Unpublished Page

Have feedback?Share it anonymously↗

Graph View

  • Section A: tutorial questions
  • Question 1: user CPU time
  • Question 2: MIPS vs. execution time
  • Question 3: speedup & theoretical maximum speedup
  • Question 4: effects of different compilations
  • Section B: optimization exercise
  • Part 1: matrix multiplication
  • Introducing the problem scenario: matrix multiplication
  • Tutorial structure
  • Performance metric
  • Maximum achievable FLOP/s
  • Version 1: optimize memory access pattern
  • Version 2: increase instruction-level parallelism (ILP)
  • CPU architecture
  • Optimization
  • Version 3: vector instructions
  • How to vectorize?
  • Version 4: improve data reuse
  • Memory hierarchy
  • Optimization
  • Part 2.1: histogram
  • Introducing the problem scenario: histogram
  • Tutorial structure
  • Performance metric
  • Maximum achievable bandwidth
  • Parallel histogram
  • Solution: parallel histogram
  • Work distribution
  • #pragma omp critical versus #pragma omp atomic
  • Private histogram
  • Performance comparison
  • Part 2.2: histogram with scatter
  • Introducing the problem scenario: histogram with scatter
  • Tutorial structure
  • Performance metric
  • Solution: histogram with scatter
  • Example
  • Part 2.3: radix sort
  • Introducing the problem scenario: radix sort
  • Tutorial structure
  • Radix sort
  • Parallel binary radix sort
  • Conclusion

Backlinks

  • Parallelism inside one core
  • When memory sets the pace
  • Memory locality

CS3210 · AY2026/27 Semester 2

Built with Quartz