Skip to content

feat(bench): add freetpu-bench suite and 60s TPU playbooks (#3) - #8

Closed
saariuslystoned wants to merge 18 commits into
mainfrom
feat/freetpu-bench-playbooks
Closed

saariuslystoned wants to merge 18 commits into
mainfrom
feat/freetpu-bench-playbooks

Conversation

@saariuslystoned

Copy link
Copy Markdown
Collaborator

Refs #3

Summary

Ships freetpu-bench + 4 Copy-Paste 60-Second Playbooks (inspired by nvbench, nvbandwidth, nccl-tests, and dgx-spark-playbooks for TPUs) while keeping full file-level independence from sibling PRs (tools/colab_tpu_bench.py, skills/freetpu/, freetpu_tile/ untouched).

Deliverables

  • bench/freetpu_bench.py (clean-room stdlib + numpy, optional jax, headless colab CLI runner):
    • --suite compute (nvbench-style): BF16 / INT8 / W8A16 GEMM, fused GEMM + SiLU, and small-op dispatch floor sweep (1x64x32 .. 8192x8192x8192).
    • --suite bandwidth (nvbandwidth-style): HBM2e / LPDDR triad streaming (a + s * b) GB/s + host<->device (H2D / D2H) latency.
    • --suite comms (nccl-tests-style): TCP / USB-Ethernet / RPC activation-hop latency (us) and bidirectional throughput (GB/s) across 16 KB – 4 MB PP/MoE payloads (with --comms-server for two-node wired Pixel testing).
    • --backend cpu|buenos_mock|jax_tpu|colab_tpu + --json + --markdown scorecard comparing measured rows against published-reference baselines (Pixel Tensor G5 buenos_a0, Cloud TPU v5e-1, Cloud TPU v6e-1, NVIDIA H100 SXM, RTX 5090) with normalized $/1M tokens and TFLOP/s-per-$ economics and explicit public pricing citations.
    • --self-test: fast offline deterministic test suite (compute, bandwidth, comms, scorecard integrity, and colab_tpu v6e1 -> v5e1 fallback).
  • playbooks/:
    • playbooks/01-pixel-tensor-g5-baremetal.md
    • playbooks/02-colab-cloud-tpu-v5e-v6e.md
    • playbooks/03-dual-pixel-wired-cluster.md
    • playbooks/04-cost-per-token-vs-gpu.md
  • CI & Docs: Wired python3 bench/freetpu_bench.py --self-test into .github/workflows/ci.yml and added Benchmarks & Playbooks (freetpu-bench) to README.md.

Verification

  • python3 bench/freetpu_bench.py --self-test -> PASS
  • make -C libopenbuenos verify-header-host host test -> PASS (16/16 suites)
  • Python ISA self-tests (emit_custom_gemm.py, dgc0_builder.py, spline_0x640.py, pack_int4.py, verify_*.py) -> PASS
  • Clean-room audit across 82 repo files -> PASS (0 vendor binaries or private paths)
  • Live headless Colab TPU (v6e1 ReadTimeout fallback -> v5e1, auto-stopped cleanly) + local comms loopback run -> 178.56 TFLOP/s BF16, 356.96 TOPS INT8, 652.30 GB/s HBM2e triad, 130.45 us sync floor, 36.62 us 1-way 16 KB loopback hop (7.21 GB/s peak at 4 MB).

@saariuslystoned

Copy link
Copy Markdown
Collaborator Author

Parking/closing in favor of #16. Benchmarking is refocusing around native C++ llama-bench / ggml-cloudtpu and bare-metal libopentpu.so, while PR #15 preserves the Phase 0 v6e-8 Google-stack baseline scorecard. Branch preserved for reference.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant