timeline — Claude Code skill: GPU profiling and installation
This Claude Code skill traces where a GPU kernel spends time. It turns .ncu-rep data into timelines and counts cycles for marked kernel segments.
Apache-2.0 ★ 339 updated 2026-11-11
~/.claude/skills/timeline/SKILL.mdWhat timeline does
The skill examines GPU kernel timing in two ways. pm_timeline_tools.py and pm_timeline_run.py turn .ncu-rep data into downsampled series and a phase summary covering ramp, plateau, and drain. The runner fixes the collection recipe; its example uses --interval 2048 for kernels under 0.5 ms.
timeline_probe.py counts cycles by segment and role, then reports which role waited for another. The kernel gets an exact no-op function named _seg; the driver replaces it with %clock64 stamps only in the probe run. The reference kernel stays uninstrumented, and the tree copy must match the harness copy. Run the collector with python3 notes/pm_timeline_run.py.
What it helps with
- break down
.ncu-repdata into time series - summarize kernel time across ramp, plateau, and drain
- count cycles by kernel segment and role
- trace which role waited on another
Example prompts for the agent
- Break down this kernel’s timing from the
.ncu-repprofile. - Count the cycles spent in each segment and role.
- Show the ramp, plateau, and drain phases in this profile.
How to install timeline
Manually: put the files in place
~/.claude/skills/timeline/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/timeline/
Manually: put the files in place
.agents/skills/timeline/SKILL.mdFor all projects use ~/.agents/skills/
Manually: put the files in place
.cursor/skills/timeline/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install OpenBMB/ForgeKernel skills/timeline2Manually: put the files in place
.github/skills/timeline/SKILL.mdPlatform CLI
gemini skills install https://github.com/OpenBMB/ForgeKernel --path skills/timelineManually: put the files in place
.devin/skills/timeline/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about timeline
How do I install timeline in Claude Code?
Place the skill instructions in ~/.claude/skills/timeline/SKILL.md. Other supported platforms use their own paths or install commands.
What does timeline do?
It creates time series and a phase summary from .ncu-rep data, and measures cycles across marked GPU kernel segments and roles.
How does timeline measure individual segments?
Add the exact no-op function _seg to the kernel. The driver replaces it with %clock64 stamps in the probe run only; the reference kernel is left untouched.
Source text
SKILL.md · Apache-2.0
# timeline
When the time leaks, which the per-instruction ledger cannot say (it sums every phase that
touches the same instructions).
- `pm_timeline_tools.py` + `pm_timeline_run.py` -- the PM-sampling timeseries of a
`.ncu-rep` as downsampled per-series timelines and a phase summary (ramp, plateau,
drain), between `=== PM TIMELINE BEGIN ===` / `=== PM TIMELINE END ===`, ending in
`PMTL-OK` or `PMTL-FAIL`. The run script freezes the collection recipe (sampling interval,
launch count, profiling window): `python3 notes/pm_timeline_run.py`, `--interval 2048`
for kernels under 0.5 ms.
- `timeline_probe.py` -- a per-segment clock account of the student's kernel on the GPU.
The student places markers, no-ops in the shipped kernel:
```python
def _seg(site, row=0): # keep this exact no-op definition
return None
```
and the driver rewrites them into `%clock64` stamps in the probe only, then prints cycles
per segment and per role and who waited on whom. The reference is never instrumented.
The tree's copy must equal the harness copy; the driver says so when it does not.
© OpenBMB · Apache-2.0 · OpenBMB/ForgeKernel