Skip to content

About

Benchmarks suite for performance study of various graph analysis frameworks for CPU/GPU computations

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

57 Commits

Folders and files

Repository files navigation

graph-bench

License

Benchmarks suite for performance study of various graph analysis frameworks for CPU/GPU computations.

Tools description

Name Brief Platform Technology Source Page
Spla Generalized linear sparse linear algebra for multi-GPU computation GPU OpenCL link
Gunrock High-performance graph primitives on GPUs GPU CUDA link
LaGraph Collection of graph algorithms for SuiteSparse:GraphBLAS libray CPU OpenMP link

Dataset description

Name Vertices Edges Avg Deg Sd Deg Min Deg Max Deg Link
bcsstk08 1.1K 5.9K 11.1 21.1 0.0 338.0 link
1138_bus 1.1K 1.5K 2.6 1.8 1.0 17.0 link
bcsstk33 8.7K 291.6K 66.7 16.1 19.0 140.0 link
coAuthorsCiteseer 227.3K 1.6M 7.2 10.6 0.0 1372.0 link
mycielskian19 393.2K 903.2M 2296.4 3950.8 0.0 196606.0 link
coPapersDBLP 540.5K 30.5M 56.4 66.2 0.0 3299.0 link
amazon-2008 735.3K 7.0M 9.6 7.6 0.0 1077.0 link
hollywood-2009 1.1M 112.8M 98.9 271.9 0.0 11467.0 link
belgium_osm 1.4M 3.1M 2.2 0.5 0.0 10.0 link
roadNet-CA 2.0M 5.5M 2.8 1.0 0.0 12.0 link
com-Orkut 3.1M 234.4M 76.3 154.8 0.0 33313.0 link
cit-Patents 3.8M 33.0M 8.8 10.5 0.0 793.0 link
rgg_n_2_22_s0 4.2M 60.7M 14.5 3.8 0.0 36.0 link
soc-LiveJournal 4.8M 85.7M 17.7 52.0 0.0 20333.0 link
indochina-2004 7.4M 302.0M 40.7 329.6 0.0 256425.0 link
rgg_n_2_23_s0 8.4M 127.0M 15.1 3.9 0.0 40.0 link
road_central 14.1M 33.9M 2.4 0.9 0.0 8.0 link
twitter7 41.7M 2405.0M 57.7 401.5 0.0 2997490.0 link

Patches

