Skip to main content

Module cache_analysis

Module cache_analysis 

Source
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

ComponentDescriptionUse Case
Working Set EstimatorBytes = elements × sizeof(T) × factorPredict cache fit
Cache Level ClassifierL1/L2/L3/RAM based on sizeIdentify bottleneck
Tiling RecommenderOptimal tile size for cacheLoop blocking advice
Bandwidth EstimatorTheoretical vs achieved BWEfficiency score

Structs§

BandwidthPrediction
Bandwidth prediction result
CacheConfig
Cache hierarchy configuration
WorkingSetAnalysis
Working set analysis result

Enums§

AccessPattern
Streaming vs reuse pattern detection
CacheLevel
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