Prepare a CUDA selector campaign
Questi contenuti non sono ancora disponibili nella tua lingua.
The CUDA selector scripts use the normal Cargo/Git configuration and the exact
Iron revision in rust/Cargo.lock. They do not require a private Git mirror,
replace the caller’s Cargo cache, or choose a model on the caller’s behalf.
Use the Rust CUDA backend on Linux; these commands do not regenerate Swift or
Metal resources.
Compile before model testing
Section titled “Compile before model testing”From the Butter checkout, with Rust, the CUDA development toolkit and driver link libraries available:
bash benchmarks/iron-selectors/run_cuda.sh --build-onlyThis runs cargo test --locked for wh-butter-cuda, feature cuda, test
iron_selector_model, with --no-run. It needs no checkpoint and executes no
test binary or model. run_cuda_attribution.sh --build-only selects the same
target, so one successful build prepares both scripts. Build failure propagates
unchanged. Set CUDA_PATH/CUDA_HOME, PATH, library paths and
CARGO_TARGET_DIR for the actual host before invoking it. A compile pass does
not establish GPU correctness, and this preparation still consumes CPU/disk.
Inspect the Iron dependency pin before preparing a changed branch. The selector PR combines attention fixes and packed-Q4 selectors; preserving only one of those changes can break the consumer. Do not replace its pin with a moving branch or a machine-local URL rewrite. Record source and lockfile hashes with the build output.
Run on an assigned, idle GPU
Section titled “Run on an assigned, idle GPU”Choose an absolute path to the verified, supported Qwen GGUF and a new output directory whose parent already exists:
export CUDA_VISIBLE_DEVICES=0export BUTTER_SELECTOR_MODEL=/workspace/models/Qwen3.8-27B-Q4_K_M.ggufexport BUTTER_SELECTOR_OUT=/workspace/results/selectors-cuda-01bash benchmarks/iron-selectors/run_cuda.shConfirm that device index 0 is the assigned GPU before running. The scripts check that the model is a readable file with GGUF magic before invoking Cargo. This is an input-format check, not a checksum, model-family or completeness proof. Verify the intended artifact separately. An existing result directory refuses rather than overwriting evidence. Relative or missing paths refuse.
The main script retains its four cells: prefill and decode, each with selectors off and on. For the six attribution cells, use a different fresh output path:
export BUTTER_SELECTOR_OUT=/workspace/results/selectors-cuda-attribution-01bash benchmarks/iron-selectors/run_cuda_attribution.shEach cell retains full Cargo/test output plus date and host load. The first
failed cell stops the script and retains its log. QWEN35_MARLIN=0, selector
order, workloads, sample counts and the existing diagnostic policy are
unchanged. These scripts do not perform a new correctness campaign before
timing; run the existing numerical and model correctness gates first. They
also do not impose a rental deadline or stop provider billing.
H100 preparation notes
Section titled “H100 preparation notes”Iron’s normal NVRTC path derives its virtual target from the live device’s
compute capability. Its existing code selects compute_90 for CC (9, 0);
observe that on the H100. Do not carry an optional GB10 AOT build setting into
this environment: the opt-in CUTLASS and Marlin builds have separate target
settings, and the CUTLASS FP4 bundle is not an established Hopper path. Leave
those optional builds disabled for the initial portable selector check.
For a separate Iron checkout, these compile-only commands prepare the existing runtime smoke and attention-chain tests without executing them:
# Iron does not commit Cargo.lock. Generate it once for a fresh checkout;# retain that file and its hash, then use --locked for the campaign builds.test -f Cargo.lock || cargo generate-lockfilecargo test --locked -p wh-iron-runtime --features cuda --test cuda_smoke --no-runcargo test --locked -p wh-iron-std --features cuda \ --test sdpa_prefill_nax_materialized_chain_cuda --no-runAfter admission on the actual device, replace --no-run with
-- --ignored --nocapture --test-threads=1 to execute the selected GPU oracles.
The explicit --ignored matters: these hardware tests are ignored by default.
Retain executed/skipped counts, device identity, stderr and exit status. These
selected tests do not certify the whole kernel inventory or multi-GPU support.
CPU launcher regression
Section titled “CPU launcher regression”python3 benchmarks/iron-selectors/test_cuda_launchers.pyThe subprocess tests replace Cargo at the command boundary. They prove argument and environment handling, compile-only behavior, input/evidence admission and failure propagation; they do not compile CUDA or access a GPU.
