Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
721b096
deps: bump competitor submodules to stable releases
vkutuev Nov 27, 2026
791b146
deps: bump graphblas to v10.5.3 (LaGraph v1.2.2 needs >= v10.0.0)
vkutuev Nov 27, 2026
4593f28
build(gunrock): add --tests flag and clarify --extra-cmake usage
vkutuev Nov 27, 2026
91d6dfe
remove graphblast tool (incompatible with modern CUDA)
vkutuev Nov 27, 2026
50b7aa0
fix(gunrock): patch v2.2.0 device-atomic regression (breaks NVIDIA)
vkutuev Nov 27, 2026
9cb41ce
feat(results): multi-host results pipeline (hosts.json + runs.jsonl)
vkutuev Dec 3, 2026
9044c98
fix(gunrock): adapt the driver to gunrock v2.x
vkutuev Dec 3, 2026
862fd2d
data(results): smoke bench records for 5 hosts
vkutuev Dec 3, 2026
80c052e
feat(dashboard): render ECharts results dashboard with filters and tabs
vkutuev Dec 3, 2026
d102c04
feat(results): support PoCL CPU devices in the spla pipeline
vkutuev Dec 3, 2026
8c48d40
feat(dataset): add 1138_bus, bcsstk08, bcsstk33
vkutuev Dec 3, 2026
a775f6a
feat(scripts): dataset prep, verification, merge, summarize
vkutuev Dec 3, 2026
4e4c0a6
feat(ci): validate results on PR, render dashboard on main
vkutuev Dec 3, 2026
f06bc07
chore: ignore dataset.zip, mock dataset, per-host result files
vkutuev Dec 3, 2026
4acb69c
fix(merge): dedupe superseded records (prefer ok, then latest ts)
vkutuev Dec 3, 2026
a3854d1
data(results): final merged benchmark results + figures
vkutuev Dec 3, 2026
8c50ca2
chore(results): publish-safe host names, sanitized error paths
vkutuev Dec 3, 2026
ce84c8e
feat(dashboard): host RAM in registry + Hosts panel, chart fixes
vkutuev Dec 3, 2026
7f94321
feat(figures): --formats option for vector PDF output
vkutuev Dec 3, 2026
6174833
docs(readme): document patches, verification, results, host fields
vkutuev Dec 3, 2026
883a6c8
chore(results): drop i7-6700-gtx1070 host (no records)
vkutuev Dec 3, 2026
6249a7c
feat(results): decouple device id from display label
vkutuev Dec 3, 2026
f14bb9a
ci: deploy dashboard to GitHub Pages on push to main
vkutuev Dec 3, 2026
790408d
docs: add AGENTS.md entry point for AI agents
vkutuev Dec 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions .github/workflows/dashboard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Results pipeline CI.
#
# pull_request -> validate results/ (hosts.json + runs.jsonl)
# push main -> validate, build dashboard/index.html, upload it as
# an Actions artifact, and deploy it to GitHub Pages
# workflow_dispatch -> same as push main (manual re-deploy)
#
# Both scripts are pure-stdlib Python; no pip installs needed.
#
# GitHub Pages: set Settings -> Pages -> Build and deployment -> Source to
# "GitHub Actions" so this workflow can deploy (actions/deploy-pages).

name: dashboard

on:
pull_request:
push:
branches: [main]
workflow_dispatch:

# Allow the GITHUB_TOKEN to deploy to GitHub Pages.
permissions:
contents: read
pages: write
id-token: write

# One concurrent Pages deployment; queue (don't cancel) in-flight deploys.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Validate results
run: python3 scripts/validate.py

