How Accurate Is SimPoint's IPC Estimate? Comparing Against a Full 403.gcc Run

I have been building a SPEC CPU2006 simulation pipeline using SimPoint. The whole point of SimPoint is that you don't need to run the entire benchmark: pick representative intervals, take a weighted average, and you get an approximate IPC. But I had never properly verified how accurate that actually is.

I had just built a new flow for 403.gcc subcmd=1 that runs the full benchmark through QEMU → FIFO → Sniper without using disk, so I compared the SimPoint IPC estimate against the measured full-run value. The discrepancy was larger than I expected.


What I Compared

SimPoint Estimated IPC

ipc_estimation.csv records the IPC and weight of each SimPoint. For subcmd=1, 21 SimPoint intervals were selected, and the sum of their weighted_ipc values is the estimated IPC.

subcmd, simpoint, weight,    ipc,    weighted_ipc
1,       876,    0.151592,  0.4567,  0.069232
1,      1824,    0.194703,  0.5868,  0.114252
1,      1433,    0.043111,  0.0550,  0.002371
1,      2260,    0.185686,  0.9004,  0.167192
1,      1044,    0.000564,  0.1427,  0.000080
1,      3033,    0.055227,  0.2179,  0.012034
1,      3425,    0.011834,  0.2724,  0.003224
1,        57,    0.002254,  0.5579,  0.001258
1,      1330,    0.004508,  0.5431,  0.002448
1,       544,    0.014089,  0.4801,  0.006764
1,        59,    0.001127,  0.3803,  0.000429
1,      1560,    0.027050,  0.5915,  0.016000
1,      3068,    0.030431,  0.5780,  0.017589
1,      1955,    0.011834,  0.9541,  0.011291
1,      2529,    0.032404,  0.1784,  0.005781
1,      1869,    0.016624,  1.0538,  0.017519
1,      1121,    0.010144,  0.1641,  0.001665
1,      1588,    0.077205,  0.6246,  0.048222
1,      2320,    0.006481,  0.5401,  0.003500
1,      1919,    0.025359,  0.6958,  0.017645
1,      2379,    0.097774,  0.5645,  0.055193
                ─────────                ─────────
                 1.000000                 0.5737

The weights sum to exactly 1.0, so the 21 intervals chosen by SimPoint cover the whole run. The weighted average IPC is 0.574.

Measured Full-Run IPC

The result of running 403.gcc subcmd=1 (compiling 166.i) from start to finish with the newly built FIFO flow is recorded in subcmd_1_run3/sim.out.

Instructions: 70,986,166,954
Cycles:      199,925,596,200
IPC:           0.36  (displayed value)

Calculated precisely, 70,986,166,954 ÷ 199,925,596,200 = 0.3551.


Comparison Results

Method IPC
SimPoint weighted average (21 intervals) 0.574
Full-run measurement 0.355
Difference (estimate − measurement) +0.219
Overestimation rate +61.6%

The SimPoint estimate is 62% higher than the full run. This is a discrepancy that can't be ignored.


Why Is the Discrepancy So Large?

I thought of several possible causes.

1. Program Startup and Shutdown Overhead

SimPoint clustering is performed in BBV (Basic Block Vector) space. Program startup (library initialization, command-line parsing) and shutdown execute few instructions, so they tend to sit at the periphery of BBV space. They are unlikely to be chosen as representative points and tend to get small weights.

The full run, on the other hand, includes every instruction from startup to shutdown. Startup has ineffective branch prediction and cold caches, so its IPC is low. This interval pulls down the overall IPC of the full run.

2. Cache Cold-Start Effects

In each SimPoint simulation, the cache is warmed up during the preceding 20% interval, but this does not fully reproduce the actual access history. Because the detailed simulation starts from a warmed-up state, the IPC of each SimPoint tends to come out higher than reality.

The full run starts from a cold cache and warms up as execution proceeds. This transient state lowers the average IPC of the full run.

3. Skew in the IPC Distribution of Specific Intervals

Looking at the SimPoints for subcmd=1, simpoint=1433 has a strikingly low IPC of 0.055. This interval is an order of magnitude lower than the others, and I suspect that some special phase (a large number of cache misses, or processing other than numerical computation) is running there. Because its weight is small at 0.043, its effect on the weighted average is only about 0.002, but in the actual full run, such low-IPC phases may continue over a considerable number of instructions.

Conversely, simpoint=1869 has a very high IPC of 1.054. An IPC > 1.0 means superscalar execution and speculation are working well. Even if SimPoint clustering picks up this high-IPC interval, the medium-IPC intervals that make up most of the full run pull the average down.

4. Sampling Bias in K-means Clustering

K-means chooses representative points so as to minimize Euclidean distance in BBV space. Since a BBV is a vector of the execution counts of each basic block, intervals containing frequently executed basic blocks are likely to be judged "representative."

Even an interval that runs for a long time, if its BBV is simple (for example, a compute-intensive loop whose body consists of only one or two basic blocks), is unlikely to become an independent interval in terms of Euclidean distance, so representative points may end up concentrated there.


Characteristics of 403.gcc

403.gcc is a C compiler, and subcmd=1 compiles a C source file called 166.i. A compiler switches through different kinds of processing one after another: the parsing phases (lexical analysis, syntax analysis, semantic analysis), the optimization phases, and the code generation phases. The data structures and access patterns used in each phase are completely different, so BBV space is widely dispersed.

Even if SimPoint picks one or two intervals from each phase, the transitions between phases and the initial accesses with a cold cache have a large effect on the average IPC, which is what makes compiler-type benchmarks difficult.


This is an English translation of the original Japanese post: SimPoint の IPC 推定はどれくらい正確か — 403.gcc フルランと比較した