Expand description
Cache Efficiency Analysis Module (PMAT-025)
Implements cache efficiency analysis for L1/L2/L3 cache behavior prediction and optimization recommendations based on working set size.
§Motivation
§31.2 identifies memory bandwidth cliff at 4M elements (32MB) due to L3 overflow. This module predicts and recommends optimal problem sizes.
§Components
| Component | Description | Use Case |
|---|---|---|
| Working Set Estimator | Bytes = elements × sizeof(T) × factor | Predict cache fit |
| Cache Level Classifier | L1/L2/L3/RAM based on size | Identify bottleneck |
| Tiling Recommender | Optimal tile size for cache | Loop blocking advice |
| Bandwidth Estimator | Theoretical vs achieved BW | Efficiency score |
Structs§
- Bandwidth
Prediction - Bandwidth prediction result
- Cache
Config - Cache hierarchy configuration
- Working
SetAnalysis - Working set analysis result
Enums§
- Access
Pattern - Streaming vs reuse pattern detection
- Cache
Level - Cache level classification
Functions§
- elementwise_
working_ set - Calculate working set for elementwise operations
- matrix_
working_ set - Calculate working set size for matrix operations
- optimal_
matmul_ tile - Calculate optimal tile size for matrix multiply