The deps/* submodules are pinned at upstream commits and are never modified in place; all local changes live in patches/:

Patch Purpose Applied
gunrock-v2.2.0-atomic-fix.patch Bug fix: gunrock v2.2.0 atomic-add loses the CUDA path automatically by scripts/build_gunrock.py
spla-answer-dump.patch Verification: spla examples dump their answers on demand, for verify builds
gunrock-answer-dump.patch Verification: gunrock BFS dumps its answer on demand, for verify builds
lagraph-answer-check.patch Verification: enables LG_CHECK_RESULT=1 + answer dump/check in the LAGraph demos on demand (e.g. scripts/lagraph_verify.sh)

Instructions

1. How to get source code

Download benchmark repository source code.

git clone https://github.com/EgorOrachyov/graph-bench.git

Within repo folder init git submodule to get all source code of tools.

git submodule update --init --recursive

2. How to build tools

2.1 Spla

Build bundled Spla library.

python3 scripts/build_spla.py

2.2 Gunrock

Build bundled Gunrock library. The build automatically applies patches/gunrock-v2.2.0-atomic-fix.patch (see Patches).

python3 scripts/build_gunrock.py

2.3 LaGraph

Build bundled SuiteSparse and LaGraph libraries.

python3 scripts/build_lagraph.py

3. How to download data

Download all graphs one by one archives and extract into dataset folder. Alternatively, download all graphs within single archive from Google Drive.

4. How to prepare data

After dataset unpack into dataset folder you have to run convert tool to prepare graphs.

python3 scripts/convert.py

This tool uses spla convert.exe to convert source .mtx files into undirected .mtx graphs.

5. How to run benchmarks

Benchmarks are recorded per host and per device. The registry of known hosts and devices lives in results/hosts.json; measurements are appended to results/runs.jsonl (one JSON record per tool × algorithm × graph run, with host/device metadata and avg/sd/min/max timings).

Host entries carry an id (a hardware slug, e.g. ryzen-v100), os, cpu, ram_gib (and swap_gib where known), the device list, and per-tool versions. Device entries carry optional attributes: vendor (nvidia/amd/intel/img/unknown), type (cpu/gpu), form_factor (integrated/discrete, GPU only), mobile (bool, discrete GPUs only), memory_gb, cores, and label. cores is the count of the smallest shader unit of the GPU (CUDA cores, AMD SPs, Intel EU×8 ALUs, ...), the same convention as the original benchmark figures — it is used to normalize throughput (nnz/s/core). label is the human-readable name shown by the dashboard and figures (set by scripts/label_devices.py); scripts key off the device id, so labels are display-only and never affect the results.

5.1 Register your host

On the machine you want to benchmark, run the host survey. It detects the OS, CPU, OpenCL platforms/devices and tool versions. OpenCL indices are taken from the spla binary's own ICD loader (authoritative — clinfo's alphabetical ordering is not what applications see); audit them with python3 scripts/discover_opencl.py --audit:

python3 scripts/collect.py            # print the detected host entry
python3 scripts/collect.py --merge    # merge it into results/hosts.json

Device ids are assigned deterministically: a small alias table maps known GPUs to short stable ids (v100, vega8, irisxe, ...), and unknown devices fall back to a slug of the vendor name. The host id is the --host value (default: this machine's hostname) — pass a publish-safe slug, e.g. --host=i5-irisxe. Re-running --merge is idempotent: curated device ids are kept, names and versions are refreshed.

Once the host is registered, set display labels for its devices — the human-readable names shown by the dashboard and figures. This step is hardware-independent (it edits the registry, not the hardware), so it can be run from any machine:

python3 scripts/label_devices.py --host=<id>        # interactive
python3 scripts/label_devices.py --all --yes        # fill derived defaults

Review the merged entry (device ids, labels, tool versions) before committing.

5.2 Run benchmarks

Run all algorithms & graphs & tools on all devices of this host.

python3 scripts/benchmark.py

Select particular devices (comma separated, no space).

python3 scripts/benchmark.py --device=v100,pocl-cpu

Run particular tool for performance measurements. Use comma and no space to select multiple.

python3 scripts/benchmark.py --tool=[all, spla, lagraph, gunrock]

Run particular algorithm for performance measurements. Use comma and no space to select multiple.

python3 scripts/benchmark.py --algo=[all, bfs, sssp, pr, tc]

Run particular graphs. Small synthetic mock graphs (synth1k, synth10k, synth100k) are generated by scripts/gen_smoke_graphs.py for quick smoke runs.

python3 scripts/benchmark.py --graph=synth1k,synth10k,synth100k

Results are appended to results/runs.jsonl (override the target with --out). Validate the results before committing:

python3 scripts/validate.py

See help for more options.

python3 scripts/benchmark.py -h

5.3 Verify correctness

Timings are only meaningful if the answers are right. scripts/verify.py runs each tool's built-in CPU-reference self-checks and reports PASS/FAIL:

python3 scripts/verify.py --host <host-id> --device <device> --tool <tool>
  • spla — the examples always compute a naive CPU reference and compare (CHECK acc / VERIFY: lines).
  • gunrock — --validate (GPU vs its own CPU reference).
  • lagraph — built-in LG_check_* checks; requires a build with LG_CHECK_RESULT=1 (apply patches/lagraph-answer-check.patch, see scripts/lagraph_verify.sh). PageRank is checked sink-aware: LAGraph's GAP method ignores sinks, so the expected rank sum is 1 − d·N/n when the graph has isolated vertices.

Small-graph spot checks additionally compare answer dumps against the pure-Python reference (scripts/reference.py).

6. Contributing results

To add results from your own hardware:

  1. Build the tools on your machine (steps 2.1–2.3).
  2. Register the host: python3 scripts/collect.py --merge.
  3. Set device labels: python3 scripts/label_devices.py --host=<id>.
  4. Run the benchmarks: python3 scripts/benchmark.py.
  5. Validate: python3 scripts/validate.py.
  6. Commit results/hosts.json + results/runs.jsonl and open a pull request.

CI validates the results on the PR and, on merge, rebuilds the dashboard and deploys it to GitHub Pages (also uploaded as a GitHub Actions artifact). To render the dashboard locally:

python3 scripts/render_dashboard.py   # -> dashboard/index.html (self-contained)

The dashboard derives everything (hosts, devices, tools, algorithms, graphs) from the data, so new hardware needs no code changes. Its Data tab shows a Hosts panel (OS, CPU, RAM, GPUs per host) alongside the raw records.

Results

The live view of all results is the interactive dashboard (see Contributing results): it derives hosts, devices, tools, algorithms and graphs from results/ and is rebuilt by CI on every merge.

Static figures (spla-README style, all sharing the same 9-graph set) live in docs/figures/ and are regenerated deterministically:

python3 scripts/render_figures.py                # PNG (150 dpi)
python3 scripts/render_figures.py --formats pdf  # vector PDF (for LaTeX)
Figure Shows
nvidia_comparison spla (PoCL/CPU), spla (V100) and gunrock (V100) vs the LAGraph-on-CPU baseline, per algorithm
gpu_scalability spla throughput in edges/s per smallest shader unit on all five GPUs, per algorithm
igpu_comparison spla on three integrated GPUs (Vega 8, Iris Xe, PowerVR) vs LAGraph on each iGPU's own host CPU, per algorithm

License

This project licensed under MIT License. License text can be found in the license file.

About

Benchmarks suite for performance study of various graph analysis frameworks for CPU/GPU computations

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages