From e5d91bf239a07baee7ac8d6c1af974fbcb6d14b5 Mon Sep 17 00:00:00 2001 From: 2jztricks <96335554+2jztricks@users.noreply.github.com> Date: Sun, 11 Oct 2026 13:44:16 +0300 Subject: [PATCH] hip: add opt-in exact gfx1100 QSA prefill scorer --- CMakeLists.txt | 15 + .../2026-10-11-gfx1100-qsa-scores/README.md | 216 ++++ .../benchmark.py | 137 +++ .../correctness.json | 19 + .../hipblaslt-gfx1100-100401.txt | 34 + .../measurements.json | 1091 +++++++++++++++++ .../prompt-source.txt.gz | Bin 0 -> 20964 bytes .../provenance.json | 168 +++ docs/AMD_HIP.md | 11 + src/kernels/cuda/qsa_scores_gfx1100_test.cu | 32 + src/kernels/cuda/qsa_select.cu | 122 ++ src/kernels/qsa_scores_gfx1100_parity.cpp | 185 +++ 12 files changed, 2030 insertions(+) create mode 100644 bench/results/2026-10-11-gfx1100-qsa-scores/README.md create mode 100644 bench/results/2026-10-11-gfx1100-qsa-scores/benchmark.py create mode 100644 bench/results/2026-10-11-gfx1100-qsa-scores/correctness.json create mode 100644 bench/results/2026-10-11-gfx1100-qsa-scores/hipblaslt-gfx1100-100401.txt create mode 100644 bench/results/2026-10-11-gfx1100-qsa-scores/measurements.json create mode 100644 bench/results/2026-10-11-gfx1100-qsa-scores/prompt-source.txt.gz create mode 100644 bench/results/2026-10-11-gfx1100-qsa-scores/provenance.json create mode 100644 src/kernels/cuda/qsa_scores_gfx1100_test.cu create mode 100644 src/kernels/qsa_scores_gfx1100_parity.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index b7d4fd1d..a82802bf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -393,6 +393,21 @@ if(STRATA_ENABLE_CUDA OR STRATA_ENABLE_HIP) src/ngram/ple_reader.cpp src/platform/direct_file.cpp) target_link_libraries(strata_kernels PUBLIC strata_core strata_artifact) + # Exact gfx1100 prompt scorer (PR1825 method port): optional standalone test, + # also available where the published source omits tests/. + option(STRATA_PARITY_GFX1100_QSA_SCORES "Build the exact gfx1100 QSA score/ID check" OFF) + if(STRATA_ENABLE_HIP AND (STRATA_BUILD_TESTS OR STRATA_PARITY_GFX1100_QSA_SCORES)) + set_source_files_properties(src/kernels/cuda/qsa_scores_gfx1100_test.cu + src/kernels/qsa_scores_gfx1100_parity.cpp PROPERTIES LANGUAGE HIP) + add_executable(qsa_scores_gfx1100_parity src/kernels/qsa_scores_gfx1100_parity.cpp + src/kernels/cuda/qsa_scores_gfx1100_test.cu) + target_include_directories(qsa_scores_gfx1100_parity PRIVATE ${_strata_gpu_include_directories}) + target_link_libraries(qsa_scores_gfx1100_parity PRIVATE strata_kernels ${_strata_gpu_runtime_target}) + enable_testing() + add_test(NAME qsa_scores_gfx1100_parity COMMAND qsa_scores_gfx1100_parity --full) + set_tests_properties(qsa_scores_gfx1100_parity PROPERTIES SKIP_RETURN_CODE 77 TIMEOUT 180 + ENVIRONMENT "STRATA_SCORES_THREAD=1;STRATA_SCORES_THREAD_TRACE=1") + endif() # perf-review D-1: the tensor-core prompt attention vs the FP32 kernel and FP64 (GPU, synthetic, no model); with # the tests, or alone with -DSTRATA_PARITY_PROMPT_ATTN=ON. CUDA only: HIP compiles the tensor-core kernel out. if((STRATA_BUILD_TESTS OR STRATA_PARITY_PROMPT_ATTN) AND STRATA_ENABLE_CUDA) diff --git a/bench/results/2026-10-11-gfx1100-qsa-scores/README.md b/bench/results/2026-10-11-gfx1100-qsa-scores/README.md new file mode 100644 index 00000000..82e31bf7 --- /dev/null +++ b/bench/results/2026-10-11-gfx1100-qsa-scores/README.md @@ -0,0 +1,216 @@ +# Exact gfx1100 QSA scorer: measured prefill benefit, opt-in only + +Measured on 2026-10-11 on one RX 7900 XTX. This accompanies the HIP port of the +four-lanes-per-query score kernel from [PR #1825](https://github.com/Niko1221/Strata/pull/1825) +by xrip, pinned to `14bf32150490bb9f5fc4d9c7c5dcfdc96dd98797`. That PR's code excludes +HIP; its algorithm and reduction order are the source of this port. This is an +AMD extension, not a claim to invent that method. + +The measured benefit is fresh long-prompt processing. The correction-inclusive +coding pilot was 3.3% slower overall. The new path is disabled by default and was +not promoted into the tested machine's production setup. + +## Dispatch and implementation + +Set `STRATA_SCORES_THREAD=1` **before starting the engine**. Dispatch also requires: + +- HIP on the exact `gfx1100` architecture (normal feature suffixes are accepted). +- At least 64 queries and a supplied live bound of at least 16,385 index blocks. +- A live bound no larger than the allocated score capacity. Allocating a 256K + context alone does not select the new kernel. +- The already supported indexer geometry: four heads, dimension 128, block size 4. + +Otherwise the existing scorer runs. Decode, top-k, weights, expert placement, +PLE storage, and sampling are not changed by this patch. CUDA does not compile +the HIP addition. No extra persistent weights or conversation state are allocated. + +The kernel uses four wave32 lanes per query and keeps all four heads in registers. +Each key tile in LDS serves 64 queries. The original FP32 per-lane expression and +xor reduction tree are preserved; the existing tail scorer handles the final block. +The retained layout is 64 queries by 32 key blocks, 512 key blocks per workgroup, +256 threads. Four layout variants were screened; none improved stage time by the +predeclared 10% threshold over this one, so the first layout was retained. + +`STRATA_SCORES_THREAD_TRACE=1` optionally prints one engagement line per host thread. +No trace output is enabled by default. + +## Machine and shared settings + +- RX 7900 XTX, 24 GiB nominal VRAM, gfx1100; PCIe 4.0 x16 observed; fixed 272 W cap. +- Ryzen 9 7950X3D; 64 GiB installed RAM, approximately 62 GiB reported by Linux. +- Nobara 44; kernel `7.2.9-200.nobara.fc44.x86_64`; ROCm SDK 10.0.0. +- [OrcaRouter Qwen3.8 Flash Next Uncensored](https://huggingface.co/orcarouter/Qwen3.8-Flash-Next-Uncensored-GGUF), + IQ3_S. Exact shard names, pack/profile hashes, and configuration are in + [provenance.json](provenance.json). The Hugging Face revision was not recorded. +- One GPU, one server, 15 CPU expert workers; logical context 262,144; int8 KV, + 32,768 resident KV cells; prefill chunk 16,384; spec/MTP 6, floor 0.70, maximum T 6. +- Same balanced expert profile in every arm; 8,144 actual GPU expert slots, + 16,622,003,200 blob bytes; 34 GiB resident budget and 1,024 MiB conversation cache. +- NVMe model storage; PLE lookup shard on a dedicated ext4 SSD partition with + direct I/O. The lookup was not moved into RAM. GPU vision was enabled but no + image prompt was used in these measurements. +- Private experiment cgroup: 56 GiB memory cap, swap limit zero; at least 8 GiB + available host memory required. This is not a claim that system-wide swap was disabled. +- Same local prefix-cache frontend and chat template for both arms. Its hashes + are recorded. The stock latest Python frontend was not benchmarked here. + +The repeated model tests used the reconstructed tuned 0.1.40.3 engine, including +PR #1107 prefix reuse and resident-budget loans in **both** arms. They compare the +installed control against its reconstructed candidate, not two official release +binaries. A separate comparison builds current main at +`61b3fb5dd3f1e8ec09cf7e4e05208bc6d3c46406` plus this patch and uses the **same binary** +with `STRATA_SCORES_THREAD=0` and `1`. Those families are never pooled. + +## Before and after + +The full per-request values, native prompt/decode timing, token counts, output +hashes, means, medians, and ranges are in [measurements.json](measurements.json). +These are **non-streaming request times with a one-token cap**. Model loading and +queueing were excluded; streaming time to first token and sustained generation +throughput were not measured by this screen. + +Each fresh case starts a new private model worker. Actual reused prefix tokens +were zero. The OS file cache was not flushed, so these are fresh model prompts, +not cold-boot storage benchmarks. Inputs are repeated numerical source code, +greedy sampling, seed 6300, reasoning disabled. They are a prefill screen, not a +quality evaluation or representative project-completion benchmark. + +| Engine family | Actual fresh tokens | Pairs | Before mean | After mean | Less elapsed time | +| --- | ---: | ---: | ---: | ---: | ---: | +| tuned-v0.1.40.3 | 130,978 | 3 | 66.741 s | 59.769 s | 10.45% | +| tuned-v0.1.40.3 | 239,906 | 3 | 142.718 s | 110.407 s | 22.64% | +| current-main-same-binary | 130,978 | 1 | 68.872 s | 60.020 s | 12.85% | +| current-main-same-binary | 239,906 | 1 | 142.843 s | 111.828 s | 21.71% | + +| Tuned build fresh tokens | Before median (range) | After median (range) | +| --- | ---: | ---: | +| 130,978 | 67.514 (64.257–68.451) s | 59.465 (58.863–60.979) s | +| 239,906 | 142.059 (141.660–144.436) s | 110.438 (109.549–111.232) s | + +**Cached follow-ups (2,085 new tokens):** + +| Engine family | Reused prefix | Pairs | Before mean | After mean | Less elapsed time | +| --- | ---: | ---: | ---: | ---: | ---: | +| tuned-v0.1.40.3 | 130,978 | 2 | 2.829 s | 2.658 s | 6.023% | +| tuned-v0.1.40.3 | 239,906 | 2 | 3.418 s | 3.417 s | 0.035% | +| current-main-same-binary | 130,978 | 1 | 2.896 s | 2.781 s | 3.965% | +| current-main-same-binary | 239,906 | 1 | 3.522 s | 2.958 s | 16.037% | + +The repeated near240K cached result is effectively flat (0.035%). The current-main +follow-ups are single pairs and do not establish a repeatable cached-prefix gain. + +**Submitted CMake scorer microbenchmark:** + +| Scorer-only live context | Queries | Before | After | Stage speedup | +| --- | ---: | ---: | ---: | ---: | +| 131,072 | 256 | 3.065300 ms | 0.742917 ms | 4.126x | +| 240,000 | 256 | 5.264949 ms | 1.389344 ms | 3.790x | + +The repeated family used orders off/on, on/off, off/on. All three fresh request +pairs at each length had the same input hash, output hash, and output count. +Cached continuations in trials 2 and 3 added 2,085 actually processed tokens and +reused the preceding 130,978 or 239,906 tokens. Trial 1's much smaller continuation +is retained in the raw data but excluded from the 2K continuation summary. +The follow-up inserts a fixed synthetic assistant message; it does not use the +one generated token as a complete conversational answer. This isolates prefix +reuse and incremental prompt processing. + +## Correctness and build checks + +The submitted HIP CMake target passed 35 cases comparing against the unchanged +warp scorer: **223,664,777 score values bitwise equal**, and **11,895,800 ID buffer +entries equal**, including padding. Allocation guards passed. Cases cover +query counts 1/6/8/9/63/64/65/127/128/129/256/1024; the 65,535–65,539 boundary, +128K and 256K; capacity versus live extent; absent/negative/oversized bounds; +random and wide-exponent floats, ties, signed zero, NaN/Inf and cancellation. + +The same compiled CMake test provides warmed, interleaved ABBA GPU-event timings +with four trials and ten calls per trial. See [correctness.json](correctness.json). +At the real 256-query batch size, this tests the scorer stage rather than making +a claim about whole-request or whole-task speed from a microbenchmark. + +On the tuned model, the 4K/131K prefill plus first generated token matched the +control's main state byte for byte. Separate 64-token continuations and +STOP/resend output checks matched. Full internal state after 64 speculative tokens +was not always byte-identical; the original binary also produced differing +speculative states across repeats. This does not establish the cause of the coding +pilot's different repair paths. No claim of universal bitwise model output is made. + +- Current-main full HIP engine and the standalone CMake test target built with + ROCm 10.0.0, Release, gfx1100, native experts and optional prefill MMQ enabled. +- The touched `qsa_select.cu` also compiled with CUDA 13.0 for sm_89. There was no + CUDA GPU test or full CUDA-engine build. No SYCL source was changed. +- Current-main off/on model requests completed with matching input/output hashes. +- Unsupported GPU architectures were not runtime-tested on hardware. + +Build and run the standalone check even from the published tree without `tests/`: + +```bash +cmake -S . -B build-qsa -G Ninja -DCMAKE_BUILD_TYPE=Release \ + -DSTRATA_ENABLE_HIP=ON -DCMAKE_HIP_ARCHITECTURES=gfx1100 \ + -DSTRATA_BUILD_TESTS=OFF -DSTRATA_PARITY_GFX1100_QSA_SCORES=ON +cmake --build build-qsa --target qsa_scores_gfx1100_parity -j 6 +ctest --test-dir build-qsa --output-on-failure -R '^qsa_scores_gfx1100_parity$' +``` + +Supply your normal ROCm compiler/package paths if they are not discoverable. +CTest sets the opt-in and engagement-trace variables and skips non-gfx1100 cards +with return code 77. + +## Coding pilot and limitations + +Two official Exercism/Aider Polyglot tasks, Go alphametics and Rust xorcism, were +embedded in a 196,608-token source archive, leaving 65,536 tokens within the 256K +window for tool results and repairs. xhigh, 8,192 reasoning tokens, 2,048 answer +reserve, temperature 0.3, top_p 0.95, top_k 20, min_p 0; one matched trial per task, +seeds 7830/7831. Tools and full-suite checks ran until the first pass, with no +post-pass requests. This is a long-context stress pilot, **not an official Aider +leaderboard score**. Its test and correction time is included. + +| Task | Original | New scorer | Original/new turns | Result | +| --- | ---: | ---: | ---: | --- | +| go/alphametics | 209.136 s | 400.318 s | 3 / 5 | Both full suites passed | +| rust/xorcism | 473.734 s | 304.906 s | 6 / 6 | Both full suites passed | +| Total | 682.870 s | 705.225 s | | New scorer **3.27% slower** | + +The different Go run generated more tokens and took extra repair turns despite +matching normalized inputs through the first three requests. The cause remains +unresolved. The combined pilot did not meet the predeclared promotion gate. More +coding repeats, the held-out extension, and the full 24-task suite were therefore +not run. No Luna, frontier-model, or overall agent-quality superiority is claimed. + +An earlier 240K-archive pilot ran out of continuation space: the Rust history +reached 262,714 tokens, beyond 262,144. Its partial attempt is listed separately +in the data and was not reused in the 192K score. It was a benchmark-protocol +failure, not evidence of a scorer crash. + +## Reproducing the request screen + +[benchmark.py](benchmark.py) generates the exact frozen fresh/continuation request +hashes used here from the included compressed numerical-source fixture. It reads +the model pack's tokenizer and uses only Python plus the existing tokenizer's +`regex` dependency. The supplied [hipBLASLt table](hipblaslt-gfx1100-100401.txt) is +specific to this SDK/device pair; do not assume its solution IDs transfer to another +version. The balanced expert profile is identified by hash, not included; use the +same profile and other settings in your two arms. + +Run a loaded private server with the same binary and settings, changing only +`STRATA_SCORES_THREAD=0` or `1` **at startup**. Restart that worker between every +length/arm invocation, preserve every observation, and repeat in both orders: + +```bash +python bench/results/2026-10-11-gfx1100-qsa-scores/benchmark.py \ + --url http://127.0.0.1:8080 --tokenizer /path/to/pack/tokenizer \ + --model strata-qwen38-iq3s-uncensored --length 131072 \ + --variant off --output off-128k-trial1.json +``` + +Then restart with the scorer enabled and use `--variant on` and a new output file. +Repeat with `--length 240000`, then reverse arm order. Use `--prepare-only` to +check request hashes without inference. `STRATA_API_KEY` can supply an API key; +it is never written to results. The script refuses to overwrite any attempt and +records a failure if a fresh prompt reused cached tokens. + +The label does not control the server's environment: confirm the startup setting +and, in the enabled arm, the engagement trace. Measure your model's full output +and correction-inclusive workload separately before adopting the feature. diff --git a/bench/results/2026-10-11-gfx1100-qsa-scores/benchmark.py b/bench/results/2026-10-11-gfx1100-qsa-scores/benchmark.py new file mode 100644 index 00000000..e22d547a --- /dev/null +++ b/bench/results/2026-10-11-gfx1100-qsa-scores/benchmark.py @@ -0,0 +1,137 @@ +"""One fresh prompt and one cached continuation; restart the server between invocations. + +Use the same engine/config with STRATA_SCORES_THREAD=0 or 1 at server startup. +Model loading is excluded. This measures request latency, not streaming TTFT or coding quality. +""" +import argparse +import gzip +import hashlib +import importlib.util +import json +import os +from pathlib import Path +import time +import urllib.error +import urllib.request + +HERE = Path(__file__).resolve().parent +REPO = HERE.parents[2] + + +def digest(data): + return hashlib.sha256(data).hexdigest() + + +def load_tokenizer(folder): + spec = importlib.util.spec_from_file_location('qsa_bench_tokenizer', REPO / 'tools/strata_tokenizer.py') + module = importlib.util.module_from_spec(spec) + spec.loader.exec_module(module) + vocab = json.loads((folder / 'vocab.json').read_text()) + tokens = [None] * len(vocab) + for token, index in vocab.items(): + tokens[index] = token + return module.Tokenizer(tokens, (folder / 'merges.txt').read_text().split('\n'), + json.loads((folder / 'token_type.json').read_text())) + + +def make_requests(tokenizer, source, length, model, follow_tokens): + ids = tokenizer.encode(source) + if not ids or not 0 <= follow_tokens <= len(ids): + raise ValueError('Empty source or invalid continuation size') + text = tokenizer.decode((ids * (length // len(ids) + 1))[:length - 128]) + body = dict(model=model, temperature=0, top_p=1, top_k=1, seed=6300, + reasoning_effort='none', max_tokens=1, messages=[ + dict(role='system', content='You are a precise coding assistant.'), + dict(role='user', content=text + '\nReview the numerical implementation and synchronization in detail.')]) + follow = json.loads(json.dumps(body)) + follow['messages'].extend([ + dict(role='assistant', content='I will inspect the numerical implementation.'), + dict(role='user', content='Continue with a detailed review of synchronization and memory lifetime.')]) + if follow_tokens: + follow['messages'][-1]['content'] += '\nADDITIONAL_SOURCE\n' + tokenizer.decode(ids[-follow_tokens:]) + return [('fresh-' + str(length), body), ('follow-' + str(length), follow)] + + +def fetch(url, body=None): + headers = {'Content-Type': 'application/json'} + key = os.environ.get('STRATA_API_KEY') + if key: + headers['Authorization'] = 'Bearer ' + key + req = urllib.request.Request(url, data=json.dumps(body).encode() if body is not None else None, + headers=headers) + with urllib.request.urlopen(req, timeout=900) as response: + return json.load(response) + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--url', default='http://127.0.0.1:8080') + parser.add_argument('--tokenizer', type=Path, required=True) + parser.add_argument('--model', default='strata-qwen38-iq3s-uncensored') + parser.add_argument('--length', type=int, choices=[131072, 240000], required=True) + parser.add_argument('--follow-tokens', type=int, default=2048) + parser.add_argument('--source', type=Path, default=HERE / 'prompt-source.txt.gz') + parser.add_argument('--variant', choices=['off', 'on'], required=True) + parser.add_argument('--output', type=Path, required=True) + parser.add_argument('--prepare-only', action='store_true') + args = parser.parse_args() + source = gzip.decompress(args.source.read_bytes()) if args.source.suffix == '.gz' else args.source.read_bytes() + requests = make_requests(load_tokenizer(args.tokenizer), source.decode(), args.length, + args.model, args.follow_tokens) + receipt = dict(variant=args.variant, length=args.length, output_cap=1, seed=6300, + temperature=0, reasoning_effort='none', follow_source_tokens=args.follow_tokens, + source_sha256=digest(source), script_sha256=digest(Path(__file__).read_bytes()), + prepare_only=args.prepare_only, rows=[], status='prepared') + # Refuse to overwrite previous observations, including failed attempts. + with args.output.open('x') as output: + def save(): + output.seek(0) + json.dump(receipt, output, indent=2) + output.write('\n') + output.truncate() + output.flush() + try: + save() + if args.prepare_only: + receipt['request_hashes'] = {case: digest(json.dumps(body).encode()) for case, body in requests} + save() + return + health = fetch(args.url.rstrip('/') + '/health') + if not health.get('loaded') or health.get('max_context') != 262144: + raise RuntimeError('Requires an already loaded 262144-context server') + for case, body in requests: + started = time.monotonic() + response = fetch(args.url.rstrip('/') + '/v1/chat/completions', body) + elapsed = time.monotonic() - started + metrics = fetch(args.url.rstrip('/') + '/metrics?requests=all') + native = max(metrics['requests'], key=lambda row: row['time']) + choice = response['choices'][0] + message = choice.get('message', {}) + row = dict(case=case, seconds=elapsed, usage=response.get('usage'), + finish_reason=choice['finish_reason'], + request_sha256=digest(json.dumps(body).encode()), + output_sha256=digest(((message.get('reasoning_content') or '') + '\n' + + (message.get('content') or '')).encode()), + native={k: native.get(k) for k in ( + 'prompt_tokens', 'reused', 'prompt_read', 'output_tokens', 'engine_generated', + 'prompt_ms', 'decode_ms', 'drafts_offered', 'drafts_accepted', + 'hit_rate', 'ram_blobs', 'file_blobs', 'file_mb')}) + receipt['rows'].append(row) + save() + if choice['finish_reason'] not in ('length', 'stop'): + raise RuntimeError('Request did not complete normally') + if case.startswith('fresh-') and native.get('reused') != 0: + raise RuntimeError('Fresh prompt reused a prefix: restart the server and use a NEW output file') + receipt['status'] = 'complete' + save() + except Exception as error: + receipt['status'] = 'failed' + receipt['error'] = str(error) + if isinstance(error, urllib.error.HTTPError): + receipt['http_status'] = error.code + save() + raise + + +if __name__ == '__main__': + main() diff --git a/bench/results/2026-10-11-gfx1100-qsa-scores/correctness.json b/bench/results/2026-10-11-gfx1100-qsa-scores/correctness.json new file mode 100644 index 00000000..0fc79c15 --- /dev/null +++ b/bench/results/2026-10-11-gfx1100-qsa-scores/correctness.json @@ -0,0 +1,19 @@ +{ + "returncode": 0, + "bitwise_qualification": "1: QUALIFIED cases=35 expected_thread_cases=26 scores=223664777 ids=11895800 bitwise_scores=true bitwise_ids=true guards=true", + "dispatch_observed": true, + "timings": [ + "1: TIMING ctx=131072 nq=256 baseline_ms=3.065300 candidate_ms=0.742917 speedup=4.126034 trials=4 repeats_per_trial=10", + "1: TIMING ctx=240000 nq=256 baseline_ms=5.264949 candidate_ms=1.389344 speedup=3.789521 trials=4 repeats_per_trial=10", + "1: TIMING ctx=140000 nq=1024 baseline_ms=13.833862 candidate_ms=3.112324 speedup=4.444866 trials=4 repeats_per_trial=10", + "1: TIMING ctx=240000 nq=1024 baseline_ms=25.035099 candidate_ms=4.841821 speedup=5.170596 trials=4 repeats_per_trial=10" + ], + "resource_pass": true, + "cases": 35, + "scores_checked": 223664777, + "id_entries_checked": 11895800, + "numeric_scope": "Synthetic scores/selected IDs, including padding and allocation guards", + "real_model_state_scope": "4K/131K prefill and first token byte-exact against tuned control; longer MTP sequences may have different internal speculative states even on original binary", + "continuation_scope": "64-token original/candidate output and STOP/resend output match; not full-state equality after64MTPtokens", + "unsupported_architecture_runtime_tested": false +} diff --git a/bench/results/2026-10-11-gfx1100-qsa-scores/hipblaslt-gfx1100-100401.txt b/bench/results/2026-10-11-gfx1100-qsa-scores/hipblaslt-gfx1100-100401.txt new file mode 100644 index 00000000..839434c5 --- /dev/null +++ b/bench/results/2026-10-11-gfx1100-qsa-scores/hipblaslt-gfx1100-100401.txt @@ -0,0 +1,34 @@ +# solution IDs are scoped to this hipBLASLt version and device architecture +STRATA_HIPBLASLT_TUNING_V1 gfx1100 100401 +bf16 1 2560 1 4096 1035 +bf16 4 10240 4 8192 1033 +bf16 48 2560 96 4096 1035 +bf16 48 2560 96 8192 1036 +bf16 128 2560 128 4096 1036 +bf16 128 2560 128 8192 1036 +bf16 320 10240 320 4096 1036 +bf16 320 10240 320 8192 1036 +bf16 512 2560 512 8192 1036 +bf16 2560 2560 2560 8192 1036 +bf16 10240 320 10240 4096 1036 +bf16 10240 320 10240 8192 1036 +f16 512 2560 512 4096 2106 +f16 512 2560 512 8192 2106 +f16 640 2560 640 4096 2106 +f16 640 2560 640 8192 2106 +f16 2560 640 2560 4096 2106 +f16 2560 640 2560 8192 2106 +f16 2560 6144 2560 4096 2106 +f16 2560 6144 2560 8192 2106 +f16 6144 2560 6144 4096 2106 +f16 6144 2560 6144 8192 2106 +f16 10240 2560 10240 4096 2106 +f16 10240 2560 10240 8192 2106 +f16 12288 2560 12288 4096 2106 +f16 12288 2560 12288 8192 2106 +bf16 1 2560 1 8192 1035 +bf16 10240 2560 10240 4096 1036 +bf16 10240 2560 10240 8192 1036 +bf16 2560 2560 2560 4096 1036 +bf16 4 10240 4 4096 1035 +bf16 512 2560 512 4096 1036 diff --git a/bench/results/2026-10-11-gfx1100-qsa-scores/measurements.json b/bench/results/2026-10-11-gfx1100-qsa-scores/measurements.json new file mode 100644 index 00000000..a191c647 --- /dev/null +++ b/bench/results/2026-10-11-gfx1100-qsa-scores/measurements.json @@ -0,0 +1,1091 @@ +{ + "units": { + "seconds": "client request elapsed seconds", + "native_prompt_ms": "engine prefill milliseconds", + "native_decode_ms": "engine generation milliseconds" + }, + "model_loading_included": false, + "streaming_ttft_measured": false, + "logical_context": 262144, + "settings": { + "temperature": 0, + "top_p": 1, + "top_k": 1, + "seed": 6300, + "reasoning_effort": "none", + "output_cap": 1 + }, + "fresh_os_cache_state": "uncontrolled; OS cache not flushed", + "source": { + "file": "prompt-source.txt.gz", + "uncompressed_sha256": "43caa800023d7e223629ab8c6a28bd10c50b56c2dd7232b2b5fa4c00144b2e98" + }, + "rows": [ + { + "family": "tuned-v0.1.40.3", + "trial": "qsa-exact-native1", + "arm": "0-A-131072", + "case": "fresh-131072", + "follow_source_tokens": 0, + "seconds": 64.25693084098748, + "success": true, + "finish_reason": "length", + "output_cap": 1, + "generated_tokens": 1, + "request_sha256": "029dc64c403bd9597b2a143399fa64555b40b8a4910c708fe3f7c3ddc5a1ad25", + "output_sha256": "d6fadeb81a0f0a9f23a6a06f4c0f266f0afe25f436a0aa575ac593e2d695c969", + "prompt_tokens": 130978, + "reused_tokens": 0, + "freshly_processed_tokens": 130978, + "native_prompt_ms": 64157.7, + "native_decode_ms": 27.1, + "hit_rate": 0.787, + "ram_blobs": 102, + "file_blobs": 0, + "file_mb": 0.0, + "drafts_offered": 0, + "drafts_accepted": 0, + "power_cap_w": 272.0 + }, + { + "family": "tuned-v0.1.40.3", + "trial": "qsa-exact-native1", + "arm": "0-A-131072", + "case": "follow-131072", + "follow_source_tokens": 0, + "seconds": 0.34837336000055075, + "success": true, + "finish_reason": "length", + "output_cap": 1, + "generated_tokens": 1, + "request_sha256": "04d4aba48d6b685765f804b257d6a2872758acf1c10c942ab83d93dd55649fde", + "output_sha256": "33462c6ad8d3c9823e7b43633ff1a94f7671c4d155888e47618b5f60027701e5", + "prompt_tokens": 131010, + "reused_tokens": 130978, + "freshly_processed_tokens": 32, + "native_prompt_ms": 303.6, + "native_decode_ms": 19.4, + "hit_rate": 0.769, + "ram_blobs": 111, + "file_blobs": 0, + "file_mb": 0.0, + "drafts_offered": 0, + "drafts_accepted": 0, + "power_cap_w": 272.0 + }, + { + "family": "tuned-v0.1.40.3", + "trial": "qsa-exact-native1", + "arm": "0-A-240000", + "case": "fresh-240000", + "follow_source_tokens": 0, + "seconds": 142.0591052029922, + "success": true, + "finish_reason": "length", + "output_cap": 1, + "generated_tokens": 1, + "request_sha256": "dbb6d4004af260501404a2674660c00523b1c455ba557d431395dab5cee7c4dd", + "output_sha256": "d6fadeb81a0f0a9f23a6a06f4c0f266f0afe25f436a0aa575ac593e2d695c969", + "prompt_tokens": 239906, + "reused_tokens": 0, + "freshly_processed_tokens": 239906, + "native_prompt_ms": 141910.0, + "native_decode_ms": 28.8, + "hit_rate": 0.779, + "ram_blobs": 106, + "file_blobs": 0, + "file_mb": 0.0, + "drafts_offered": 0, + "drafts_accepted": 0, + "power_cap_w": 272.0 + }, + { + "family": "tuned-v0.1.40.3", + "trial": "qsa-exact-native1", + "arm": "0-A-240000", + "case": "follow-240000", + "follow_source_tokens": 0, + "seconds": 0.3739995119976811, + "success": true, + "finish_reason": "length", + "output_cap": 1, + "generated_tokens": 1, + "request_sha256": "bd5c8f85d96ecd7db994611c323e1a644be0b8c66fd6ec2386ae2b23dbdafb34", + "output_sha256": "33462c6ad8d3c9823e7b43633ff1a94f7671c4d155888e47618b5f60027701e5", + "prompt_tokens": 239938, + "reused_tokens": 239906, + "freshly_processed_tokens": 32, + "native_prompt_ms": 302.6, + "native_decode_ms": 21.4, + "hit_rate": 0.756, + "ram_blobs": 117, + "file_blobs": 0, + "file_mb": 0.0, + "drafts_offered": 0, + "drafts_accepted": 0, + "power_cap_w": 272.0 + }, + { + "family": "tuned-v0.1.40.3", + "trial": "qsa-exact-native1", + "arm": "1-B-131072", + "case": "fresh-131072", + "follow_source_tokens": 0, + "seconds": 60.97881687400513, + "success": true, + "finish_reason": "length", + "output_cap": 1, + "generated_tokens": 1, + "request_sha256": "029dc64c403bd9597b2a143399fa64555b40b8a4910c708fe3f7c3ddc5a1ad25", + "output_sha256": "d6fadeb81a0f0a9f23a6a06f4c0f266f0afe25f436a0aa575ac593e2d695c969", + "prompt_tokens": 130978, + "reused_tokens": 0, + "freshly_processed_tokens": 130978, + "native_prompt_ms": 60863.3, + "native_decode_ms": 40.1, + "hit_rate": 0.787, + "ram_blobs": 102, + "file_blobs": 0, + "file_mb": 0.0, + "drafts_offered": 0, + "drafts_accepted": 0, + "power_cap_w": 272.0 + }, + { + "family": "tuned-v0.1.40.3", + "trial": "qsa-exact-native1", + "arm": "1-B-131072", + "case": "follow-131072", + "follow_source_tokens": 0, + "seconds": 0.36607142200227827, + "success": true, + "finish_reason": "length", + "output_cap": 1, + "generated_tokens": 1, + "request_sha256": "04d4aba48d6b685765f804b257d6a2872758acf1c10c942ab83d93dd55649fde", + "output_sha256": "33462c6ad8d3c9823e7b43633ff1a94f7671c4d155888e47618b5f60027701e5", + "prompt_tokens": 131010, + "reused_tokens": 130978, + "freshly_processed_tokens": 32, + "native_prompt_ms": 316.8, + "native_decode_ms": 20.0, + "hit_rate": 0.769, + "ram_blobs": 111, + "file_blobs": 0, + "file_mb": 0.0, + "drafts_offered": 0, + "drafts_accepted": 0, + "power_cap_w": 272.0 + }, + { + "family": "tuned-v0.1.40.3", + "trial": "qsa-exact-native1", + "arm": "1-B-240000", + "case": "fresh-240000", + "follow_source_tokens": 0, + "seconds": 109.54931649801438, + "success": true, + "finish_reason": "length", + "output_cap": 1, + "generated_tokens": 1, + "request_sha256": "dbb6d4004af260501404a2674660c00523b1c455ba557d431395dab5cee7c4dd", + "output_sha256": "d6fadeb81a0f0a9f23a6a06f4c0f266f0afe25f436a0aa575ac593e2d695c969", + "prompt_tokens": 239906, + "reused_tokens": 0, + "freshly_processed_tokens": 239906, + "native_prompt_ms": 109397.8, + "native_decode_ms": 29.1, + "hit_rate": 0.779, + "ram_blobs": 106, + "file_blobs": 0, + "file_mb": 0.0, + "drafts_offered": 0, + "drafts_accepted": 0, + "power_cap_w": 272.0 + }, + { + "family": "tuned-v0.1.40.3", + "trial": "qsa-exact-native1", + "arm": "1-B-240000", + "case": "follow-240000", + "follow_source_tokens": 0, + "seconds": 0.3701446990016848, + "success": true, + "finish_reason": "length", + "output_cap": 1, + "generated_tokens": 1, + "request_sha256": "bd5c8f85d96ecd7db994611c323e1a644be0b8c66fd6ec2386ae2b23dbdafb34", + "output_sha256": "33462c6ad8d3c9823e7b43633ff1a94f7671c4d155888e47618b5f60027701e5", + "prompt_tokens": 239938, + "reused_tokens": 239906, + "freshly_processed_tokens": 32, + "native_prompt_ms": 300.3, + "native_decode_ms": 21.4, + "hit_rate": 0.756, + "ram_blobs": 117, + "file_blobs": 0, + "file_mb": 0.0, + "drafts_offered": 0, + "drafts_accepted": 0, + "power_cap_w": 272.0 + }, + { + "family": "tuned-v0.1.40.3", + "trial": "qsa-exact-native2", + "arm": "0-B-131072", + "case": "fresh-131072", + "follow_source_tokens": 2048, + "seconds": 58.86296121100895, + "success": true, + "finish_reason": "length", + "output_cap": 1, + "generated_tokens": 1, + "request_sha256": "029dc64c403bd9597b2a143399fa64555b40b8a4910c708fe3f7c3ddc5a1ad25", + "output_sha256": "d6fadeb81a0f0a9f23a6a06f4c0f266f0afe25f436a0aa575ac593e2d695c969", + "prompt_tokens": 130978, + "reused_tokens": 0, + "freshly_processed_tokens": 130978, + "native_prompt_ms": 58764.6, + "native_decode_ms": 27.6, + "hit_rate": 0.787, + "ram_blobs": 102, + "file_blobs": 0, + "file_mb": 0.0, + "drafts_offered": 0, + "drafts_accepted": 0, + "power_cap_w": 272.0 + }, + { + "family": "tuned-v0.1.40.3", + "trial": "qsa-exact-native2", + "arm": "0-B-131072", + "case": "follow-131072", + "follow_source_tokens": 2048, + "seconds": 2.629391199006932, + "success": true, + "finish_reason": "length", + "output_cap": 1, + "generated_tokens": 1, + "request_sha256": "9f2979c0f702e087be57384d4b312a89f606961d08f0beaff64abd550b91b41d", + "output_sha256": "d6fadeb81a0f0a9f23a6a06f4c0f266f0afe25f436a0aa575ac593e2d695c969", + "prompt_tokens": 133063, + "reused_tokens": 130978, + "freshly_processed_tokens": 2085, + "native_prompt_ms": 2580.1, + "native_decode_ms": 20.5, + "hit_rate": 0.758, + "ram_blobs": 116, + "file_blobs": 0, + "file_mb": 0.0, + "drafts_offered": 0, + "drafts_accepted": 0, + "power_cap_w": 272.0 + }, + { + "family": "tuned-v0.1.40.3", + "trial": "qsa-exact-native2", + "arm": "0-B-240000", + "case": "fresh-240000", + "follow_source_tokens": 2048, + "seconds": 110.438449467998, + "success": true, + "finish_reason": "length", + "output_cap": 1, + "generated_tokens": 1, + "request_sha256": "dbb6d4004af260501404a2674660c00523b1c455ba557d431395dab5cee7c4dd", + "output_sha256": "d6fadeb81a0f0a9f23a6a06f4c0f266f0afe25f436a0aa575ac593e2d695c969", + "prompt_tokens": 239906, + "reused_tokens": 0, + "freshly_processed_tokens": 239906, + "native_prompt_ms": 110293.6, + "native_decode_ms": 29.2, + "hit_rate": 0.779, + "ram_blobs": 106, + "file_blobs": 0, + "file_mb": 0.0, + "drafts_offered": 0, + "drafts_accepted": 0, + "power_cap_w": 272.0 + }, + { + "family": "tuned-v0.1.40.3", + "trial": "qsa-exact-native2", + "arm": "0-B-240000", + "case": "follow-240000", + "follow_source_tokens": 2048, + "seconds": 3.935525797016453, + "success": true, + "finish_reason": "length", + "output_cap": 1, + "generated_tokens": 1, + "request_sha256": "523b45e7fa9be241cf0434f58ef29285c15a565df7779dae176d8f5a4df2626e", + "output_sha256": "33462c6ad8d3c9823e7b43633ff1a94f7671c4d155888e47618b5f60027701e5", + "prompt_tokens": 241991, + "reused_tokens": 239906, + "freshly_processed_tokens": 2085, + "native_prompt_ms": 3865.4, + "native_decode_ms": 22.2, + "hit_rate": 0.779, + "ram_blobs": 106, + "file_blobs": 0, + "file_mb": 0.0, + "drafts_offered": 0, + "drafts_accepted": 0, + "power_cap_w": 272.0 + }, + { + "family": "tuned-v0.1.40.3", + "trial": "qsa-exact-native2", + "arm": "1-A-131072", + "case": "fresh-131072", + "follow_source_tokens": 2048, + "seconds": 68.45079464002629, + "success": true, + "finish_reason": "length", + "output_cap": 1, + "generated_tokens": 1, + "request_sha256": "029dc64c403bd9597b2a143399fa64555b40b8a4910c708fe3f7c3ddc5a1ad25", + "output_sha256": "d6fadeb81a0f0a9f23a6a06f4c0f266f0afe25f436a0aa575ac593e2d695c969", + "prompt_tokens": 130978, + "reused_tokens": 0, + "freshly_processed_tokens": 130978, + "native_prompt_ms": 68353.8, + "native_decode_ms": 27.6, + "hit_rate": 0.787, + "ram_blobs": 102, + "file_blobs": 0, + "file_mb": 0.0, + "drafts_offered": 0, + "drafts_accepted": 0, + "power_cap_w": 272.0 + }, + { + "family": "tuned-v0.1.40.3", + "trial": "qsa-exact-native2", + "arm": "1-A-131072", + "case": "follow-131072", + "follow_source_tokens": 2048, + "seconds": 2.858728800987592, + "success": true, + "finish_reason": "length", + "output_cap": 1, + "generated_tokens": 1, + "request_sha256": "9f2979c0f702e087be57384d4b312a89f606961d08f0beaff64abd550b91b41d", + "output_sha256": "d6fadeb81a0f0a9f23a6a06f4c0f266f0afe25f436a0aa575ac593e2d695c969", + "prompt_tokens": 133063, + "reused_tokens": 130978, + "freshly_processed_tokens": 2085, + "native_prompt_ms": 2809.2, + "native_decode_ms": 20.2, + "hit_rate": 0.758, + "ram_blobs": 116, + "file_blobs": 0, + "file_mb": 0.0, + "drafts_offered": 0, + "drafts_accepted": 0, + "power_cap_w": 272.0 + }, + { + "family": "tuned-v0.1.40.3", + "trial": "qsa-exact-native2", + "arm": "1-A-240000", + "case": "fresh-240000", + "follow_source_tokens": 2048, + "seconds": 141.66012979499646, + "success": true, + "finish_reason": "length", + "output_cap": 1, + "generated_tokens": 1, + "request_sha256": "dbb6d4004af260501404a2674660c00523b1c455ba557d431395dab5cee7c4dd", + "output_sha256": "d6fadeb81a0f0a9f23a6a06f4c0f266f0afe25f436a0aa575ac593e2d695c969", + "prompt_tokens": 239906, + "reused_tokens": 0, + "freshly_processed_tokens": 239906, + "native_prompt_ms": 141512.5, + "native_decode_ms": 28.6, + "hit_rate": 0.779, + "ram_blobs": 106, + "file_blobs": 0, + "file_mb": 0.0, + "drafts_offered": 0, + "drafts_accepted": 0, + "power_cap_w": 272.0 + }, + { + "family": "tuned-v0.1.40.3", + "trial": "qsa-exact-native2", + "arm": "1-A-240000", + "case": "follow-240000", + "follow_source_tokens": 2048, + "seconds": 3.2768524099956267, + "success": true, + "finish_reason": "length", + "output_cap": 1, + "generated_tokens": 1, + "request_sha256": "523b45e7fa9be241cf0434f58ef29285c15a565df7779dae176d8f5a4df2626e", + "output_sha256": "33462c6ad8d3c9823e7b43633ff1a94f7671c4d155888e47618b5f60027701e5", + "prompt_tokens": 241991, + "reused_tokens": 239906, + "freshly_processed_tokens": 2085, + "native_prompt_ms": 3203.6, + "native_decode_ms": 21.5, + "hit_rate": 0.779, + "ram_blobs": 106, + "file_blobs": 0, + "file_mb": 0.0, + "drafts_offered": 0, + "drafts_accepted": 0, + "power_cap_w": 272.0 + }, + { + "family": "tuned-v0.1.40.3", + "trial": "qsa-exact-native3", + "arm": "0-A-131072", + "case": "fresh-131072", + "follow_source_tokens": 2048, + "seconds": 67.51405035398784, + "success": true, + "finish_reason": "length", + "output_cap": 1, + "generated_tokens": 1, + "request_sha256": "029dc64c403bd9597b2a143399fa64555b40b8a4910c708fe3f7c3ddc5a1ad25", + "output_sha256": "d6fadeb81a0f0a9f23a6a06f4c0f266f0afe25f436a0aa575ac593e2d695c969", + "prompt_tokens": 130978, + "reused_tokens": 0, + "freshly_processed_tokens": 130978, + "native_prompt_ms": 67406.7, + "native_decode_ms": 36.3, + "hit_rate": 0.792, + "ram_blobs": 100, + "file_blobs": 0, + "file_mb": 0.0, + "drafts_offered": 0, + "drafts_accepted": 0, + "power_cap_w": 272.0 + }, + { + "family": "tuned-v0.1.40.3", + "trial": "qsa-exact-native3", + "arm": "0-A-131072", + "case": "follow-131072", + "follow_source_tokens": 2048, + "seconds": 2.798884452000493, + "success": true, + "finish_reason": "length", + "output_cap": 1, + "generated_tokens": 1, + "request_sha256": "9f2979c0f702e087be57384d4b312a89f606961d08f0beaff64abd550b91b41d", + "output_sha256": "d6fadeb81a0f0a9f23a6a06f4c0f266f0afe25f436a0aa575ac593e2d695c969", + "prompt_tokens": 133063, + "reused_tokens": 130978, + "freshly_processed_tokens": 2085, + "native_prompt_ms": 2747.8, + "native_decode_ms": 20.4, + "hit_rate": 0.765, + "ram_blobs": 113, + "file_blobs": 0, + "file_mb": 0.0, + "drafts_offered": 0, + "drafts_accepted": 0, + "power_cap_w": 272.0 + }, + { + "family": "tuned-v0.1.40.3", + "trial": "qsa-exact-native3", + "arm": "0-A-240000", + "case": "fresh-240000", + "follow_source_tokens": 2048, + "seconds": 144.43555261398433, + "success": true, + "finish_reason": "length", + "output_cap": 1, + "generated_tokens": 1, + "request_sha256": "dbb6d4004af260501404a2674660c00523b1c455ba557d431395dab5cee7c4dd", + "output_sha256": "d6fadeb81a0f0a9f23a6a06f4c0f266f0afe25f436a0aa575ac593e2d695c969", + "prompt_tokens": 239906, + "reused_tokens": 0, + "freshly_processed_tokens": 239906, + "native_prompt_ms": 144288.4, + "native_decode_ms": 29.2, + "hit_rate": 0.779, + "ram_blobs": 106, + "file_blobs": 0, + "file_mb": 0.0, + "drafts_offered": 0, + "drafts_accepted": 0, + "power_cap_w": 272.0 + }, + { + "family": "tuned-v0.1.40.3", + "trial": "qsa-exact-native3", + "arm": "0-A-240000", + "case": "follow-240000", + "follow_source_tokens": 2048, + "seconds": 3.558641466021072, + "success": true, + "finish_reason": "length", + "output_cap": 1, + "generated_tokens": 1, + "request_sha256": "523b45e7fa9be241cf0434f58ef29285c15a565df7779dae176d8f5a4df2626e", + "output_sha256": "33462c6ad8d3c9823e7b43633ff1a94f7671c4d155888e47618b5f60027701e5", + "prompt_tokens": 241991, + "reused_tokens": 239906, + "freshly_processed_tokens": 2085, + "native_prompt_ms": 3486.1, + "native_decode_ms": 21.2, + "hit_rate": 0.775, + "ram_blobs": 108, + "file_blobs": 0, + "file_mb": 0.0, + "drafts_offered": 0, + "drafts_accepted": 0, + "power_cap_w": 272.0 + }, + { + "family": "tuned-v0.1.40.3", + "trial": "qsa-exact-native3", + "arm": "1-B-131072", + "case": "fresh-131072", + "follow_source_tokens": 2048, + "seconds": 59.46537054501823, + "success": true, + "finish_reason": "length", + "output_cap": 1, + "generated_tokens": 1, + "request_sha256": "029dc64c403bd9597b2a143399fa64555b40b8a4910c708fe3f7c3ddc5a1ad25", + "output_sha256": "d6fadeb81a0f0a9f23a6a06f4c0f266f0afe25f436a0aa575ac593e2d695c969", + "prompt_tokens": 130978, + "reused_tokens": 0, + "freshly_processed_tokens": 130978, + "native_prompt_ms": 59369.3, + "native_decode_ms": 27.0, + "hit_rate": 0.787, + "ram_blobs": 102, + "file_blobs": 0, + "file_mb": 0.0, + "drafts_offered": 0, + "drafts_accepted": 0, + "power_cap_w": 272.0 + }, + { + "family": "tuned-v0.1.40.3", + "trial": "qsa-exact-native3", + "arm": "1-B-131072", + "case": "follow-131072", + "follow_source_tokens": 2048, + "seconds": 2.687445471994579, + "success": true, + "finish_reason": "length", + "output_cap": 1, + "generated_tokens": 1, + "request_sha256": "9f2979c0f702e087be57384d4b312a89f606961d08f0beaff64abd550b91b41d", + "output_sha256": "d6fadeb81a0f0a9f23a6a06f4c0f266f0afe25f436a0aa575ac593e2d695c969", + "prompt_tokens": 133063, + "reused_tokens": 130978, + "freshly_processed_tokens": 2085, + "native_prompt_ms": 2634.6, + "native_decode_ms": 20.5, + "hit_rate": 0.758, + "ram_blobs": 116, + "file_blobs": 0, + "file_mb": 0.0, + "drafts_offered": 0, + "drafts_accepted": 0, + "power_cap_w": 272.0 + }, + { + "family": "tuned-v0.1.40.3", + "trial": "qsa-exact-native3", + "arm": "1-B-240000", + "case": "fresh-240000", + "follow_source_tokens": 2048, + "seconds": 111.23212432701257, + "success": true, + "finish_reason": "length", + "output_cap": 1, + "generated_tokens": 1, + "request_sha256": "dbb6d4004af260501404a2674660c00523b1c455ba557d431395dab5cee7c4dd", + "output_sha256": "d6fadeb81a0f0a9f23a6a06f4c0f266f0afe25f436a0aa575ac593e2d695c969", + "prompt_tokens": 239906, + "reused_tokens": 0, + "freshly_processed_tokens": 239906, + "native_prompt_ms": 111085.7, + "native_decode_ms": 31.8, + "hit_rate": 0.779, + "ram_blobs": 106, + "file_blobs": 0, + "file_mb": 0.0, + "drafts_offered": 0, + "drafts_accepted": 0, + "power_cap_w": 272.0 + }, + { + "family": "tuned-v0.1.40.3", + "trial": "qsa-exact-native3", + "arm": "1-B-240000", + "case": "follow-240000", + "follow_source_tokens": 2048, + "seconds": 2.8976090920041315, + "success": true, + "finish_reason": "length", + "output_cap": 1, + "generated_tokens": 1, + "request_sha256": "523b45e7fa9be241cf0434f58ef29285c15a565df7779dae176d8f5a4df2626e", + "output_sha256": "33462c6ad8d3c9823e7b43633ff1a94f7671c4d155888e47618b5f60027701e5", + "prompt_tokens": 241991, + "reused_tokens": 239906, + "freshly_processed_tokens": 2085, + "native_prompt_ms": 2821.8, + "native_decode_ms": 21.2, + "hit_rate": 0.779, + "ram_blobs": 106, + "file_blobs": 0, + "file_mb": 0.0, + "drafts_offered": 0, + "drafts_accepted": 0, + "power_cap_w": 272.0 + }, + { + "family": "current-main-same-binary", + "trial": "qsa-exact-current-main1", + "arm": "0-A-131072", + "case": "fresh-131072", + "follow_source_tokens": 2048, + "seconds": 68.87175908501376, + "success": true, + "finish_reason": "length", + "output_cap": 1, + "generated_tokens": 1, + "request_sha256": "029dc64c403bd9597b2a143399fa64555b40b8a4910c708fe3f7c3ddc5a1ad25", + "output_sha256": "d6fadeb81a0f0a9f23a6a06f4c0f266f0afe25f436a0aa575ac593e2d695c969", + "prompt_tokens": 130978, + "reused_tokens": 0, + "freshly_processed_tokens": 130978, + "native_prompt_ms": 68771.6, + "native_decode_ms": 28.8, + "hit_rate": 0.785, + "ram_blobs": 103, + "file_blobs": 0, + "file_mb": 0.0, + "drafts_offered": 0, + "drafts_accepted": 0, + "power_cap_w": 272.0 + }, + { + "family": "current-main-same-binary", + "trial": "qsa-exact-current-main1", + "arm": "0-A-131072", + "case": "follow-131072", + "follow_source_tokens": 2048, + "seconds": 2.8957397949998267, + "success": true, + "finish_reason": "length", + "output_cap": 1, + "generated_tokens": 1, + "request_sha256": "9f2979c0f702e087be57384d4b312a89f606961d08f0beaff64abd550b91b41d", + "output_sha256": "d6fadeb81a0f0a9f23a6a06f4c0f266f0afe25f436a0aa575ac593e2d695c969", + "prompt_tokens": 133063, + "reused_tokens": 130978, + "freshly_processed_tokens": 2085, + "native_prompt_ms": 2847.5, + "native_decode_ms": 20.1, + "hit_rate": 0.758, + "ram_blobs": 116, + "file_blobs": 0, + "file_mb": 0.0, + "drafts_offered": 0, + "drafts_accepted": 0, + "power_cap_w": 272.0 + }, + { + "family": "current-main-same-binary", + "trial": "qsa-exact-current-main1", + "arm": "0-A-240000", + "case": "fresh-240000", + "follow_source_tokens": 2048, + "seconds": 142.8425963030022, + "success": true, + "finish_reason": "length", + "output_cap": 1, + "generated_tokens": 1, + "request_sha256": "dbb6d4004af260501404a2674660c00523b1c455ba557d431395dab5cee7c4dd", + "output_sha256": "d6fadeb81a0f0a9f23a6a06f4c0f266f0afe25f436a0aa575ac593e2d695c969", + "prompt_tokens": 239906, + "reused_tokens": 0, + "freshly_processed_tokens": 239906, + "native_prompt_ms": 142694.7, + "native_decode_ms": 29.4, + "hit_rate": 0.779, + "ram_blobs": 106, + "file_blobs": 0, + "file_mb": 0.0, + "drafts_offered": 0, + "drafts_accepted": 0, + "power_cap_w": 272.0 + }, + { + "family": "current-main-same-binary", + "trial": "qsa-exact-current-main1", + "arm": "0-A-240000", + "case": "follow-240000", + "follow_source_tokens": 2048, + "seconds": 3.522451185999671, + "success": true, + "finish_reason": "length", + "output_cap": 1, + "generated_tokens": 1, + "request_sha256": "523b45e7fa9be241cf0434f58ef29285c15a565df7779dae176d8f5a4df2626e", + "output_sha256": "33462c6ad8d3c9823e7b43633ff1a94f7671c4d155888e47618b5f60027701e5", + "prompt_tokens": 241991, + "reused_tokens": 239906, + "freshly_processed_tokens": 2085, + "native_prompt_ms": 3445.8, + "native_decode_ms": 22.3, + "hit_rate": 0.779, + "ram_blobs": 106, + "file_blobs": 0, + "file_mb": 0.0, + "drafts_offered": 0, + "drafts_accepted": 0, + "power_cap_w": 272.0 + }, + { + "family": "current-main-same-binary", + "trial": "qsa-exact-current-main1", + "arm": "1-B-131072", + "case": "fresh-131072", + "follow_source_tokens": 2048, + "seconds": 60.01953978999518, + "success": true, + "finish_reason": "length", + "output_cap": 1, + "generated_tokens": 1, + "request_sha256": "029dc64c403bd9597b2a143399fa64555b40b8a4910c708fe3f7c3ddc5a1ad25", + "output_sha256": "d6fadeb81a0f0a9f23a6a06f4c0f266f0afe25f436a0aa575ac593e2d695c969", + "prompt_tokens": 130978, + "reused_tokens": 0, + "freshly_processed_tokens": 130978, + "native_prompt_ms": 59918.8, + "native_decode_ms": 27.0, + "hit_rate": 0.787, + "ram_blobs": 102, + "file_blobs": 0, + "file_mb": 0.0, + "drafts_offered": 0, + "drafts_accepted": 0, + "power_cap_w": 272.0 + }, + { + "family": "current-main-same-binary", + "trial": "qsa-exact-current-main1", + "arm": "1-B-131072", + "case": "follow-131072", + "follow_source_tokens": 2048, + "seconds": 2.780924443999538, + "success": true, + "finish_reason": "length", + "output_cap": 1, + "generated_tokens": 1, + "request_sha256": "9f2979c0f702e087be57384d4b312a89f606961d08f0beaff64abd550b91b41d", + "output_sha256": "d6fadeb81a0f0a9f23a6a06f4c0f266f0afe25f436a0aa575ac593e2d695c969", + "prompt_tokens": 133063, + "reused_tokens": 130978, + "freshly_processed_tokens": 2085, + "native_prompt_ms": 2730.0, + "native_decode_ms": 21.3, + "hit_rate": 0.758, + "ram_blobs": 116, + "file_blobs": 0, + "file_mb": 0.0, + "drafts_offered": 0, + "drafts_accepted": 0, + "power_cap_w": 272.0 + }, + { + "family": "current-main-same-binary", + "trial": "qsa-exact-current-main1", + "arm": "1-B-240000", + "case": "fresh-240000", + "follow_source_tokens": 2048, + "seconds": 111.82761004997883, + "success": true, + "finish_reason": "length", + "output_cap": 1, + "generated_tokens": 1, + "request_sha256": "dbb6d4004af260501404a2674660c00523b1c455ba557d431395dab5cee7c4dd", + "output_sha256": "d6fadeb81a0f0a9f23a6a06f4c0f266f0afe25f436a0aa575ac593e2d695c969", + "prompt_tokens": 239906, + "reused_tokens": 0, + "freshly_processed_tokens": 239906, + "native_prompt_ms": 111680.4, + "native_decode_ms": 28.7, + "hit_rate": 0.779, + "ram_blobs": 106, + "file_blobs": 0, + "file_mb": 0.0, + "drafts_offered": 0, + "drafts_accepted": 0, + "power_cap_w": 272.0 + }, + { + "family": "current-main-same-binary", + "trial": "qsa-exact-current-main1", + "arm": "1-B-240000", + "case": "follow-240000", + "follow_source_tokens": 2048, + "seconds": 2.957570611004485, + "success": true, + "finish_reason": "length", + "output_cap": 1, + "generated_tokens": 1, + "request_sha256": "523b45e7fa9be241cf0434f58ef29285c15a565df7779dae176d8f5a4df2626e", + "output_sha256": "33462c6ad8d3c9823e7b43633ff1a94f7671c4d155888e47618b5f60027701e5", + "prompt_tokens": 241991, + "reused_tokens": 239906, + "freshly_processed_tokens": 2085, + "native_prompt_ms": 2884.7, + "native_decode_ms": 21.3, + "hit_rate": 0.777, + "ram_blobs": 107, + "file_blobs": 0, + "file_mb": 0.0, + "drafts_offered": 0, + "drafts_accepted": 0, + "power_cap_w": 272.0 + } + ], + "summaries": [ + { + "family": "tuned-v0.1.40.3", + "case": "fresh-131072", + "off": { + "n": 3, + "mean_seconds": 66.74059194500053, + "median_seconds": 67.51405035398784, + "min_seconds": 64.25693084098748, + "max_seconds": 68.45079464002629 + }, + "on": { + "n": 3, + "mean_seconds": 59.7690495433441, + "median_seconds": 59.46537054501823, + "min_seconds": 58.86296121100895, + "max_seconds": 60.97881687400513 + }, + "mean_elapsed_reduction": 0.10445730549410659, + "median_elapsed_reduction": 0.11921488589069962 + }, + { + "family": "tuned-v0.1.40.3", + "case": "fresh-240000", + "off": { + "n": 3, + "mean_seconds": 142.71826253732434, + "median_seconds": 142.0591052029922, + "min_seconds": 141.66012979499646, + "max_seconds": 144.43555261398433 + }, + "on": { + "n": 3, + "mean_seconds": 110.40663009767498, + "median_seconds": 110.438449467998, + "min_seconds": 109.54931649801438, + "max_seconds": 111.23212432701257 + }, + "mean_elapsed_reduction": 0.22640152609200292, + "median_elapsed_reduction": 0.22258802552508394 + }, + { + "family": "current-main-same-binary", + "case": "fresh-131072", + "off": { + "n": 1, + "mean_seconds": 68.87175908501376, + "median_seconds": 68.87175908501376, + "min_seconds": 68.87175908501376, + "max_seconds": 68.87175908501376 + }, + "on": { + "n": 1, + "mean_seconds": 60.01953978999518, + "median_seconds": 60.01953978999518, + "min_seconds": 60.01953978999518, + "max_seconds": 60.01953978999518 + }, + "mean_elapsed_reduction": 0.12853191805499842, + "median_elapsed_reduction": 0.12853191805499842 + }, + { + "family": "current-main-same-binary", + "case": "fresh-240000", + "off": { + "n": 1, + "mean_seconds": 142.8425963030022, + "median_seconds": 142.8425963030022, + "min_seconds": 142.8425963030022, + "max_seconds": 142.8425963030022 + }, + "on": { + "n": 1, + "mean_seconds": 111.82761004997883, + "median_seconds": 111.82761004997883, + "min_seconds": 111.82761004997883, + "max_seconds": 111.82761004997883 + }, + "mean_elapsed_reduction": 0.2171270129201055, + "median_elapsed_reduction": 0.2171270129201055 + }, + { + "family": "tuned-v0.1.40.3", + "case": "follow-131072", + "off": { + "n": 2, + "mean_seconds": 2.8288066264940426, + "median_seconds": 2.8288066264940426, + "min_seconds": 2.798884452000493, + "max_seconds": 2.858728800987592 + }, + "on": { + "n": 2, + "mean_seconds": 2.6584183355007553, + "median_seconds": 2.6584183355007553, + "min_seconds": 2.629391199006932, + "max_seconds": 2.687445471994579 + }, + "mean_elapsed_reduction": 0.06023327625065078, + "median_elapsed_reduction": 0.06023327625065078 + }, + { + "family": "tuned-v0.1.40.3", + "case": "follow-240000", + "off": { + "n": 2, + "mean_seconds": 3.4177469380083494, + "median_seconds": 3.4177469380083494, + "min_seconds": 3.2768524099956267, + "max_seconds": 3.558641466021072 + }, + "on": { + "n": 2, + "mean_seconds": 3.4165674445102923, + "median_seconds": 3.4165674445102923, + "min_seconds": 2.8976090920041315, + "max_seconds": 3.935525797016453 + }, + "mean_elapsed_reduction": 0.00034510849382674014, + "median_elapsed_reduction": 0.00034510849382674014 + }, + { + "family": "current-main-same-binary", + "case": "follow-131072", + "off": { + "n": 1, + "mean_seconds": 2.8957397949998267, + "median_seconds": 2.8957397949998267, + "min_seconds": 2.8957397949998267, + "max_seconds": 2.8957397949998267 + }, + "on": { + "n": 1, + "mean_seconds": 2.780924443999538, + "median_seconds": 2.780924443999538, + "min_seconds": 2.780924443999538, + "max_seconds": 2.780924443999538 + }, + "mean_elapsed_reduction": 0.039649747259247525, + "median_elapsed_reduction": 0.039649747259247525 + }, + { + "family": "current-main-same-binary", + "case": "follow-240000", + "off": { + "n": 1, + "mean_seconds": 3.522451185999671, + "median_seconds": 3.522451185999671, + "min_seconds": 3.522451185999671, + "max_seconds": 3.522451185999671 + }, + "on": { + "n": 1, + "mean_seconds": 2.957570611004485, + "median_seconds": 2.957570611004485, + "min_seconds": 2.957570611004485, + "max_seconds": 2.957570611004485 + }, + "mean_elapsed_reduction": 0.1603657638295627, + "median_elapsed_reduction": 0.1603657638295627 + } + ], + "coding_pilot": { + "scope": "Two official Exercism/Aider Polyglot tasks embedded in a192K source archive; not an official leaderboard run", + "seeds": [ + 7830, + 7831 + ], + "reasoning_effort": "xhigh", + "reasoning_budget_tokens": 8192, + "answer_reserve_tokens": 2048, + "temperature": 0.3, + "top_p": 0.95, + "top_k": 20, + "min_p": 0, + "archive_context": 196608, + "logical_context": 262144, + "paired_trials_per_task": 1, + "correction_time_included": true, + "completion_policy": "stop at first full-suite pass", + "rows": [ + { + "task": "go/alphametics", + "arm": "deployed", + "seconds": 209.1360279940127, + "turns": 3, + "success": true + }, + { + "task": "go/alphametics", + "arm": "candidate", + "seconds": 400.3182297559979, + "turns": 5, + "success": true + }, + { + "task": "rust/xorcism", + "arm": "candidate", + "seconds": 304.9063483380014, + "turns": 6, + "success": true + }, + { + "task": "rust/xorcism", + "arm": "deployed", + "seconds": 473.7341761919961, + "turns": 6, + "success": true + } + ], + "totals_seconds": { + "deployed": 682.8702041860088, + "candidate": 705.2245780939993 + }, + "elapsed_reduction": -0.03273590467259768, + "all_passed": true, + "minimum_available_gib": 8.621219635009766, + "resource_pass": true, + "general_promotion": false + }, + "abandoned_240k_archive_pilot": { + "status": "infrastructure_failure", + "reason": "Insufficient continuation headroom: Rust history reached262714tokens, exceeding262144", + "go_pair_seconds": { + "off": 325.555172590015, + "on": 323.6994908300112 + }, + "both_go_passed": true, + "rust_on_model_seconds_before_failure": 311, + "rust_off_not_attempted": true, + "pooled_with_192k_family": false + }, + "full24_run": false, + "cloud_comparison_run": false +} diff --git a/bench/results/2026-10-11-gfx1100-qsa-scores/prompt-source.txt.gz b/bench/results/2026-10-11-gfx1100-qsa-scores/prompt-source.txt.gz new file mode 100644 index 0000000000000000000000000000000000000000..436f2a826f654a977e0eb646187ac4919dbef5c3 GIT binary patch literal 20964 zcmV(`K-0e;iwFP!00002|Lwhdchko9Km0$hLeNFA!3nmk7?Y56r4ZUIZfO!q&&uI( zWm`@}e2Zo0@}qoT`}5g*W~7lck}okda1z?YmS*d6#Z$Yz3{s&|3u@0`+G1(0c8+ynf)(*XM)b z)yO|S8C!)`(Xz{Sbp^j_*5QfAEn4nmd@>jXvi6=g>iI$75BioLSSQ}dYhGE$BMioC zmoQ7{%b;VmPTbM4SF*+f^!&;idZPdp2F`6~RN{@d+RWgU(A0IKj4yjmPI+bta=e z8uqwadw}WVc0YMoZ9JhGok6!dxS%n%2K}~ALkrgBD$?S*&B3|H!xGEiAB@p!(G^;e zVYJfnRdC{VyH?Ya(}%_}*=~GfBkD#lrp@hkt>IwA?IuU8_Tu61JJ!Lwmxmv=_jjz_ z18Z;p-JiQJc3xQbwh!?AUdj5fd-(gi_lFir>~Ft4{EzkSrM3O`Kh~?=w=YW8&R=`` zI|m2WyM2PT`)2R;?hYRBzJ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aY4KhMY#K$@$Mr{glHDMMwSo2WILQQXyc zhH2jAlY+jre~E4M^$;g%eU$xEQmVTm4X!THDNIu;%&NY~2rle*7nVT9pAqG2&`90M z*3iwW-@Ti;;@LC#*<}B89gcRYr92}zihqBN9k4Nbgt+;=7}9*wf+^q^F-OS|D?*?m zX?!^~&vv`)1HM%l#ny;+SJnz;$f{C+;k9>Nu%`YZisf~|Iwr8SYkK1mCHE;W|IeSu)YR8D$$K^~V>C+E_kNyJ!&s1Zec) zJ#mj`W$LvOwXY2{3|{}0aB69af XuXIZ$Xjqp7*`5C%62k^5?8*TE9NB=n literal 0 HcmV?d00001 diff --git a/bench/results/2026-10-11-gfx1100-qsa-scores/provenance.json b/bench/results/2026-10-11-gfx1100-qsa-scores/provenance.json new file mode 100644 index 00000000..9632255e --- /dev/null +++ b/bench/results/2026-10-11-gfx1100-qsa-scores/provenance.json @@ -0,0 +1,168 @@ +{ + "hardware": { + "measured_date": "2026-10-11", + "cpu": "AMD Ryzen 9 7950X3D", + "gpu": "AMD Radeon RX 7900 XTX", + "architecture": "gfx1100", + "gpu_vram_gib": 24, + "installed_ram_gib": 64, + "kernel": "7.2.9-200.nobara.fc44.x86_64", + "rocm": "10.0.0", + "power_cap_w": 272, + "operating_system": { + "NAME": "Nobara Linux", + "VERSION": "44 (KDE Plasma Desktop Edition)", + "VERSION_ID": "44", + "PRETTY_NAME": "Nobara Linux 44 (KDE Plasma Desktop Edition)" + }, + "current_link_speed": "16.0 GT/s PCIe", + "current_link_width": "16", + "mem_info_vram_total": "25753026560", + "storage": { + "model": "NVMe SSD", + "ple": "dedicated ext4 SSD partition, direct I/O, remains on SSD" + } + }, + "upstream_base": "61b3fb5dd3f1e8ec09cf7e4e05208bc6d3c46406", + "original_method": { + "pr": 1825, + "commit": "14bf32150490bb9f5fc4d9c7c5dcfdc96dd98797", + "author": "xrip" + }, + "tuned_control": { + "source_base": "d5ea7133741e67743c0e886bb426c0ce8d69cf6c", + "local_changes": "PR1107 prefix reuse and resident-budget-loan implementation; same in both arms", + "native_sha256": "3bbaf98d7f83c91b0a40f369e5dee6ae4273284028b98d48dccde9e554f5c80c", + "candidate_sha256": "e0708d4fe0b0e096a36d793f47aebfdd3477e6157264b5739657977937381299" + }, + "current_main": { + "native_sha256": "1338d642a7d1d1e34a8f38932aef82619a6ac0e6f5195a7f1661dd55f916b8ad", + "sole_arm_difference": "STRATA_SCORES_THREAD=0 versus1 at process startup" + }, + "submitted_source_files": { + "CMakeLists.txt": "84048b34a1065672c9d3577053611fc33e3e63815d33ae502ee15e8deefd5d6a", + "src/kernels/cuda/qsa_select.cu": "fe051b86dfb349d09f0b576f9b9e710d20334acb534021a869763a7cb59836d8", + "src/kernels/cuda/qsa_scores_gfx1100_test.cu": "2a26063e9c5c58cb36f0973b36bb590db10762515f9eda5318314162fafda588", + "src/kernels/qsa_scores_gfx1100_parity.cpp": "9d0d88a2490d41d5e059e08db0907433b63321c98b53dceffc88883174aa3e15" + }, + "compiler_checks": { + "hip_full_engine": true, + "hip_cmake_test_target": true, + "cuda_touched_module": true, + "cuda_arch": "sm_89", + "cuda_toolkit": "13.0", + "cuda_full_engine": false, + "cuda_gpu_execution": false, + "sycl_source_touched": false + }, + "frontend": { + "version": "local prefix-cache frontend based on0.1.40.3; same for all arms", + "sha256": "5963c61106ee746673c43cb69df7b6bfeff2d2ec320a00f2435e1fd6e187f9dd", + "stock_latest_frontend_tested": false, + "chat_template_sha256": "a49e6e5da2cb6d114814c9ee5079677dfd1bdc4cf6b5c1519eb73d0bcf12f02b" + }, + "model": { + "repository": "https://huggingface.co/orcarouter/Qwen3.8-Flash-Next-Uncensored-GGUF", + "quantization": "IQ3_S", + "revision": "not recorded", + "gguf_shards": [ + "Qwen3.8-Flash-Next-GSQ-RCO-abliterated-IQ3_S-00001-of-00002.gguf", + "Qwen3.8-Flash-Next-GSQ-RCO-abliterated-IQ3_S-00002-of-00002.gguf" + ], + "expert_profile_sha256": "e93f33e1cad05fc31627295b1b9a253bfa99286ec2261c01e5c39366888e69f8", + "index_sha256": "02e228d5488792b1c2cb97b7021d099f47b198f5e13d0b9f9bc8716bb0592146", + "native_experts_sha256": "adba4968661f3d59f749a676a87948e29236c81997f649f5526daf71148edc24" + }, + "shared_config": { + "args": [ + "--pack", + "", + "--native", + "/IQ3_S/Qwen3.8-Flash-Next-GSQ-RCO-abliterated-IQ3_S-00001-of-00002.gguf", + "--ple-gguf", + "/Qwen3.8-Flash-Next-GSQ-RCO-abliterated-IQ3_S-00002-of-00002.gguf", + "--mmap-experts", + "--expert-profile", + "/flash-solo-balanced-20261004.bin", + "--expert-cache", + "8247", + "--prefill", + "16384", + "--spec", + "6", + "--spec-min-p", + "0.7", + "--mtp", + "/strata/rt", + "--max-context", + "262144", + "--kv", + "int8", + "--kv-resident", + "32768", + "--vision", + "--pool-workers", + "15", + "--adapt-every", + "0", + "--pcie-frac", + "0", + "--vram-reserve-mib", + "1024", + "--resident-budget-gib", + "34", + "--mtp-max-t", + "6", + "--ple-io", + "direct", + "--conversation-cache-mib", + "1024", + "--conversation-cache-slots", + "2", + "--conversation-cache-min-free-mib", + "8192", + "--native-dense-gguf", + "/IQ3_S/Qwen3.8-Flash-Next-GSQ-RCO-abliterated-IQ3_S-00001-of-00002.gguf", + "--native-dense-gguf", + "/Qwen3.8-Flash-Next-GSQ-RCO-abliterated-IQ3_S-00002-of-00002.gguf" + ], + "environment": { + "ROCR_VISIBLE_DEVICES": "0", + "HIP_VISIBLE_DEVICES": "0", + "CUDA_VISIBLE_DEVICES": "-1", + "STRATA_GPU_BACKEND": "hip", + "STRATA_PREFILL_MMQ": "1", + "STRATA_PREFILL_RING": "96", + "STRATA_DEC_BATCH": "1", + "STRATA_PREFILL_ISSUER": "1", + "STRATA_SCORES_MULTI": "2", + "STRATA_RESIDENT_PIN": "0", + "STRATA_RESIDENT_HEADROOM_GIB": "2", + "STRATA_MMAP_STAGE_PREFETCH": "1", + "STRATA_REFILL_BLOCKING": "1", + "STRATA_WMMA_GEMM": "0", + "STRATA_PA_WMMA": "1", + "STRATA_SELECT_WMMA": "0", + "STRATA_PREFILL_GROUP_GATHER": "1", + "STRATA_STAGER_DMA_FENCE": "1", + "STRATA_IO_THREADS": "32", + "STRATA_DECODE_TIMING": "1", + "STRATA_HIP_WMMA": "1", + "STRATA_HIPBLASLT_VERBOSE": "1", + "STRATA_SH_STREAM": "0", + "STRATA_RESIDENT_BUDGET_LOANS": "1", + "STRATA_SELECT_SIMT": "0", + "STRATA_STAGE_PIN": "0", + "STRATA_VISION_BACKEND_DIR": "", + "STRATA_HIPBLASLT_TUNING": "hipblaslt-gfx1100-100401.txt" + }, + "configured_expert_slots": 8247, + "actual_gpu_expert_slots": 8144, + "actual_gpu_expert_bytes": 16622003200, + "logical_context": 262144, + "vision": "GPU enabled; no image prompt in these measurements", + "cgroup_memory_limit_gib": 56, + "cgroup_swap_limit": 0, + "available_memory_floor_gib": 8 + } +} diff --git a/docs/AMD_HIP.md b/docs/AMD_HIP.md index 47327380..d0038683 100644 --- a/docs/AMD_HIP.md +++ b/docs/AMD_HIP.md @@ -299,6 +299,17 @@ only when its version matches the installed library; otherwise it prefills on pl prompt), so keep the table and the library paired. Not worth trying (measured flat): `--kv-resident` changes, a prefill chunk above 32768, `--spec` above 4. +## gfx1100: optional exact long-prompt QSA scorer + +`STRATA_SCORES_THREAD=1` at engine startup enables a HIP port of #1825's score kernel on gfx1100, for batches of +at least 64 queries with at least 16,385 live index blocks. The default, short-prompt and decode paths keep the +existing scorer. On one RX 7900 XTX / 7950X3D / ROCm 10.0.0, three paired runs of a tuned 0.1.40.3 engine reduced +fresh one-token request time by 10.45% at 130,978 prompt tokens and 22.64% at 239,906; one same-binary current-main +pair measured 12.85% and 21.71%. Cached follow-ups did not show a repeatable large gain, and a two-task coding pilot +was 3.27% slower overall. This is opt-in, not a general coding-speed recommendation. The +[report, per-run data and standalone score/ID check](../bench/results/2026-10-11-gfx1100-qsa-scores/README.md) +give the settings, exact-parity checks and limits. `STRATA_SCORES_THREAD_TRACE=1` prints an engagement line. + ## Linux: verify timeouts while the kernel reclaims host memory (experimental workarounds) A `verify: timed out at layer N` or "no progress for 60 s" message does not by itself mean a kernel or handshake bug. Two diff --git a/src/kernels/cuda/qsa_scores_gfx1100_test.cu b/src/kernels/cuda/qsa_scores_gfx1100_test.cu new file mode 100644 index 00000000..fdc56877 --- /dev/null +++ b/src/kernels/cuda/qsa_scores_gfx1100_test.cu @@ -0,0 +1,32 @@ +// Test-only translation unit: production scorer plus the unchanged warp dispatch. +// The production library does not compile this reference wrapper. +#include "qsa_select.cu" + +namespace strata::kernels { +void qsa_block_scores_reference(const float* pooled, const float* dead, const float* q_idx, const int32_t* steps, int64_t nq, + int64_t max_blocks, const QsaShapes& s, float* scores, void* stream, int64_t active_blocks) { + if (nq <= 0) return; + if (s.idx_dim != IDX_DIM || s.idx_n_head != IDX_HEADS || s.idx_block != R || nq > 65535) { + std::fprintf(stderr, "qsa_block_scores: unsupported indexer geometry\n"); + std::exit(1); + } + // a block past a query's n_bid returns at once: the grid need only reach the batch's largest n_bid (C-1) + static const bool multi = [] { const char* v = std::getenv("STRATA_SCORES_MULTI"); return v == nullptr || std::atoi(v) != 0; }(); + if (multi && nq <= MQ && active_blocks <= 0) { // no active count: decode (captured or not) and prefill's pooled16 + // STRATA_QSA_EARLY_EXIT=0 keeps the old staging (every CTA loads the queries first); the scores are the same bits + static const bool early = [] { const char* v = std::getenv("STRATA_QSA_EARLY_EXIT"); return v == nullptr || std::atoi(v) != 0; }(); + block_scores_multi_kernel<<<256, SCORE_WARPS * 32, 0, (cudaStream_t) stream>>>(pooled, dead, q_idx, steps, (int) nq, + max_blocks, scores, early); + const cudaError_t e = cudaGetLastError(); + if (e != cudaSuccess) { std::fprintf(stderr, "qsa_block_scores multi: %s\n", cudaGetErrorString(e)); std::exit(1); } + return; + } + const int64_t reach = active_blocks > 0 && active_blocks < max_blocks ? active_blocks : max_blocks; + const dim3 grid((unsigned) ((reach + SCORE_WARPS - 1) / SCORE_WARPS), (unsigned) nq); + block_scores_kernel<<>>(pooled, dead, q_idx, steps, max_blocks, + scores); + const cudaError_t e = cudaGetLastError(); + if (e != cudaSuccess) { std::fprintf(stderr, "qsa_block_scores: %s\n", cudaGetErrorString(e)); std::exit(1); } +} + +} diff --git a/src/kernels/cuda/qsa_select.cu b/src/kernels/cuda/qsa_select.cu index a8ea4ec3..c27ca108 100644 --- a/src/kernels/cuda/qsa_select.cu +++ b/src/kernels/cuda/qsa_select.cu @@ -868,6 +868,101 @@ __global__ void __launch_bounds__(SCORE_WARPS * 32) block_scores_multi_kernel(co } } +#if defined(__HIPCC__) +// Optional gfx1100 port of PR1825 (14bf3215): same FP32 expression and reduction tree. +// Decode and the original top-k stay unchanged. No additional persistent weight/state allocation. +constexpr int TS_Q = 64; // queries per CTA (8 per wave, four lanes per query) +constexpr int TS_KB = 32; // key blocks per shared-memory tile +constexpr int TS_BR = 512; // key blocks per CTA + +__device__ __forceinline__ float ts_part(const float4 k4, const float4 q4) { + return k4.x * q4.x + k4.y * q4.y + k4.z * q4.z + k4.w * q4.w; // block_scores_kernel's per-lane expression +} + +__global__ void __launch_bounds__(256, 1) block_scores_thread_kernel(const float* __restrict__ pooled, + const float* __restrict__ q_idx, + const int32_t* __restrict__ steps, int64_t nq, + int64_t max_blocks, int64_t reach, + float* __restrict__ out) { + __shared__ __align__(16) float4 ks[TS_KB][IDX_DIM / 4]; + __shared__ float so[TS_Q][TS_KB + 1]; + __shared__ int64_t s_nbid[TS_Q]; + // Four lanes per query, lane j (0..3) one quarter of the tree for all four heads: the partials c[j] of lane 0's + // xor-shuffle sum combine groups j, j+16, j+8, j+24, j+4, j+20, j+12, j+28, and only then do the quarters meet + // (c0 + c2, c1 + c3, then their sum) - two shuffles here. A key load now feeds four heads: four times fewer + // shared-memory loads per FMA. The MIO-pipe motivation was measured by PR1825 on NVIDIA. + constexpr int QG[8] = {0, 16, 8, 24, 4, 20, 12, 28}; + const int t = threadIdx.x, lane = t & 31; + const int ql = (t >> 5) * 8 + (lane >> 2), j4 = lane & 3; // this lane's query (in the CTA) and quarter + const int64_t q0 = (int64_t) blockIdx.y * TS_Q, qi = q0 + ql; + if (t < TS_Q) s_nbid[t] = q0 + t < nq ? steps[(q0 + t) * kStepCount + kStepNBid] : -1; + float4 qv[IDX_HEADS][8]; + { + const float4* src = reinterpret_cast(q_idx + (qi < nq ? qi : 0) * IDX_HEADS * IDX_DIM); +#pragma unroll + for (int h = 0; h < IDX_HEADS; ++h) +#pragma unroll + for (int m = 0; m < 8; ++m) qv[h][m] = src[h * (IDX_DIM / 4) + j4 + QG[m]]; + } + __syncthreads(); + int64_t top = -1; // the largest n_bid of the CTA's queries: blocks at or past it are never written here + for (int i = 0; i < TS_Q; ++i) top = s_nbid[i] > top ? s_nbid[i] : top; + const int64_t b_lo = (int64_t) blockIdx.x * TS_BR; + int64_t b_hi = b_lo + TS_BR; + if (b_hi > reach) b_hi = reach; + if (b_hi > top) b_hi = top; + if (b_hi > max_blocks) b_hi = max_blocks; + for (int64_t b0 = b_lo; b0 < b_hi; b0 += TS_KB) { + const int nb = (int) (b_hi - b0 < TS_KB ? b_hi - b0 : TS_KB); + __syncthreads(); // the previous tile's reads of ks and so are done + for (int i = t; i < nb * (IDX_DIM / 4); i += blockDim.x) + ks[i / (IDX_DIM / 4)][i % (IDX_DIM / 4)] = reinterpret_cast(pooled + (b0 + i / (IDX_DIM / 4)) * IDX_DIM)[i % (IDX_DIM / 4)]; + __syncthreads(); + for (int j = 0; j < nb; ++j) { + float4 kk[8]; +#pragma unroll + for (int m = 0; m < 8; ++m) kk[m] = ks[j][j4 + QG[m]]; + float e[IDX_HEADS]; +#pragma unroll + for (int h = 0; h < IDX_HEADS; ++h) { + const float c = ((ts_part(kk[0], qv[h][0]) + ts_part(kk[1], qv[h][1])) + + (ts_part(kk[2], qv[h][2]) + ts_part(kk[3], qv[h][3]))) + + ((ts_part(kk[4], qv[h][4]) + ts_part(kk[5], qv[h][5])) + + (ts_part(kk[6], qv[h][6]) + ts_part(kk[7], qv[h][7]))); + const float d = c + __shfl_xor_sync(0xffffffffu, c, 2); // lane 0: c0 + c2, lane 1: c1 + c3 + e[h] = d + __shfl_xor_sync(0xffffffffu, d, 1); // lane 0: (c0 + c2) + (c1 + c3) + } + if (j4 == 0) { + float score = 0.0f; +#pragma unroll + for (int h = 0; h < IDX_HEADS; ++h) score += e[h] > 0.0f ? e[h] : 0.0f; + so[ql][j] = score; + } + } + __syncthreads(); + for (int i = t; i < TS_Q * nb; i += blockDim.x) { + const int q = i / nb, j = i % nb; + if (b0 + j < s_nbid[q]) out[(q0 + q) * max_blocks + b0 + j] = so[q][j]; + } + } +} + +bool scores_gfx1100_device() { + int device = -1; + if (cudaGetDevice(&device) != cudaSuccess) { cudaGetLastError(); return false; } + static thread_local int cached_device = -1; + static thread_local bool supported = false; + if (device != cached_device) { + cudaDeviceProp properties{}; + supported = cudaGetDeviceProperties(&properties, device) == cudaSuccess && + gfx_arch_is(properties.gcnArchName, "gfx1100"); + cached_device = device; + cudaGetLastError(); + } + return supported; +} +#endif + #if !defined(__HIPCC__) // ---- the decode top-k on a thread-block cluster (sm_90+; S19). One CTA per query (block_topk_reg_kernel, or // block_topk_kernel above 33,792 blocks: a --max-context over ~135K) makes four radix passes and two scans over up to @@ -1111,6 +1206,33 @@ void qsa_block_scores(const float* pooled, const float* dead, const float* q_idx return; } const int64_t reach = active_blocks > 0 && active_blocks < max_blocks ? active_blocks : max_blocks; +#if defined(__HIPCC__) + static const bool thread_scores = [] { + const char* value = std::getenv("STRATA_SCORES_THREAD"); + return value != nullptr && std::atoi(value) == 1; // experiment: off by default + }(); + // The bound is the ACTUAL live extent. A reserved 256K context never enables this by itself. + if (thread_scores && active_blocks >= 16385 && active_blocks <= max_blocks && nq >= 64 && + scores_gfx1100_device()) { + static thread_local bool logged = false; + if (!logged && std::getenv("STRATA_SCORES_THREAD_TRACE")) { + std::fprintf(stderr, "qsa exact thread: gfx1100 nq=%lld active_blocks=%lld capacity=%lld\n", + (long long)nq, (long long)active_blocks, (long long)max_blocks); + logged = true; + } + const dim3 tgrid((unsigned)((reach + TS_BR - 1) / TS_BR), (unsigned)((nq + TS_Q - 1) / TS_Q)); + block_scores_thread_kernel<<>>(pooled, q_idx, steps, nq, + max_blocks, reach, scores); + block_scores_tail_kernel<<<(unsigned)nq, 32, 0, (cudaStream_t)stream>>>(dead, q_idx, steps, + max_blocks, scores); + const cudaError_t error = cudaGetLastError(); + if (error != cudaSuccess) { + std::fprintf(stderr, "qsa exact thread: %s\n", cudaGetErrorString(error)); + std::exit(1); + } + return; + } +#endif const dim3 grid((unsigned) ((reach + SCORE_WARPS - 1) / SCORE_WARPS), (unsigned) nq); block_scores_kernel<<>>(pooled, dead, q_idx, steps, max_blocks, scores); diff --git a/src/kernels/qsa_scores_gfx1100_parity.cpp b/src/kernels/qsa_scores_gfx1100_parity.cpp new file mode 100644 index 00000000..63053d93 --- /dev/null +++ b/src/kernels/qsa_scores_gfx1100_parity.cpp @@ -0,0 +1,185 @@ +// GPU contract test for the optional gfx1100 port of PR1825. Synthetic, no model or coding score. +#include "strata/kernels/qsa.hpp" +#include "strata/kernels/qsa_select.hpp" +#include "strata/kernels/gfx_arch.hpp" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace strata::kernels { +// Test-only host wrapper copied from the unchanged baseline; both arms receive the SAME active bound. +void qsa_block_scores_reference(const float*, const float*, const float*, const int32_t*, int64_t, + int64_t, const QsaShapes&, float*, void*, int64_t); +} +namespace k = strata::kernels; +namespace { +void ck(cudaError_t e) { + if (e != cudaSuccess) { std::fprintf(stderr, "HIP: %s\n", cudaGetErrorString(e)); std::exit(2); } +} +void require(bool ok, const char* why) { + if (!ok) { std::fprintf(stderr, "FAIL: %s\n", why); std::exit(1); } +} +struct Buffer { + void* p = nullptr; size_t bytes; + explicit Buffer(size_t n): bytes(n) { ck(cudaMalloc(&p, n + 64)); ck(cudaMemset(p, 0xd3, n + 64)); } + ~Buffer() { ck(cudaFree(p)); } + template T* as() { return static_cast(p); } + void guard() { + unsigned char v[64]; + ck(cudaMemcpy(v, static_cast(p) + bytes, 64, cudaMemcpyDeviceToHost)); + for (auto c: v) require(c == 0xd3, "allocation guard modified"); + } +}; +struct Case { int64_t context, queries, capacity; int mode; int bound; bool timing; }; +int cases_done = 0, engaged = 0; +uint64_t scores_checked = 0, ids_checked = 0; + +void check(Case c) { + const auto s = k::qsa_real_shapes(); + const int64_t nb = c.capacity / s.idx_block + 2, nq = c.queries; + const int64_t active = c.context / s.idx_block + 1; + const int64_t bound = c.bound == 0 ? active : c.bound == 1 ? 0 : c.bound == 2 ? -1 : nb + 1; + const int64_t cap = k::qsa_selection_width(k::kTopkMaxCells, s); + std::mt19937 rng(91731 + (unsigned)c.context + 7*(unsigned)nq + 101*c.mode); + std::normal_distribution nd(0, 1); + std::uniform_int_distribution expo(-20, 20), small(-3, 3); + uint64_t sequence = 0; + auto value = [&]() -> float { + ++sequence; + if (c.mode == 1) return sequence % 11 == 0 ? 0.f : std::ldexp(nd(rng), expo(rng)); + if (c.mode == 2) return (float)small(rng); + if (c.mode == 3) return sequence % 2 ? 0.f : -0.f; + if (c.mode == 4) { + if (sequence % 23 == 0) return std::numeric_limits::quiet_NaN(); + if (sequence % 29 == 0) return std::numeric_limits::infinity(); + if (sequence % 31 == 0) return -std::numeric_limits::infinity(); + } + if (c.mode == 5) return sequence % 4 < 2 ? std::ldexp(1.f, 20) : -std::ldexp(1.f, 20); + return nd(rng); + }; + std::vector pooled(nb*s.idx_dim), dead(s.idx_dim), q(nq*s.idx_n_head*s.idx_dim); + for (auto& v: pooled) v = value(); + for (auto& v: dead) v = value(); + for (auto& v: q) v = value(); + // Padding after the largest live block must never affect scores or selected IDs. + for (int64_t i = active * s.idx_dim; i < (int64_t)pooled.size(); ++i) + pooled[i] = std::numeric_limits::quiet_NaN(); + std::vector steps(nq*k::kStepCount); + for (int64_t i = 0; i < nq; ++i) { + auto* st = steps.data() + i*k::kStepCount; + const int64_t n = c.context - nq + i + 1; + st[k::kStepPos] = n-1; st[k::kStepNKv] = n; + st[k::kStepNBid] = n/s.idx_block; + st[k::kStepWidth] = k::qsa_selection_width(n, s); + } + Buffer p(pooled.size()*4), d(dead.size()*4), query(q.size()*4), step(steps.size()*4); + Buffer a(nq*nb*4), b(nq*nb*4), ia(nq*cap*4), ib(nq*cap*4); + ck(cudaMemcpy(p.p, pooled.data(), p.bytes, cudaMemcpyHostToDevice)); + ck(cudaMemcpy(d.p, dead.data(), d.bytes, cudaMemcpyHostToDevice)); + ck(cudaMemcpy(query.p, q.data(), query.bytes, cudaMemcpyHostToDevice)); + ck(cudaMemcpy(step.p, steps.data(), step.bytes, cudaMemcpyHostToDevice)); + auto reference = [&] { + k::qsa_block_scores_reference(p.as(), d.as(), query.as(), step.as(), + nq, nb, s, a.as(), nullptr, bound); + }; + auto candidate = [&] { + k::qsa_block_scores(p.as(), d.as(), query.as(), step.as(), + nq, nb, s, b.as(), nullptr, bound); + }; + ck(cudaMemset(a.p, 0xa5, a.bytes)); ck(cudaMemset(b.p, 0x5a, b.bytes)); + reference(); candidate(); ck(cudaDeviceSynchronize()); + std::vector av(nq*nb), bv(nq*nb); + ck(cudaMemcpy(av.data(), a.p, a.bytes, cudaMemcpyDeviceToHost)); + ck(cudaMemcpy(bv.data(), b.p, b.bytes, cudaMemcpyDeviceToHost)); + uint64_t checked = 0; + for (int64_t i = 0; i < nq; ++i) { + const int64_t last = steps[i*k::kStepCount+k::kStepNBid]; + for (int64_t j = 0; j < nb; ++j) { + const auto at = i*nb+j; + if (j <= last) { + if (av[at] != bv[at]) { + std::fprintf(stderr, "MISMATCH ctx=%lld nq=%lld mode=%d query=%lld block=%lld bits=%08x/%08x\n", + (long long)c.context, (long long)nq, c.mode, (long long)i, (long long)j, av[at], bv[at]); + require(false, "scores differ bitwise"); + } + ++checked; + } else { + require(av[at] == 0xa5a5a5a5 && bv[at] == 0x5a5a5a5a, "inactive score padding overwritten"); + } + } + } + ck(cudaMemset(ia.p, 0xff, ia.bytes)); ck(cudaMemset(ib.p, 0xff, ib.bytes)); + k::qsa_block_topk(a.as(), step.as(), nq, nb, cap, s, ia.as(), nullptr, bound); + k::qsa_block_topk(b.as(), step.as(), nq, nb, cap, s, ib.as(), nullptr, bound); + ck(cudaDeviceSynchronize()); + std::vector iav(nq*cap), ibv(nq*cap); + ck(cudaMemcpy(iav.data(), ia.p, ia.bytes, cudaMemcpyDeviceToHost)); + ck(cudaMemcpy(ibv.data(), ib.p, ib.bytes, cudaMemcpyDeviceToHost)); + require(iav == ibv, "selected IDs differ"); + for (int64_t i = 0; i < nq; ++i) + for (int64_t j = steps[i*k::kStepCount+k::kStepWidth]; j < cap; ++j) + require(iav[i*cap+j] == -1, "ID padding overwritten"); + for (auto* v: {&p, &d, &query, &step, &a, &b, &ia, &ib}) v->guard(); + const bool branch = std::getenv("STRATA_SCORES_THREAD") && + std::atoi(std::getenv("STRATA_SCORES_THREAD")) == 1 && bound >= 16385 && bound <= nb && nq >= 64; + std::printf("PASS ctx=%lld nq=%lld capacity=%lld mode=%d bound=%lld expected_thread=%d scores=%llu ids=%lld\n", + (long long)c.context, (long long)nq, (long long)c.capacity, c.mode, (long long)bound, + (int)branch, (unsigned long long)checked, (long long)(nq*cap)); + ++cases_done; engaged += branch; scores_checked += checked; ids_checked += nq*cap; + if (c.timing) { + // Same actual bound/capacity, warmed, interleaved ABBA. Events measure GPU execution, not host fixture setup. + for (int i = 0; i < 3; ++i) { reference(); candidate(); } + ck(cudaDeviceSynchronize()); + cudaEvent_t e0, e1; ck(cudaEventCreate(&e0)); ck(cudaEventCreate(&e1)); + float times[2][4]{}; + for (int batch = 0; batch < 4; ++batch) { + const int order[4] = {0,1,1,0}; + for (int v: order) { + ck(cudaEventRecord(e0)); + for (int rep = 0; rep < 5; ++rep) { if (v == 0) reference(); else candidate(); } + ck(cudaEventRecord(e1)); ck(cudaEventSynchronize(e1)); + float ms = 0; ck(cudaEventElapsedTime(&ms, e0, e1)); times[v][batch] += ms/10; + } + } + float ta=0, tb=0; + for (int i=0; i<4; ++i) { ta+=times[0][i]/4; tb+=times[1][i]/4; } + std::printf("TIMING ctx=%lld nq=%lld baseline_ms=%.6f candidate_ms=%.6f speedup=%.6f trials=4 repeats_per_trial=10\n", + (long long)c.context, (long long)nq, ta, tb, ta/tb); + ck(cudaEventDestroy(e0)); ck(cudaEventDestroy(e1)); + } +} +} // namespace + +int main(int argc, char** argv) { + int devices = 0; + if (cudaGetDeviceCount(&devices) != cudaSuccess || devices == 0) { std::puts("SKIP no GPU"); return 77; } + cudaDeviceProp properties{}; ck(cudaGetDeviceProperties(&properties, 0)); + if (!k::gfx_arch_is(properties.gcnArchName, "gfx1100")) { std::puts("SKIP requires gfx1100"); return 77; } + require(std::getenv("STRATA_SCORES_THREAD") && std::strcmp(std::getenv("STRATA_SCORES_THREAD"), "1") == 0, + "run with STRATA_SCORES_THREAD=1 so the candidate branch is tested"); + const bool full = argc > 1 && std::strcmp(argv[1], "--full") == 0; + for (int64_t n: {1,6,8,9,63,64,65,127,128,129,256}) + check({131075,n,262144,0,0,false}); + for (int64_t context: {65535,65536,65537,65538,65539,131072,262144}) + check({context,65,262144,0,0,false}); + for (int bound: {1,2,3}) check({131075,65,262144,0,bound,false}); + for (int mode: {1,2,3,4,5}) check({131075,129,262144,mode,0,false}); + check({131075,65,131075,0,0,false}); + if (full) { + for (int64_t context: {131072,131073,131074,131075}) check({context,256,262144,2,0,false}); + check({131072,256,262144,0,0,true}); + check({240000,256,262144,0,0,true}); + check({140000,1024,262144,0,0,true}); + check({240000,1024,262144,0,0,true}); + } + std::printf("QUALIFIED cases=%d expected_thread_cases=%d scores=%llu ids=%llu bitwise_scores=true bitwise_ids=true guards=true\n", + cases_done, engaged, (unsigned long long)scores_checked, (unsigned long long)ids_checked); + return 0; +}