Repository navigation
Add model-free calibrated Metal counter probe - #680
Conversation
|
Validated
Native build, server goldens (zero unexpected differences) and formatting pass; zero new lean findings (534 inherited). Capacity note: 2,048 spans work on this M1 Max; 2,049 returns Stage sampling works; dispatch-boundary sampling is unavailable on this device. Raw logs remain local. |
|
Thank you, @akol1. A probe that times GPU work with the GPU's own counters, refuses to read them before the work is done and says plainly when a chip can't sample is a sound base for timing kernels later. Your commit landed in 1.0.9 under your name ( No code changed on our side. Your CHANGELOG line is in your commit as you wrote it; our CHANGELOG commit after it ( What we checked:
One limit to know about: the dispatch-boundary path hasn't run on any GPU we have, since the M3 and the M5 both report it unsupported. |
What this changes
Closes #676. Adds a standalone
tf-metal-countersconsumer and bounded Metal timestamp recorder. Reusesgpu_profile.Class; existing split-commandTrace, engine callers, lane rounds and serving paths are unchanged.Receipt
e7c523eb; candidate:fbe0b167. Apple M3 Ultra, macOS 26.6.2, Zig 0.17.0, Xcode Metal toolchain. No checkpoint, MLX or PyTorch dependency.zig build tf-metal-counters test-metal-counters-host test-metal-counters-gpu -Dcpu=apple_m1 --summary all: 13 passed, 0 failed, 0 skipped.zig build test -Dcpu=apple_m1 --summary all: 1292 passed, 0 failed, 2 skipped. Unchanged baseline: 1290 passed, 0 failed, 2 skipped. These include CUDA host checks, not CUDA GPU qualification.--help,--capabilityand default run exercised. Report:status=ok, stage sampling, 4096 independent expected outputs and identical instrumented FP32 bits; in-flight read/reset/deinit rejected. Three calibrated intervals: 10.750, 13.042 and 10.333 microseconds. These include encoder/fence overhead and are not production operator or served performance claims.zig fmt --checkpassed for changed Zig files.python3 tools/zig/lean_check.py: 534 inherited problems, same as pinned baseline; zero added findings. Checker exits 1 and is not claimed clean.Checklist