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 Foundations

Computer Architecture · All levels

Roofline Foundations

Arithmetic intensity, the min(peak, bandwidth times intensity) bound and the ridge point.

On this page

    Arithmetic intensity

    Arithmetic intensity is operations per byte moved across a stated boundary. The boundary is part of the number: L1, LLC and DRAM intensities for one kernel differ.

    A single-precision dot product over N elements does about 2N operations. It moves 8N bytes from DRAM, two vectors of 4N bytes, so its DRAM intensity is 2N / 8N = 0.25 FLOP per byte.

    The roofline bound

    Attainable throughput is the lower of the two roofs. The memory roof is intensity times bandwidth, and the compute roof is flat at peak.

    Pattain​=min(Ppeak​,AI×BW)

    Performance is in FLOP per second. Intensity is in FLOP per byte, and bandwidth is in bytes per second, so the product has matching units.

    The ridge point

    The ridge point is where the two roofs meet. Its intensity is AI* = peak / bandwidth, the line between memory-bound and compute-bound.

    Diagram
    Assumed platform (stated parameters, not measured hardware):
      Peak P = 100 GFLOP/s, sustained DRAM BW = 20 GB/s
      AI* = P / BW = 100 / 20 = 5 FLOP/B
      AI = 0.5 -> min(100, 0.5 x 20 = 10) = 10 GFLOP/s, memory-bound
      AI = 5   -> min(100, 5 x 20 = 100) = 100 GFLOP/s, at the ridge
      AI = 20  -> min(100, 20 x 20 = 400) = 100 GFLOP/s, compute-bound

    AI (FLOP/B)

    Memory roof (GFLOP/s)

    Binding roof

    0.5

    10

    Memory

    5

    100

    Ridge, both

    20

    100 (capped)

    Compute

    An upper bound, not a prediction

    Roofline says no faster than, never as fast as. Real kernels sit below the roof by a gap that latency, overlap and efficiency explain.

    Ceilings must be sustained bandwidths measured or stated for the workload. Marketing peak numbers lift the slope and hide memory-bound kernels.

    Common pitfall

    Substituting peak marketing bandwidth for sustained bandwidth moves the whole slope up. Memory-bound kernels then look compute-bound and attract useless ALU area.

    Interview

    Likely probe: derive the ridge point from stated numbers. Answer with AI* = peak / bandwidth, then place one kernel on each side with its substituted arithmetic.

    Check yourself Peak is 100 GFLOP/s and sustained bandwidth is 20 GB/s. Where is the ridge, and which side is a kernel with AI 0.5 on?

    The ridge is at 100 / 20 = 5 FLOP per byte. AI 0.5 sits left of the ridge, so the kernel is memory-bound at 10 GFLOP/s.

    Check yourself A slide quotes peak DRAM bandwidth and places every kernel under the compute roof. What is wrong?

    The slope uses an unreachable ceiling. Sustained bandwidth lowers the slope, and some kernels fall back onto it as memory-bound.

    Related topics

    • Performance method

    Previous

    54 / 86

    Next: Placing Kernels on the Roofline

    Up next

    Up nextPlacing Kernels on the Roofline

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Tiling Moves Points Right
    • Roofline Limits and Amdahl's Law