Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions tools/hyperloom/custom/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ plus `hl_cli_login.py` and a `launch.sh` wrapper) is gone: upstream now knows th
* `IREE_HAL_AMDGPU_LIBHSA_PATH` pointing at the HSA runtime. The entrypoint defaults it to the
TheRock's copy and `HL_LIBHSA` overrides it; without it the HRX backend registers **no device**
("Available devices: (none)") and every leg fails.
* `HSA_USE_SVM=0 HSA_USERPTR_FOR_PAGED_MEM=0 HRX_ALLOW_NO_SVM=1` on any box whose libhsa page-faults
an HRX allocation (engine #715, the nightly libhsa). The entrypoint defaults all three to those
values and an explicit setting still wins, so one candidate can measure SVM on if that is wanted.
* `wiki.test.raw` for the KLD gate (`HL_WIKI`, default `~/models/qwen38/wikitext-2-raw/wiki.test.raw`).
* A Hyperloom install (upstream, unpatched), `HYPERLOOM_BENCHMARK_BACKEND=bypass`, and Ray on a
free port (`RAY_ADDRESS=127.0.0.1:6390`: 6379 is taken by a docker redis on this box).
Expand Down
9 changes: 7 additions & 2 deletions tools/hyperloom/custom/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,13 @@ def serve_batch_args():
llama-server child) but NOT `-b`/`-ub`/`-ctk`/`-ctv` -- it sets those itself per route, and it
rejects the flags with `unknown option`. So those levers move the llama-bench legs only; the
serve leg measures what serve would serve.

`-c` is not a lever but a measurement condition: without it serve sizes the KV cache for the
model's OWN context (262144 on Qwen3.8-27B = 16.1 GiB of KV), which only fits when the box
happens to be idle -- under another lane's GTT the engine's fit check aborts the server and every
candidate fails for a reason that has nothing to do with the lever under test. `HL_CTX` overrides.
"""
args = []
args = ["-c", str(env_int("HL_CTX", 8192))]
if env("HL_FA"):
args += ["-fa", env("HL_FA")]
return args
Expand Down Expand Up @@ -196,7 +201,7 @@ def levers():
return {
k: env(k)
for k in ("HL_B", "HL_UB", "HL_FA", "HL_CTK", "HL_CTV", "HL_MTP_MAX", "HL_DFLASH",
"HL_PARALLEL", "GGML_HRX_Q8_PREFILL_RELAX", "GGML_HRX_GRAPH_PROGRAM_CACHE",
"HL_PARALLEL", "HL_CTX", "GGML_HRX_Q8_PREFILL_RELAX", "GGML_HRX_GRAPH_PROGRAM_CACHE",
"GGML_HRX_TER_Q4_0", "ONEBIT_HRX_DECODE_SPLIT")
if env(k)
}
Expand Down
15 changes: 15 additions & 0 deletions tools/hyperloom/custom/custom_strixhalo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,24 @@ if [ ! -x "$GPU_HOLD" ]; then
exit 1
fi

# The FIFO's state lives next to the REAL home, not next to a sandboxed HOME. gpu-hold defaults both
# paths to $HOME, and Hyperloom runs this entrypoint under a fresh home (the preflight writes into
# ~/.claude/config.json), so without this every measurement would take a private token and queue in a
# private directory -- inside no queue at all, which is the one thing this claim exists to guarantee.
REAL_HOME=${REAL_HOME:-$(getent passwd "$(id -u)" | cut -d: -f6)}
export GPU_TOKEN_FILE=${GPU_TOKEN_FILE:-${REAL_HOME:-$HOME}/GPU-TOKEN}
export GPU_QUEUE_DIR=${GPU_QUEUE_DIR:-${REAL_HOME:-$HOME}/GPU-QUEUE}

# The HRX backend reaches its HSA runtime through IREE's loader, which has to be told where that
# library is: without this the backend registers no device at all ("Available devices: (none)").
LIBHSA=${HL_LIBHSA:-/opt/rocm-therock/lib/python3.14/site-packages/_rocm_sdk_core/lib/libhsa-runtime64.so.1}
export IREE_HAL_AMDGPU_LIBHSA_PATH=${IREE_HAL_AMDGPU_LIBHSA_PATH:-$LIBHSA}

# The nightly libhsa page-faults on an HRX allocation unless SVM is off (engine #715), so every HRX
# launch on this box carries these three. Defaulted, not forced: a candidate that wants SVM back can
# still set them, and the run records whichever value was in force.
export HSA_USE_SVM=${HSA_USE_SVM:-0}
export HSA_USERPTR_FOR_PAGED_MEM=${HSA_USERPTR_FOR_PAGED_MEM:-0}
export HRX_ALLOW_NO_SVM=${HRX_ALLOW_NO_SVM:-1}

exec "$GPU_HOLD" -l hyperloom -t "$HOLD_MIN" -- python3 "$HERE/benchmark.py"
Loading