Skip to content

Repository files navigation

GPGPU-Sim Sensitivity Study — GTX480 Baseline

This project evaluates sensitivity of L1 data cache size, L2 cache size, memory bandwidth (via DRAM bus width), and warp scheduler on six GPGPU-Sim benchmarks:

  • JPEG
  • BFS
  • SLA
  • SCP
  • TRA
  • LPS

Benchmarks and default commands

  • JPEG: ./gpgpu_ptx_sim__JPEG --decode --file=./cameraman.bmp > out.txt
  • BFS: ./gpgpu_ptx_sim__BFS ./graph65536.txt > out.txt
  • SLA: ./gpgpu_ptx_sim__SLA --n=300000 > out.txt
  • SCP: ./gpgpu_ptx_sim__SCP --vector_n=4096 --element_n=4096 > out.txt
  • TRA: ./gpgpu_ptx_sim__TRA --size_x=1024 --size_y=1024 > out.txt
  • LPS: ./gpgpu_ptx_sim__LPS --nx=256 --ny=256 --nz=256 > out.txt

Tip: disable power modeling to avoid unnecessary logs: set -power_simulation_enabled 0 in your config.

Study knobs

  1. L1D size: 16KB (default), 0.5×, 2×, 4×, 8×
  2. L2 size: 768KB (default), 0.5×, 2×, 4×, 8×
  3. Memory bandwidth: 177.6 GB/s (default), 0.25×, 0.5×, 2×, 4× (modify DRAM bus width)
  4. Warp schedulers: GTO (default), LRR, TwoLevel

Baseline is GTX480 config. Use the last kernel stats if multiple kernels run.

If a run takes > 24 hours on your machine, you may reduce input sizes but target at least 1 hour runtime for stability.

Directory layout

gpgpusim_sensitivity_study/
  configs/          # put your GTX480 baseline config files here (one per benchmark)
  scripts/
    gen_variants.sh # create study variants by cloning + tweaking baseline configs
    run_all.sh      # run everything in parallel (resume-safe)
    parse_stats.py  # harvest IPC, miss rates, and bandwidth
    make_plots.py   # normalize vs baseline and create graphs
  results/          # parsed CSVs and generated plots

How to use

  1. Drop baseline configs (GTX480) into configs/ as:

    • JPEG/gpgpusim.config
    • BFS/gpgpusim.config
    • SLA/gpgpusim.config
    • SCP/gpgpusim.config
    • TRA/gpgpusim.config
    • LPS/gpgpusim.config

    Ensure each directory also contains the compiled benchmark binary and its inputs.

  2. Generate variants

cd scripts
bash gen_variants.sh ..

This creates clones of each benchmark directory with a naming scheme like:

<Bench>/baseline
<Bench>/L1D_x0.5
<Bench>/L1D_x2
<Bench>/L1D_x4
<Bench>/L1D_x8
<Bench>/L2_x0.5
...
<Bench>/BW_x4
<Bench>/SCHED_LRR
<Bench>/SCHED_TwoLevel
  1. Run all experiments (parallelized)
JOBS=8 bash run_all.sh ..
  1. Parse and plot
python3 parse_stats.py ..
python3 make_plots.py ..

Normalized CSVs and PNGs will be emitted in results/.

Notes on config fields

These scripts search-and-replace typical GPGPU-Sim fields. Depending on your local config format, you might need to tweak the patterns inside gen_variants.sh:

  • L1D: -gpgpu_cache:dl1 line; size scales with associativity (“ways”).
  • L2 : -gpgpu_cache:dl2 line; size scales with associativity or capacity field.
  • Bandwidth: -gpgpu_dram_buswidth (bits). We scale relative to baseline.
  • Scheduler: -gpgpu_scheduler with values gto, lrr, or two_level.

Verify your config keys with grep -n before running the generator.


🧩 Unified Benchmark Runner: run_parametric_bench.sh

This script generalizes your original BFS runner to any benchmark and provides resume, dry-run, and parallel execution features.

What it does

  • Recursively searches for directories matching a given benchmark name (e.g., BFS, JPEG).
  • Runs the specified GPGPU-Sim binary inside each directory using a flexible command template.
  • Supports:
    • .done files for resume
    • configurable concurrency (--jobs)
    • input file validation
    • custom stdout/stderr redirection
    • dry-run preview mode

Usage

./run_parametric_bench.sh [options]
  --root PATH           Root directory to search (default: My_BFS_All_Studies_Run)
  --match-name NAME     Directory name to match (default: BFS)
  --exe PATH            Executable path (relative to each directory)
  --input FILE          Optional input file (set empty '' to disable)
  --args STRING         Command template; '{}' is replaced with executable (default: "{}")
  --out FILE            Stdout file (default: out.txt)
  --err FILE            Stderr file (default: err.txt)
  --jobs N              Parallel jobs (default: # of CPUs)
  --skip-done 0|1       Skip if .done exists (default: 1)
  --dry-run 0|1         Show commands without running (default: 0)
  --help                Show this help

Examples

Run BFS benchmarks (same as your original script):

./run_parametric_bench.sh   --root My_BFS_All_Studies_Run   --match-name BFS   --exe ./gpgpu_ptx_sim__BFS   --input graph65536.txt   --args '{} ./graph65536.txt'   --jobs 8

Run JPEG:

./run_parametric_bench.sh   --root My_JPEG_Runs   --match-name JPEG   --exe ./gpgpu_ptx_sim__JPEG   --args '{} --decode --file=./cameraman.bmp'

Run SLA:

./run_parametric_bench.sh   --root My_SLA_Runs   --match-name SLA   --exe ./gpgpu_ptx_sim__SLA   --input ''   --args '{} --n=300000'

Run SCP:

./run_parametric_bench.sh   --root My_SCP_Runs   --match-name SCP   --exe ./gpgpu_ptx_sim__SCP   --args '{} --vector_n=4096 --element_n=4096'

Run TRA:

./run_parametric_bench.sh   --root My_TRA_Runs   --match-name TRA   --exe ./gpgpu_ptx_sim__TRA   --args '{} --size_x=1024 --size_y=1024'

Run LPS:

./run_parametric_bench.sh   --root My_LPS_Runs   --match-name LPS   --exe ./gpgpu_ptx_sim__LPS   --args '{} --nx=256 --ny=256 --nz=256'

Tips

  • Use --dry-run 1 to preview commands without running.
  • Use .done files to resume large studies safely.
  • Works with any benchmark folder layout (e.g., from gen_variants.sh).

About

This project evaluates sensitivity of L1 data cache size, L2 cache size, memory bandwidth (via DRAM bus width), and warp scheduler on six GPGPU-Sim benchmarks.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages