Skip to content
DenseChip
Learn
PracticeCode labInterview

DenseChip

Navigate

Menu

LearnPracticeCode labInterview

Tools

All toolsSV editorCode repoResume
DenseChip

Practice, courses, and chip-design tools in one focused workspace.

LearnPracticeCode labInterviewToolsLearning paths

© 2026 DenseChip

AboutContactPrivacyTerms
Skip to lesson

Course contents

  • Architecture Metrics Reference
  • Workload Taxonomy for Architects
  • Architecture Glossary
  • Computer Architecture Cheatsheet
  • Pipeline Fundamentals14
  • Memory Hierarchy15
  • NoC and Interconnect Architecture6
  • Coherency and Memory Ordering9
  • Performance Analysis9
    • Performance Method: Counters, Top-Down and Triage
    • Roofline and Tuning
      • Roofline Foundations
      • Placing Kernels on the Roofline
      • Tiling Moves Points Right
      • Roofline Limits and Amdahl's Law
  • Accelerator Architectures6
  • SoC Architecture Tradeoffs9
  • Architecture Interview Prep14
Loading lesson

‹Roofline and Tuning
  1. Topics
  2. Computer Architecture
  3. Performance Analysis
  4. Roofline and Tuning
  5. Roofline Limits and Amdahl's Law

Computer Architecture · All levels

Roofline Limits and Amdahl's Law

Latency, contention and power limits of roofline, plus Amdahl's law for partial speedups.

On this page

    Latency is out of scope

    Roofline is a steady-state throughput bound. It says nothing about latency, tails, synchronization or queueing.

    Workload

    Roofline says

    Reality

    Right tool

    Pointer chase, dependent misses

    High reuse looks fine

    Each load waits on the last

    Critical-path and overlap analysis

    Barrier-heavy parallel loop

    Slopes look healthy

    Threads idle at the barrier

    Imbalance and sync analysis

    A proposal to widen SIMD for a latency problem needs a latency argument. Roofline can reject wider SIMD for a memory-bound throughput kernel, and nothing more.

    Contention and power caps

    Shared bandwidth lowers the slope each kernel sees. Two kernels splitting 20 GB/s face 10 GB/s each, so both caps halve.

    Power caps add a third roof below both. A kernel under a power limit sits under a ceiling that neither intensity nor bandwidth moves.

    Amdahl's law

    Amdahl's law bounds the speedup from improving only part of a workload. The untouched fraction caps the whole, exactly as a binding roof does.

    S=(1−p)+p/s1​

    Here p is the fraction of runtime improved, and s is that part's speedup. The formula takes runtime shares, not operation counts.

    Diagram
    Workload with p = 0.8 improvable by s = 4:
      S = 1 / (0.2 + 0.8 / 4) = 1 / (0.2 + 0.2) = 1 / 0.4 = 2.5x
      Even unbounded s: S = 1 / 0.2 = 5x, the serial fifth dominates
    Roofline pairing: 60% of time memory-bound, 40% compute-bound, peak doubles:
      S = 1 / (0.6 + 0.4 / 2) = 1 / (0.6 + 0.2) = 1 / 0.8 = 1.25x

    Saying roofline does not apply

    The senior move is naming the boundary of the model. Latency, imbalance and power questions get a different analysis, not a bigger roofline.

    Common pitfall

    Treating a slide-level roofline as signoff proof. The plot uses stated ceilings and counted traffic, so unmeasured production behavior voids it.

    Interview

    Likely probe: the team proposes wider SIMD lanes to fix latency. Answer: roofline only rules on steady-state throughput, so reject wider lanes for a memory-bound throughput kernel, and demand Little's-law or critical-path analysis for the latency claim.

    Check yourself A kernel speeds its parallel 80% by 4x. What is the whole-workload speedup, and what caps it with unbounded parallel speedup?

    Speedup is 1 / 0.4 = 2.5x. The serial 20% caps it at 1 / 0.2 = 5x no matter how fast the parallel part gets.

    Check yourself A memory-bound kernel shares its 20 GB/s link evenly with a second kernel. What happens to its cap at AI 0.5?

    Its slope halves to 10 GB/s. The cap falls from 0.5 x 20 = 10 to 0.5 x 10 = 5 GFLOP/s.

    Related topics

    • Interview method and worked scenarios

    Previous

    57 / 86

    Next: Accelerator Architectures

    Up next

    Up nextAccelerator Architectures

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Roofline Foundations
    • Placing Kernels on the Roofline