dashboard:
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
needs: validate
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Render dashboard
run: python3 scripts/render_dashboard.py
- name: Upload dashboard artifact
uses: actions/upload-artifact@v4
with:
name: dashboard
path: dashboard/index.html
if-no-files-found: error
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: dashboard
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,12 @@
/dataset/*
!/dataset/instructions.txt
/**/*.csv
/**/*.pdf
/**/*.pdf
/dashboard/
# large canonical dataset archive (kept per-host, never committed)
/dataset.zip
# mock smoke graphs: regenerable via scripts/gen_smoke_graphs.py (SEED=42)
/dataset-mock/
# per-host working files for the final benchmark; the merged
# results/runs.jsonl is the canonical committed artifact
/results/runs_*_final.jsonl
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "deps/graphblast"]
path = deps/graphblast
url = https://github.com/gunrock/graphblast.git
[submodule "deps/gunrock"]
path = deps/gunrock
url = https://github.com/gunrock/gunrock.git
Expand Down
199 changes: 199 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,199 @@
# AGENTS.md — graph-bench

Entry point for AI agents working on this repository. Read this first, then
[README.md](README.md) for the full, detailed workflow.

## What this is

A **reproducible, cross-hardware benchmark** of three graph-analysis
frameworks — **spla** (OpenCL; runs on GPUs *and* PoCL CPU), **Gunrock**
(CUDA/HIP; NVIDIA/AMD GPUs), and **LAGraph** (SuiteSparse:GraphBLAS, OpenMP;
the CPU baseline) — across four diverse hosts (x86-64 Intel, x86-64 AMD, and a
RISC-V board). It measures four algorithms (**bfs, sssp, pr, tc**) on 18
real-world sparse graphs.

Outputs:
- `results/runs.jsonl` — the canonical append-only results dataset (one JSON
record per tool × algo × graph × device × host).
- `results/hosts.json` — the host/device registry.
- `dashboard/index.html` — a self-contained interactive ECharts dashboard
(generated; deployed to GitHub Pages by CI).
- `docs/figures/` — three static publication figures (generated).

The pipeline is **data-driven**: the dashboard and figures derive everything
(hosts, devices, tools, algorithms, graphs) from the data files, so adding new
hardware needs **no code changes** — just new records.

## Repo layout

| Path | What it is |
|---|---|
| `scripts/` | The whole pipeline (Python + a few shell ops scripts). |
| `results/hosts.json` | Host/device registry (committed). |
| `results/runs.jsonl` | Canonical results records (committed). |
| `results/runs_*_final.jsonl` | Per-host working files (**gitignored**). |
| `dataset/` | Graph matrices `.mtx` + converted `.conv` (**gitignored** except `instructions.txt`). |
| `dataset.zip` | Canonical dataset archive, ~8.7 GB (**gitignored**). |
| `dataset-mock/` | Regenerable synthetic smoke graphs (**gitignored**). |
| `deps/` | Four git submodules: `spla`, `gunrock`, `lagraph`, `graphblas`. |
| `patches/` | Local modifications to the submodules (applied with `patch -p1`). |
| `metafiles/dataset.json` | Per-graph metadata (sizes, degree stats). |
| `docs/` | `figures/` — static publication figures (generated). |
| `dashboard/` | Generated dashboard (**gitignored**). |
| `.github/workflows/dashboard.yml` | CI: validate on PR; build + deploy dashboard to Pages on push-main. |

## The pipeline (golden path)

```
1. Build tools python3 scripts/build_spla.py
python3 scripts/build_gunrock.py --backend nvidia|amd
python3 scripts/build_lagraph.py
2. Prepare data python3 scripts/prepare_dataset.py extract # from dataset.zip
python3 scripts/convert.py # .mtx -> .conv (needs spla built)
3. Register host python3 scripts/collect.py --host=<slug> --merge
4. Set display labels python3 scripts/label_devices.py --host=<slug>
5. Run benchmarks python3 scripts/benchmark.py # appends to results/runs.jsonl
6. Verify correctness python3 scripts/verify.py --host <slug> --device <dev> --tool <tool>
7. Validate python3 scripts/validate.py # MUST pass before committing
8. Render python3 scripts/render_dashboard.py # -> dashboard/index.html
python3 scripts/render_figures.py # -> docs/figures/
```

See [README.md](README.md) §1–§6 for the full workflow.

## Data model

### `results/hosts.json` — the registry
`{"hosts": [ ... ]}`. Each host:
- `id` — a **hardware slug** (e.g. `ryzen-v100`), the key used everywhere.
**Publish-safe** (no personal info).
- `os`, `cpu` — auto-detected, refreshed on merge.
- `ram_gib`, `swap_gib` — curated.
- `devices` — list of device entries (below).
- `tools` — map `tool → version` for the tools built on that host.

Each device:
- `id` — the **stable key** all scripts key off (`host-cpu`, `pocl-cpu`, `v100`,
`vega8`, `irisxe`, `rx6750xt`, `powervr`). Deterministic: PoCL→`pocl-cpu`,
then a small alias table, else a slug of the name.
- `name` — the raw vendor string (provenance).
- `label` — the **human-readable display name** (dashboard/figures).
**Display-only** — scripts key off `id`, never `label`. Set by
`label_devices.py`.
- `vendor` (nvidia/amd/intel/img/unknown), `type` (cpu/gpu), `form_factor`
(integrated/discrete), `mobile`, `memory_gb`.
- `cores` — count of the GPU's **smallest shader unit** (CUDA cores, AMD SPs,
Intel EU×8). Used to normalize throughput (nnz/s/core).
- `opencl` — `{platform, device}` indices **as seen by spla's embedded ICD
loader** (authoritative; `clinfo` order is NOT reliable). Absent on
`host-cpu`.

Display resolution order everywhere: `label ?? name ?? id`.

### `results/runs.jsonl` — the records
One JSON object per line:
```json
{"ts":"...","host":"...","device":"...","tool":"spla|gunrock|lagraph","tool_version":"...",
"algo":"bfs|sssp|pr|tc","graph":"...","params":{...},"status":"ok|error",
"warmup_ms":0.0,"avg_ms":0.0,"sd_ms":0.0,"min_ms":0.0,"max_ms":0.0}
```
- `status:"ok"` → the five `*_ms` fields (mean of 10 timed iterations after 1
warmup).
- `status:"error"` → an `error` message instead of timings (honest hardware
limits, not software bugs).
- **Append-only.** Consumers resolve duplicates by **latest `ts` per
`(host, device, tool, algo, graph)`**; `merge_final.py` dedupes preferring
`ok` over a later error (a transient failure never discards a good record).

## Conventions

- **Commits:** Conventional Commits — `type(scope): imperative summary`
(≤72 chars, no trailing period). Types in use: `feat`, `fix`, `chore`,
`docs`, `refactor`, `style`, `build`, `ci`, and a **custom `data`** type for
committing result records. Multi-line bodies with bullets for significant
changes.
- **Publish-safe naming:** host ids are hardware slugs, never local
hostnames/usernames. No `/home/...` paths or usernames in any committed
file — use `~/...` in error text. `hostname` is dropped from the registry on
merge.
- **Validate before committing:** `python3 scripts/validate.py` must pass (it
also runs in CI on every PR).
- **Generated files are never hand-edited:** `dashboard/`, `docs/figures/*`,
and the merged `results/runs.jsonl` are produced by scripts.

## Critical gotchas (read before touching `deps/` or `results/`)

