Skip to content

feat(gapbs): size per-case trial counts to a runtime target#27

Merged
eastonman merged 1 commit into
mainfrom
feat-gapbs-trial-calibration
Jul 12, 2026
Merged

feat(gapbs): size per-case trial counts to a runtime target#27
eastonman merged 1 commit into
mainfrom
feat-gapbs-trial-calibration

Conversation

@eastonman

Copy link
Copy Markdown
Member

What

Size the per-case trial count of the source-dependent GAPBS kernels
(bfs, sssp, bc) to a common runtime target, instead of always running a
single trial. Source-independent kernels (pr, cc, tc) stay at one trial.

Why

bfs, sssp, and bc pick a fresh random source on each trial, so running
more trials samples more sources and makes a case more representative. pr,
cc, and tc repeat identical work every trial, so extra trials add cost with
no coverage. A fixed -n 1 therefore under-samples the cheap source-dependent
cases and would over-spend if bumped uniformly.

How

gapbs-package.py gains a num_trials(kernel, graph) helper. For the
source-dependent kernels it derives the count from measured single-trial guest
runtimes (_TRIAL_CALIB: graph-load "Read Time" + one-kernel "Trial Time") so
each case runs for roughly TARGET_TRIAL_SECONDS (default 800 s, capped at
MAX_TRIALS). Cheap cases get many trials, expensive ones stay at one:

kernel road twitter web
bfs 33 13 2
sssp 39 2 1
bc 26 2 1

TARGET_TRIAL_SECONDS is the single knob to trade source coverage against cost.
README.md documents the behaviour and the resulting table.

Scope

Two files, workloads/linux/gapbs/{README.md, gapbs-package.py}. No change to
build.sh, rules.mk, the graph source pin, or any other workload. Below
4 GiB nothing else is affected. Builds on the merged gapbs workload family
(#26).

bfs, sssp, and bc pick a fresh random source each trial, so more trials
sample more sources; pr, cc, and tc repeat identical work regardless. Size
the trial count of the source-dependent kernels per case from measured
single-trial guest runtimes, so each such case runs for roughly
TARGET_TRIAL_SECONDS -- cheap cases (bfs/road) get many trials, expensive
ones (sssp/web) stay at one. Source-independent kernels remain single-trial.
This trades source coverage against cost through one tunable target.

Assisted-by: Claude Opus 4.8
@eastonman
eastonman requested review from poemonsense and rezado July 10, 2026 09:15
@poemonsense

Copy link
Copy Markdown
Member

Don't know the details but please feel free to merge it

@eastonman

Copy link
Copy Markdown
Member Author

Just increasing loop count (trials) for some smaller kernel to avoid running too few instructions.

@eastonman
eastonman merged commit 1936cc5 into main Jul 12, 2026
2 checks passed
@eastonman
eastonman deleted the feat-gapbs-trial-calibration branch July 12, 2026 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants