feat(gapbs): size per-case trial counts to a runtime target#27
Merged
Conversation
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
poemonsense
approved these changes
Jul 12, 2026
Member
|
Don't know the details but please feel free to merge it |
Member
Author
|
Just increasing loop count (trials) for some smaller kernel to avoid running too few instructions. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 asingle trial. Source-independent kernels (
pr,cc,tc) stay at one trial.Why
bfs,sssp, andbcpick a fresh random source on each trial, so runningmore trials samples more sources and makes a case more representative.
pr,cc, andtcrepeat identical work every trial, so extra trials add cost withno coverage. A fixed
-n 1therefore under-samples the cheap source-dependentcases and would over-spend if bumped uniformly.
How
gapbs-package.pygains anum_trials(kernel, graph)helper. For thesource-dependent kernels it derives the count from measured single-trial guest
runtimes (
_TRIAL_CALIB: graph-load "Read Time" + one-kernel "Trial Time") soeach case runs for roughly
TARGET_TRIAL_SECONDS(default 800 s, capped atMAX_TRIALS). Cheap cases get many trials, expensive ones stay at one:TARGET_TRIAL_SECONDSis the single knob to trade source coverage against cost.README.mddocuments the behaviour and the resulting table.Scope
Two files,
workloads/linux/gapbs/{README.md, gapbs-package.py}. No change tobuild.sh,rules.mk, the graphsourcepin, or any other workload. Below4 GiB nothing else is affected. Builds on the merged gapbs workload family
(#26).