Archived
scripts/cardclock.py: what holds each card's clock under a sustained load, and which card the step waits for
A tensor-parallel step ends when its slowest rank does, and under a sustained load the firmware picks each card's clock: the power limit, a temperature or current limit, or the top of the card's voltage/frequency curve. The same image then reads several percent apart from one boot to the next, depending on which card heats first and how hard its limit bites. cardclock.py reads every AMD card's gpu_metrics table ten times a second (read-only, no root) and counts a throttler bit only when the clock is lower while it is set -- some firmware keeps a bit on at idle -- then names the card the step waits for, what holds it, and the setting that addresses it. The engine's own step counters sit beside it per window, so a slow window is attributed (slower steps, fewer tokens per step, host time between steps) before anyone tunes a card. It drives its own greedy load, or with --watch only samples a server that real traffic is driving; --compare puts two saved runs side by side.
This commit is contained in:
1 parent
7c0bd03841
commit
a97985e7c2
3 files changed
+387
-1
No files matched your search
+16
-1
@@ -525,7 +525,7 @@ need nothing but `curl` and `jq`. Scripts resolve each other by `$(dirname "$0")
|
||||
it is on. `oracle.sh` starts its own server and stops whatever listens on its port (`P`, default
|
||||
8302). Everything else — `cstep2.sh`, `ident.sh`, `tierident.sh`, `tiercross.sh`, `mctools.sh`,
|
||||
`mcstream.sh`, `hfget.sh`, `convfn.sh`, `convdspark.sh`, `fnpf.sh`, `fnconc.sh`, `fndrop.sh`,
|
||||
`apikeys.sh`, `diskstall.py` — leaves a live serve alone.
|
||||
`apikeys.sh`, `diskstall.py`, `cardclock.py` — leaves a live serve alone.
|
||||
`fndrop.sh` is the one to read the description of first: it leaves the PROCESS alone and
|
||||
deliberately disconnects clients from it, which is not the same promise.
|
||||
|
||||
@@ -562,6 +562,7 @@ deployment. `P` selects the port.
|
||||
| `cstep2.sh` | steady-state decode ms/step at concurrency | `P` `LEVELS` `MT` `WIN` |
|
||||
| `ident.sh` | run-to-run reproducibility at a fixed configuration: one hash per (temperature, question) | `P` |
|
||||
| `diskstall.py` | what restoring a conversation from the disk tier costs: the returning request's time to first token, and the longest stall it puts on a stream decoding beside it | `--port` `--session` `--fill` |
|
||||
| `cardclock.py` | what holds each card's clock under a sustained load (power limit, temperature or current limit, or the top of the voltage/frequency curve) and which card the tensor-parallel step waits for, with the engine's step counters per window beside it. Drives its own greedy load; `--watch` only samples while real traffic drives the server. Never writes to a card | `--port` `--conc` `--gen` `--seconds` `--window` `--seed` `--watch` `--json` `--compare` |
|
||||
|
||||
`fndrop.sh` exists because a disconnect reaps a request at an arbitrary point in the step loop, and
|
||||
every other harness here waits for its requests, so none of them can see what holds a reference
|
||||
@@ -586,6 +587,20 @@ C steps tok tok/step ms/step accept%
|
||||
`cstep2.sh` waits until exactly C sequences are running before sampling and re-checks at the end: a
|
||||
window whose edges carry fewer than C describes no concurrency at all.
|
||||
|
||||
`cardclock.py` exists because the same image reads several percent apart from one boot to the next
|
||||
on workstation cards. A tensor-parallel step runs at its slowest card's clock, and under a sustained
|
||||
load the firmware picks each card's clock. A throttler bit counts only when the card's clock is
|
||||
lower while it is set: some firmware keeps a bit on at idle (on Radeon AI PRO R9700,
|
||||
`TEMP_HOTSPOT`), so a bit the idle baseline also shows is listed and ignored. When it names a
|
||||
setting (power cap, fan target, voltage offset) it prints the command and changes nothing. That
|
||||
write is for a moment when no process holds `/dev/kfd`. Under load, an SMU write on gfx1201 has
|
||||
reset the machine.
|
||||
|
||||
```sh
|
||||
scripts/cardclock.py --port 8100 --conc 8 --seconds 180 --seed 7 --json before.json
|
||||
scripts/cardclock.py --compare before.json after.json
|
||||
```
|
||||
|
||||
### Measuring with a server of its own
|
||||
|
||||
| | |
|
||||
|
||||
Reference in new issue
Block a user