# Technical Document Extraction: Heatmap Analysis of GEMM Performance
## Image Description
The image contains two side-by-side heatmaps labeled **B_N**, each representing the performance of a computational kernel (likely General Matrix Multiply, GEMM) across varying values of **N** (rows) and **K** (columns). The heatmaps use color gradients and annotations to indicate performance characteristics and optimal configurations.
---
### **Axis Labels and Markers**
- **X-axis (K values)**:
Labeled as **K**, with discrete values:
`32, 64, 128, 256, 512`
These represent the second dimension of the matrix in GEMM operations.
- **Y-axis (N values)**:
Labeled as **N**, with discrete values:
`1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144`
These represent the first dimension of the matrix in GEMM operations.
- **Panel Titles**:
- Left panel: **B_N with K=4096**
- Right panel: **B_N with K=12288**
These indicate fixed **K** values for each heatmap.
---
### **Legend and Color Coding**
- **Legend**: Located at the bottom of both panels.
- **✓ Symbol**: Represents **B_N with the best flat GEMM performance for a certain N**.
- **Teal (dashed line)**: Indicates **parallelism-bounded** regions.
- **Red (dashed line)**: Indicates **memory-bounded** regions.
---
### **Key Trends and Data Points**
#### **Left Panel (K=4096)**
- **Checkmark (✓) Placement**:
- Diagonal line from **N=1024, K=32** to **N=262144, K=512**.
- Indicates optimal GEMM performance for increasing **N** and **K** values.
- **Regions**:
- **Parallelism-bounded**: Upper-left quadrant (high **N**, low **K**).
- **Memory-bounded**: Lower-right quadrant (low **N**, high **K**).
#### **Right Panel (K=12288)**
- **Checkmark (✓) Placement**:
- Diagonal line from **N=1024, K=32** to **N=262144, K=512**.
- Similar trend to the left panel but shifted toward higher **N** and **K** values.
- **Regions**:
- **Parallelism-bounded**: Upper-left quadrant (high **N**, low **K**).
- **Memory-bounded**: Lower-right quadrant (low **N**, high **K**).
---
### **Spatial Grounding of Legend**
- **Legend Position**: Bottom of both panels.
- **Color Verification**:
- Checkmarks (✓) are **blue**, matching the legend.
- Parallelism-bounded regions are **teal**, matching the legend.
- Memory-bounded regions are **red**, matching the legend.
---
### **Component Isolation**
1. **Header**: Panel titles (**B_N with K=4096** and **B_N with K=12288**).
2. **Main Chart**:
- Heatmap grids with **N** (y-axis) and **K** (x-axis).
- Annotations for **parallelism-bounded**, **memory-bounded**, and **✓** symbols.
3. **Footer**: Legend explaining symbols and color coding.
---
### **Data Table Reconstruction**
| N | K=32 | K=64 | K=128 | K=256 | K=512 | Region/Annotation |
|---------|------|------|-------|-------|-------|----------------------------|
| 1024 | ✓ | ✓ | ✓ | ✓ | ✓ | Parallelism-bounded |
| 2048 | ✓ | ✓ | ✓ | ✓ | ✓ | Parallelism-bounded |
| 4096 | ✓ | ✓ | ✓ | ✓ | ✓ | Parallelism-bounded |
| 8192 | ✓ | ✓ | ✓ | ✓ | ✓ | Parallelism-bounded |
| 16384 | ✓ | ✓ | ✓ | ✓ | ✓ | Parallelism-bounded |
| 32768 | ✓ | ✓ | ✓ | ✓ | ✓ | Memory-bounded |
| 65536 | ✓ | ✓ | ✓ | ✓ | ✓ | Memory-bounded |
| 131072 | ✓ | ✓ | ✓ | ✓ | ✓ | Memory-bounded |
| 262144 | ✓ | ✓ | ✓ | ✓ | ✓ | Memory-bounded |
---
### **Trend Verification**
- **Left Panel (K=4096)**:
- Checkmarks form a diagonal line from **lower-left (N=1024, K=32)** to **upper-right (N=262144, K=512)**.
- Parallelism-bounded regions dominate the upper-left, while memory-bounded regions dominate the lower-right.
- **Right Panel (K=12288)**:
- Checkmarks follow a similar diagonal trend but are concentrated in higher **N** and **K** values.
- Parallelism-bounded and memory-bounded regions align with the left panel’s structure.
---
### **Final Notes**
- The heatmaps illustrate how GEMM performance is constrained by **parallelism** (teal) and **memory** (red) for different **N** and **K** values.
- The **✓** symbols highlight the optimal **B_N** configurations for each **K** value.
- No non-English text is present in the image.