Repository navigation
hyperloom: the engine as a --framework custom workload, retire the 1.0.0 patch route - #660
Conversation
…e 1.0.0 patch route Hyperloom 1.1 knows this board (--gpu-type radeon8060s = gfx1151) and has a supported scriptable path, so tools/hyperloom/custom/ carries the whole adapter: an entrypoint that takes the box's GPU FIFO and runs one measurement, a stdlib benchmark that reports llama-bench pp512/tg128, 1bit serve code/prose/short and a two-half correctness gate (KLD vs base logits, greedy text identity), the lever grid EXPLORE sweeps, and the launch line. The 1.0.0 patch route (hl_patch_strixhalo.py, hl_cli_login.py, launch.sh) is deleted: nothing here patches Hyperloom itself any more. hrx2kineto.py and hrx-tracelens.sh stay as the TraceLens bridge.
Measured on the Strix Halo box against main 76e3bbd, not assumed: * IREE_HAL_AMDGPU_LIBHSA_PATH must be exported or the HRX backend registers no device at all ("Available devices: (none)") and every leg fails; the entrypoint now defaults it to the TheRock copy, HL_LIBHSA overrides. * A GGUF that carries its own MTP head drafts with it *by default* (serve says so at startup and pins draft length 3 by its recipe), so HL_MTP_MAX now means relative to that: unset keeps serve's default, 0 is --no-mtp, N is --mtp-max N. Adds mtp_off to the grid. * On this pin the MTP draft graph has one node (the head's PAD) off HRX and strict placement aborts the server, so the serve leg runs GGML_HRX_STRICT=0 with GGML_HRX_REPORT=2, the same policy scripts/hw-gate.sh uses for its server, and records the placement counts in the report.
serve has its own argument parser and rejects -lv, which killed the serve leg. Placement evidence is best-effort: the counts need the library's INFO level, and serve exposes no passthrough for it. GGML_HRX_STRICT=0 is the part that matters and it stays.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY (posted as a comment: GitHub refuses --request-changes/--approve on a PR owned by the same account). One count in the description is off; nothing else found.
Checked against the installed Hyperloom's own code, not against the description. In ~/hyperloom-ws/.venv-2026-10-30, with HYPERLOOM_BYPASS_SCRIPTS_DIR pointed at this PR's tools/hyperloom/custom:
$ python -c 'load_declared_levers(); _custom_script_path("radeon8060s")'
levers file: .../tools/hyperloom/custom/levers.json
load_declared_levers -> 15 entries
names: ['mtp_off', 'ub1024', 'ub2048', 'b2048', 'fa_off', 'kv_k_q8', 'kv_kv_q8',
'mtp_3', 'mtp_6', 'mtp_8', 'dflash', 'parallel_2', 'parallel_4',
'q8_prefill_relax_off', 'graph_cache_unbounded']
_custom_script_path(radeon8060s) -> .../tools/hyperloom/custom/custom_radeon8060s.sh
_custom_script_path(gfx1151) -> (empty)
load_declared_levers() raises DeclaredLeversError for any variant is_executable() would reject, so a clean load is the "all executable" assertion — but the count is 15, not 14 (the body and custom/README.md both say 14; mtp_off is the one missing from the prose list, which enumerates --mtp-max 3/6/8 but not the 0 arm). Worth fixing in both places, since the lever count is what an operator checks when deciding the sweep is the one they wrote.
The CLI side matches the README: hyperloom optimize on this box offers --framework {sglang,vllm,atom,xdit,custom}, --gpu-type … radeon8060s, --framework-path, --benchmark-scripts-dir, and the CLI exports --benchmark-scripts-dir into HYPERLOOM_BYPASS_SCRIPTS_DIR (inference_optimizer/cli/__init__.py:193,238), which is exactly the variable declared_levers_path() and _custom_script_path() read. python -m hyperloom --help works from that venv, so the README's launch form is valid.
Nothing patches Hyperloom. hl_patch_strixhalo.py, hl_cli_login.py, launch.sh, lemonade_bench.sh, the old custom_strixhalo.sh and the ZAYA1 reference are deleted, and the remaining mentions are prose saying they are gone (tools/hyperloom/README.md:33, custom/README.md:26). git grep over tools/ and scripts/ for git apply, --patch, sed -i on hyperloom, and site-packages paths finds nothing but the TheRock libhsa-runtime64.so.1 read path. The new code writes only to $RESULT_DIR (out_dir, per-name .log/.json) and $HL_STATE (the two reference files) — both deliberately outside --framework-path, which matters because Hyperloom runs git clean -fd there when it integrates a KEEP.
Entrypoints, dry-run style: bash -n clean on both scripts, shellcheck -S warning silent, python3 -m py_compile benchmark.py clean, and with no model the measurement fails closed before touching anything:
$ env -u HL_MODEL -u MODEL RESULT_DIR=/tmp/hl-dry python3 benchmark.py
neither HL_MODEL nor MODEL names a model exit 1
$ MODEL=/nonexistent.gguf … python3 benchmark.py
model file not found: /nonexistent.gguf exit 1
The GPU wiring is by inspection: custom_radeon8060s.sh exec bashes the workload, and the workload execs gpu-hold -l hyperloom -t "$HOLD_MIN" -- python3 benchmark.py, so one measurement is one claim, nothing builds inside it, and a candidate that fails the gate exits 0 with quality_gate.passed=false (the documented Hyperloom contract) while an infrastructure failure is non-zero.
I did not take a GPU claim: the standalone measurement and the bounded optimize run in the body are yours, and the GPU is shared tonight. Nothing here needs the device to be reviewable, which is the point of the split.
A run on a shared box is sandboxed on HOME (upstream's preflight writes the API key into the ~/.claude of whatever HOME it sees). Two paths assumed $HOME was the box user's: gpu-hold, which then did not exist, and the build/weights/state defaults. gpu-hold now resolves through PATH and the password database, and benchmark.py defaults through pwd.getpwuid() with HL_REAL_HOME as an override.
…y takes Measured on the box, four of the six batch levers were invalid: * 1bit serve has its own argument parser and rejects -b/-ub/-ctk/-ctv as unknown options (it sets batching per route; it does take -fa). So those levers now move llama-bench and the KLD leg only, and serve gets just the flags it accepts. * A quantized KV cache needs flash attention: with -ctk q8_0 alone, llama-bench dies in ggml_backend_sched_graph_compute_async error -1 during warmup. Asking for one now implies -fa on. * -fa off reaches serve and then fails at decode (Compute error, HTTP 500): kept as a lever, reported as a rejected candidate rather than silently dropped.
The bounded run (2026-10-30, Strix Halo)
What the run found, all of it measured:
Numbers, the full candidate table, the two source patches the framework agent proposed (both left in its session KEEP commits: none. Nothing was committed into the framework checkout ( |
What
Makes the engine a Hyperloom custom workload on upstream's supported
--framework custom(scriptable) path, and retires the route that patched an installed Hyperloom 1.0.0.
Upstream 1.1 now knows this board (
--gpu-type radeon8060s= gfx1151, 40 CU) and takes theentrypoint, the lever grid and the correctness gate from the operator, so nothing here patches
Hyperloom itself any more.
Files
tools/hyperloom/custom/custom_radeon8060s.shcustom_<runner-type>.sh), forwards to the workload.tools/hyperloom/custom/custom_strixhalo.shgpu-hold -l hyperloom -t 20), builds nothing, runs one measurement.tools/hyperloom/custom/benchmark.pyllama-benchpp512/tg128,1bit servecode/prose/short tok/s (median of 3), KLD gate, greedy-text gate, score = geomean, writes the InferenceX-shaped result.tools/hyperloom/custom/levers.json-ub,-b,-fa, KV cache types,--mtp-max3/6/8,--dflash,--parallel2/4,GGML_HRX_Q8_PREFILL_RELAX,GGML_HRX_GRAPH_PROGRAM_CACHE.tools/hyperloom/custom/README.mdRetired
hl_patch_strixhalo.py,hl_cli_login.py,launch.sh,lemonade_bench.sh, the oldcustom_strixhalo.shand the ZAYA1 reference. Nothing else in the repository referenced them(
git grepon main).hrx2kineto.pyandhrx-tracelens.share unchanged: they are the TraceLensbridge and the profile leg uses them.
Gate
Fail-closed, two halves, both required: mean KLD against base logits recorded at the baseline
(
llama-perplexity, wiki.test.raw, 512x8 —scripts/hw-gate.sh's recipe) and byte-identical greedyreplies on the three prompts. The first measurement records the references (
reference_established);every later one must pass. References live outside the framework checkout, because Hyperloom runs
git clean -fdthere when it integrates a patch.Verified
levers.jsonthrough Hyperloom's ownload_declared_levers(): 14/14 executable._custom_script_path('radeon8060s').optimizerun on the Strix Halo box.