1. **Submodules are pinned upstream and never edited in place.** All local
changes live in `patches/`. The working tree is *supposed* to show dirty
submodules (`git status` → `m deps/gunrock`, `m deps/lagraph`,
`m deps/spla`) because the patches are applied — **do not** "clean" this
with `git checkout` / `git submodule update`; that removes the
instrumentation and the Gunrock bug fix. To change a tool, write a patch in
`patches/`.
2. **Patch application is split.** Only `gunrock-v2.2.0-atomic-fix.patch` is
auto-applied (by `build_gunrock.py`, idempotent). The three verification
patches (`spla-answer-dump`, `gunrock-answer-dump`, `lagraph-answer-check`)
are applied **on demand** for verify builds (`lagraph_verify.sh` automates
the LAGraph one).
3. **OpenCL platform indices are unstable.** spla statically links its own ICD
loader, which enumerates vendor `.icd` files in raw `readdir()` order — this
differs from `clinfo -l` (alphabetical) and can change between runs. A stale
`opencl.platform/device` in `hosts.json` silently runs on the wrong device.
**Never trust `clinfo` for spla** — use `python3 scripts/discover_opencl.py
--audit` and fix `hosts.json`. `benchmark.py` hard-exits on a verified
mismatch.
4. **Gunrock build-dir mismatch.** `build_gunrock.py` builds into
`deps/gunrock/build`, but `driver_gunrock.py`/`verify.py` look in
`deps/gunrock/build-<backend>/bin`. Reconcile (rename the dir) after
building.
5. **LAGraph build dir + CMake cache.** The driver hardcodes
`deps/lagraph/build_git/src/benchmark` (use `build_lagraph.py`'s default
`--gb_build` to get `build_git`). The CMake cache encodes the source dir; if
the tree moves, `rm -f CMakeCache.txt` before reconfiguring.
6. **Two input formats.** spla reads the raw 0-based `.mtx`; Gunrock and
LAGraph read the 1-based `.conv` edge list (produced by spla's `convert`).
Building spla is a prerequisite for dataset prep.
7. **Memory hazards.** `spla convert` on `twitter7` peaks ~47 GB RAM;
`mycielskian19` ~21.6 GB. Skip infeasible graphs on small hosts (the
error records in `results/runs.jsonl` document which cells were infeasible).
8. **spla is pinned to an untagged main commit** (`b7d2159`, bumped for PoCL
CPU support). Don't "upgrade" it to a tag without understanding the
`pocl_cpu` vendor token used by `opencl_enum.py`/`collect.py`/`benchmark.py`.
9. **Untracked shell scripts** (`zhigul_*.sh`, `streamer_*.sh`,
`milkv_rescue.sh`, `spotcheck_local.sh`) are host-specific incident/recovery
playbooks from the final campaign — prior art, not part of the canonical
pipeline.

### Never commit
`dataset/*` (except `dataset/instructions.txt`), `dataset.zip`,
`dataset-mock/`, `dashboard/`, `results/runs_*_final.jsonl`, any `*.csv` or
`*.pdf`, `__pycache__/`, `a.out`, `.idea/`. (All are in `.gitignore`.)

## CLI quick reference

| Script | Purpose | Key options |
|---|---|---|
| `collect.py` | Survey host → `hosts.json` | `--host <slug>`, `--merge`, `--tool-version TOOL=VER` |
| `label_devices.py` | Set display `label`s | `--host <id>` / `--all`, `--label ID=TEXT`, `--force`, `--yes` |
| `benchmark.py` | Run benchmarks → `runs.jsonl` | `--host`, `--device`, `--algo`, `--tool`, `--graph`, `--num-iterations`, `--source`, `--out` |
| `verify.py` | Correctness self-checks | `--host`, `--device`, `--tool`, `--algo`, `--graph`, `--niters` (default 1) |
| `validate.py` | Schema/consistency check | `--hosts`, `--runs` |
| `render_dashboard.py` | → `dashboard/index.html` | (none) |
| `render_figures.py` | → `docs/figures/` | `--outdir`, `--host` (default `ryzen-v100`), `--formats png,pdf` |
| `prepare_dataset.py` | Materialize dataset from `dataset.zip` | `extract` / `convert` / `clean` / `status` |
| `convert.py` | `.mtx` → `.conv` (via spla) | `--statsonly` |
| `build_spla.py` / `build_gunrock.py` / `build_lagraph.py` | Build the tools | see each `-h` |
| `discover_opencl.py` | Audit the OpenCL mapping | `--audit`, `--host` |
| `merge_final.py` | Merge per-host files → canonical `runs.jsonl` | `--skip-render` |

Env overrides: `BENCH_DRIVER_SPLA` / `BENCH_DRIVER_LAGRAPH` redirect the
executable dirs; `TMPDIR` for hosts whose `/tmp` is too small for Gunrock's
temp symmetric MTX.

## Where to look
- **[README.md](README.md)** — the full workflow (build → data → register →
benchmark → verify → contribute) and the patch table.
- **`dashboard/index.html`** (generated) — the live view of all results;
rebuild locally with `python3 scripts/render_dashboard.py`.
- **`scripts/opencl_enum.py`** (module docstring) — the **platform-index
gotcha**: why `clinfo`'s ordering is not what spla sees.
Loading
Loading