bf16_f32_mmvf, gr_fixed and gr_batch_preview do mov.u64 R, shared_sym followed by
cvta.to.shared.u64 R, R. sm_120 tolerates it, sm_86 faults (CUDA error 700 in
full_matrix_transport_gpu dense-bf16-gdn-z on the RTX 3080 Laptop). The sm_86
companions omit the cvta; sealed sm_120 files are untouched; verified by the
smoke passing after the change.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Default build unchanged (arch_ptx::image is the identity without the feature,
sm_120 PTX and all pins untouched). With --features sm86 every cuModuleLoadData
site hands its sealed image to arch_ptx::image, which on a device with
8.6 <= cc < 12.0 looks the image up by the SHA-256 of the sealed sm_120 body in
the generated table and admits the companion only through sealed_ptx::pinned.
The four sm_120-only capability gates (MMQ resident, scalar/full/prefill MTP)
accept sm_86-class devices under the feature. leleka-runtime and
strata-desktop-core forward the feature. run_gpu_smokes.sh: SMOKE_SM86=1 adds
it to the test builds.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
scripts/gpu-bringup/sm86_assets.py: survey / infer / build / compare / check.
Default method is retarget (the sealed text with the .target line and two
documented sm_90+ rules edited, accepted only if ptxas -arch=sm_86 accepts it);
recompile from the .cu is the fallback and needs a recipe verified by a round
trip on sm_120. sm86-recipes.json is the round-trip evidence.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Adds the six audited assets (head_native, original_verify_qsa, router, gr_post,
gr_norm, ple_native_batch) as an atomic reseal group built with --use_fast_math,
re-pins their old digests (incl. ple PTX_BYTES) and window-plan hex, and a
generic --flag-override recorded in the manifest and re-applied by the sealer.
compile_assets --isa-inventory/--driver-check and run_gpu_smokes.sh refuse a
driver older than the highest PTX ISA in the tree (9.0 needs >= 580.65.06).
Runbook: mandatory reseal + golden comparison section, step d' (linux-tests).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- check-cu.py now defaults to clang -x cuda --cuda-host-only with real qualifiers; --plain keeps the C++-only pass.
- qsa_prompt_attention_variants.cu: block_q4_0 under pack(1) as in kv_q4.hpp (cu_pin refreshed).
- native_head_native.cu: orphan copy had __launch_bounds__ before extern "C" __global__ (never nvcc-built); now the sealed twin's text.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
smoke_inventory.py scans every real #[ignore] attribute, extracts the enabling
LELEKA_* flags and values, classifies tests (device / assets / mock) and assigns
them to dependency-ordered groups (smoke-groups.json). run_gpu_smokes.sh runs
them in order, stops a group at its first failure, skips dependents, continues
independent groups, treats a filter that matches nothing as a failure, records
nvidia-smi before/after, refuses a busy GPU and never starts a model run
without --allow-model-runs plus caller-supplied env. remote_sync.sh mirrors the
tree (no --delete, refuses to clobber unpulled sealed files) and builds the
three binaries and the test binaries on the host; host_sanity.sh is read-only;
record_env.sh captures hardware/software/model digests for the ledger.
Tested with stub cargo/nvidia-smi, shellcheck and a Linux container.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
compile_assets.py reads docs/cuda-seal-plan*.json (assets and new_sources
formats), an extra plan for assets no plan covers, and the four rope PTX list
of docs/rope-and-memory-plan.md; verifies .cu pins, runs nvcc with the exact
flags (fast-math policy lint, rope flag variants), validates exports and ABI
parameter counts, and writes PTX + build-manifest.json outside the tree.
seal_pins.py installs the PTX in the encoding each consumer expects and patches
every pin form (PtxPin arrays/structs, AssetSpec.sha, Option tuple arrays,
plain len/sha consts, re-pins of regenerated rope PTX, ptx_abi test) with
exactly one replacement per field and a read-back check. fake-nvcc and a
unittest suite exercise the pipeline on macOS; no GPU, no generated PTX.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
rope_plan_golden compared kernel_args.corr_low/corr_high bit-for-bit, while the
corr_dims check right above already (correctly) treats NaN payload/sign as a libm
detail. For beta_slow=-1 the fixture, generated on arm64, holds 0x7fc00000, but
x86 SSE's default NaN is 0xffc00000, so the test failed on Linux x86_64. Compare
NaN-vs-NaN as equal for these two fields; all non-NaN bits stay exact.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Driver::load resolves cuMemsetD8_v2 (the `zero` entry point) up front, but the
synthetic mock_cuda.c (also #included by the q5/q6/projection-family mocks)
never defined it, so every isolated CPU ELF gate died in Driver::load with
MissingSymbol("cuMemsetD8_v2") before reaching its protocol assertions. Add a
load-only stub (same policy as the existing cuMemcpyDtoD_v2 stub) and an opt-in
`run.sh --mocks` mode that builds the fake libraries and runs the mock_driver,
q5_mock and q6_mock matrices in the Linux container.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
leleka-cuda-driver, leleka-runtime and leleka-native-cpu-expert are gated on
linux/x86_64 and had only ever been type-checked with `cargo check --target`.
scripts/linux-tests/run.sh builds a linux/amd64 image from the toolchain pinned
in rust-toolchain.toml (Rosetta/qemu on Apple Silicon), mounts the repo read-only
with a persistent cargo cache and target volume, runs one `cargo test
--no-fail-fast` shard per crate and prints a pass/fail/ignored/time summary.
No GPU is used: #[ignore]d tests stay ignored and libcuda.so.1 is absent.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Adds --fast/--port modes. The fast path runs fmt, Clippy and tests on the
host-buildable crates. fmt/Clippy debt in crates owned by other branches is
reported (STRICT_DEBT=1 makes it fatal). The script is now executable.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
crates/context is taken verbatim from claude/port-rope (rope scaling incl. setup_resolve_rope/derived_factor, memory
plan, context policy). New setup_policy module: ram_ctx, ctx_ram_need, resident_budget_gib, low_ram_*; a golden grid
from 'import setup' (resolve_rope/derived_factor too, which the branch had only transcribed) checked bit for bit.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Pinned 31-entry SHA-256 table, 206 + exact Content-Range, retry-once on wrong bytes, inventory re-read on a revision
change, verified.json stamps. model::http_client is now shared. Tests port test_mtp_fetch.py onto a real local HTTP
mirror; scripts/offline/diff_mtp_fetch.py runs the unmodified Python against the same mirror (10 scenarios).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
New crate leleka-offline-tools wired as 'strata-next tools ...'. Every output is byte-identical to the unmodified
Python tool (scripts/offline/diff_tools.py: packs incl. refusal cases, 14 draft-vocab subsets x out/stats, make_profile
at 512/256/8 experts with ranked bases and traces, mtp_rt at the real H/FF geometry). Committed tiny goldens +
integration tests; mtp_rt's multi-MB input is regenerated from a shared splitmix64 rule.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
scripts/offline/diff_dequant.py (live, 32 rows x 3 seeds through export-tensor-f32) and a committed golden
with an integration test over the production visitor.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- crates/tokenizer pre_tokenize + model pre-tokenize-batch/tokenize-batch/detokenize-batch (debug/differential)
- scripts/offline/diff_tokenizer.py: every Unicode scalar x 13 contexts vs Python regex (0 real mismatches;
14k strings differ only where regex 2026.9.10 has Unicode 17 and regex-syntax/unicodedata 16), a synthetic
GGUF with BPE-trained merges past the heap path, 5-file extraction compare, encode/decode fuzz
- golden crates/tokenizer/tests/fixtures/tokenizer_oracle.json + integration test
- stricter-by-design: duplicate merges, missing chat template, negative special ids
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- model inspect-metadata dumps every key/value (bool arrays typed); metadata_entries in model-format
- block_geometry gains Q8_K, IQ1_S, F64, MXFP4, NVFP4; ggml bridge decodes Q8_K, IQ1_S, MXFP4, NVFP4
- general.alignment must be uint32 (the Python reader accepted any width, the Rust reader ignored the rest)
- scripts/offline/diff_gguf_header.py: random GGUF vs unmodified gguf_reader.py, plus stricter-by-design list
- committed golden + integration test (headers and the geometry table)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- ple_conv1d inexact F32->F16 is accepted and recorded exact=false, as the oracle does
- conversions.json now carries method/exact/max_abs_err/source_shards like iq_pack.py
- opt-in --compat-bf16 (dequantize + RNE to BF16/F16/F32), --base (index_from_base, extra.bin),
--experts-bin (+ experts.bin.src.json); receipts list the optional files present
- scripts/offline/diff_native_pack.py: 2700+ cases against the unmodified tools/iq_pack.py
- unit tests: real golden expert tables, numpy/gguf-py F16/BF16 rounding vectors
- fix three pre-existing clippy lints in leleka-model-format
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Snapshot of target/stra169-direct-port-integration/source-port (without target/), now the tracked base for the full Strata Rust port.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>