Skip to content

Concurrent kernel workstreams: shared GPU, merge, and journaling protocols #53

Description

@superposition

Concurrent kernel workstreams

Start with the committed map: docs/research/parallel-tracks-handoff.md (PR #60) — the tracks, their lanes, the contended resources, the current numbers, the ranked gaps and the environment. This issue is the index and the place to claim a namespace; the map is the explanation.

Several agents work in this repository at the same time. This issue is the shared index: who is working where, the rules that keep measurements valid, and what is waiting to be published. Update it when a workstream starts, merges, or changes hands.

Workstreams

Workstream Where State
Rust kernel optimisation feat/layernorm-row-registers (#52, merged), feat/matmul-cp-async-pipeline (#49, merged) active
Closed measurement loop over generated variants feat/evolution-loop (#48 merged); open PRs #50 (field note), #51 active
Publication (field notes, journal, figures) #45 (mage-002), #46/#47 (mage-003), #50 (mage-005, in review) active
cuTile Rust track feat/cutile-rust (#55, merged as 3fa9da8) — published mage-004 active

Protocols

Shared GPU. One agent measures at a time. Check before and after every measurement run:

nvidia-smi --query-gpu=utilization.gpu,power.draw --format=csv,noheader

Sustained utilisation above ~30% or power above ~100 W with no measurement of your own running means someone else is on the GPU, and any timing taken then is contention noise rather than a result. Timings from a contended run have already produced a wrong "win" once (a kernel that was faster only because it computed the wrong answer). Build in your own worktree; never rebuild over another agent's binary.

Merge. Never merge by assumed PR number. Read the PR, compare its head commit with your own, then merge with the guard:

gh pr view <n> --repo superposition/mage --json number,title,headRefName,headRefOid
gh pr merge <n> --repo superposition/mage --squash --match-head-commit <headRefOid>

PR #48 (the evolution loop) was merged this way by mistake — the number was assumed, and the guard was fed the wrong PR's head, so it validated the wrong PR. Nothing broke, but the check above is now mandatory.

Namespaces. A stage record claims its number, its docs/assets/results/mage-00N/ and docs/assets/figures/mage-00N/ directories, its field note and its index entry, and a blog experiment_id. Claim it here, then re-check master immediately before publishing: PR #55 published mage-004 while a claim from this issue said 004 was free, and the stage record then prepared against it had to be renumbered to mage-006. Cheapest check:

gh api repos/superposition/mage/contents/docs/experiments --jq '.[].name'

Journal. Each stage of measured work lands as a field note plus a journal entry with figures, under its own result namespace (docs/assets/results/mage-00N/, figures in docs/assets/figures/mage-00N/). The PR body carries the numbers, the method, and the rejected variants with their metric named (kernel time from Nsight Systems versus the CUDA-event span from the binary's own timing). A record describes the revision it measured and states that later changes are not part of it.

Journal status

Record Covers State
mage-001 first three-way comparison published
mage-002 4x4 register tiling, warp-per-row layer norm published (#45)
mage-003 quad shared reads, 64-deep K step, two-warp layer norm published (#46)
mage-004 cp.async pipeline (#49) and the Triton-shaped layer norm (#52) not published — claimed
mage-005 closed measurement loop in review (#50)

Open gaps

Gap Issue
LayerNorm, harness shape [4096,768]: 7-10% behind Triton's kernel, shape-specific #54
LayerNorm wide rows [4096,4096]: 1.41x behind, falls back to the older kernel #54
Bias + GELU and neighbor aggregation: original kernels, 1.4-1.7x behind Triton #59

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    protocol:shared-gpuRules for measuring on the shared GPUworkstream:kernelsRust kernel optimisation track (main agent) — evidence in PRs, stage records in field notes

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions