Commit Graph
60 Commits
Author SHA1 Message Date
Pavlo RatushnyiandClaude Sonnet 5.5 b625aa2fc8 regress_3080.sh: read commits from a Windows git worktree under WSL
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 10:14:07 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 6173c2d309 gpu-bringup: regress_3080.sh, one-command model-free regression of a commit on the sm_86 card
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 10:04:12 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 c8a0f602fa sm86: document the companion set and the RTX 3080 smoke results, add offline tests
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 02:09:58 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 eb674cef0a sm86: drop cvta.to.shared on already-shared addresses in three hand-written PTX
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>
2026-10-16 01:59:52 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 1884e4ab5f cuda-driver: sm86 feature swaps the sm_86 companion in at module-load time
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>
2026-10-16 01:56:23 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 676457bf8f sm86: tool that derives sm_86 companions of the sealed sm_120 PTX
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>
2026-10-16 01:54:12 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 b8daf8fe9b gpu-bringup: accept PTX ISA 9.1/9.2 (CUDA 13.1/13.2)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-14 18:21:13 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 88482263e3 build: pin CUDA toolkit to 13.2.2 (nvcc 13.2.86) matching the host driver (CUDA 13.2); bootstrap reads release from the lock; group closed-kernel smokes
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-14 18:16:42 +02:00
Pavlo Ratushnyi 618a3fa253 Merge branch 'claude/port-rv-kernels' into claude/port-main
# Conflicts:
#	docs/cuda-seal-plan-additions-window.json
#	scripts/check-local.sh
2026-10-14 17:04:06 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 4a640498aa feat(serve): pin-gated PTX assets for native head, sampler and MTP session rope (replace Option::None constants); seal-plan entries and tests
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-14 17:03:42 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 ee335df9f4 chore(check-local): stub CUDA syntax pass is advisory off macOS
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-14 17:01:57 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 c280730262 docs(cuda): flag-policy audit of every ported .cu against CMake (unsealed assets without a plan entry, sealed precise builds of fast-math Originals, corrected window re-seal candidates); add literal_diff.py
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-14 17:00:26 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 90d3433da4 feat(gpu-bringup): mandatory fast-math reseal of six PTX, flag overrides, PTX ISA/driver precheck
Rust port / port-typecheck (push) Failing after 7s
Rust port / port-fast (push) Failing after 7s
Rust port / port-oracles (push) Failing after 9s
Rust port / port-linux-tests (push) Failing after 32s
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>
2026-10-14 17:00:26 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 2ab3a8ca48 test(cuda): run the stub pass through clang's CUDA frontend (host/device call legality, __shared__ rules, <<<>>>); fix qsa variants block_q4_0 packing, de-duplicate native_head_native.cu
- 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>
2026-10-14 16:56:45 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 9189e236e3 feat(gpu-bringup): remote_sync tests, toolkit tests, plan seal slots, doc runbook
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-14 16:54:39 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 55b16be9fd feat(gpu-bringup): smoke inventory + runner, remote sync, host sanity and env recording
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>
2026-10-14 16:54:39 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 671be9c786 feat(gpu-bringup): compile_assets/seal_pins toolkit for the Linux nvcc session
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>
2026-10-14 16:54:39 +02:00
Pavlo Ratushnyi 94fb39ccba Merge branch 'claude/port-docs-ci' into claude/port-main 2026-10-14 16:53:32 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 58db6f44b2 test(context): accept any NaN for invalid-YaRN kernel args in the rope golden
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>
2026-10-14 16:47:56 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 f334b66215 test(cuda-driver): teach the fake libcuda the eagerly-resolved cuMemsetD8_v2
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>
2026-10-14 16:43:29 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 de21513033 test(linux): add docker x86_64 harness for the Linux-gated port crates
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>
2026-10-14 16:41:51 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 c0021c6d09 ci(check-local): fast path first, Linux type-check, port oracles; known fmt/Clippy debt reported instead of failing
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>
2026-10-14 16:40:42 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 fd7b2c7b8b test(cuda): unified CUDA stub headers and clang syntax/semantics pass over every ported .cu (asm and <<<>>> rewritten, operands kept type-checked)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-14 16:39:43 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 8832be7025 docs(offline): record the offline port status, divergences and open items; run the oracle diffs from check-local
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-14 16:07:14 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 2d00e78706 feat(reasoning-budget): port Service.reasoning_budget and the run-loop wrap-up with a Service.run differential
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-14 16:07:14 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 250fd3e65d feat(prompt): render the pinned chat template with minijinja instead of a hand-written Qwen format
minijinja =2.24.0 (+ minijinja-contrib pycompat for str methods), configured like serve/frontend.py ChatTemplate:
trim/lstrip blocks, no autoescape, raise_exception, Python tojson (json.dumps ensure_ascii=False) and str.strip trim.
All 10 chat_golden.json cases render byte for byte straight through the template (tool_calls, tool messages, no
generation prompt included). Ordered Json keeps object key order. scripts/offline/diff_chat_template.py: 12000
generated conversations vs jinja2 (identical renders, identical raise_exception messages); committed golden + test.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-14 15:53:16 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 18d712eed5 feat(context): reuse the port-rope leleka-context crate and port setup.py's RAM/VRAM sizing rules
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>
2026-10-14 15:45:55 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 08dbe0abe0 feat(mtp-fetch): port tools/mtp_fetch.py (inventory/fetch/verify) with a local-mirror differential
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>
2026-10-14 15:43:43 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 3485221865 feat(offline-tools): port embd_bf16_pack, ple_fp8_pack, draft_vocab, make_profile, mtp_rt
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>
2026-10-14 15:40:02 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 f2ec56325c test(dequant): bit-exact parity of 23 block types vs pinned gguf-py and iq_fixture
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>
2026-10-14 15:33:27 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 debfbd0941 test(tokenizer): committed oracle differential, per-codepoint pre-tokenizer check, batch CLI
- 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>
2026-10-14 15:32:23 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 f3bff3842d feat(gguf): header-reader differential, full metadata dump and Python geometry parity
- 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>
2026-10-14 15:25:20 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 0d073e08aa feat(native-pack): match iq_pack.py conversions, add --compat-bf16/--base/--experts-bin and the exhaustive differential
- 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>
2026-10-14 15:20:15 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 7f896a8bb8 import: Original-literal source-port snapshot (frozen 2026-10-12 06:36, uncompiled together, no GPU run)
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>
2026-10-14 14:38:46 +02:00
Pavlo Ratushnyi bffa3160f2 feat(cuda): admit independently qualified QSA operator assets 2026-10-09 21:01:50 +02:00
Pavlo Ratushnyi 11f9de7170 [skip ci] Integrate qualified Q2_0 routed projection asset 2026-10-09 12:29:05 +02:00
Pavlo Ratushnyi 2c6ef76e22 feat(cuda): integrate projection family [skip ci] 2026-10-09 11:20:44 +02:00
Pavlo Ratushnyi 570db27fdb feat(cuda-driver): add resident Q6_K projection and independent component gates [skip ci] 2026-10-08 19:25:15 +02:00
Pavlo Ratushnyi 08dcb1d4a2 feat(cuda): add native-compatible Q5_K Q8_1 projection [skip ci] 2026-10-08 18:04:43 +02:00
Pavlo Ratushnyi 303fd4cf46 feat(cuda-driver): add fixed ordered f32 matvec primitive
Linux / keyless-cuda-gate (pull_request) Skipped
Linux / verify (pull_request) Successful in 3m45s
Linux / keyless-cuda (pull_request) Skipped
Linux / static-cuda-package (pull_request) Skipped
Linux / hosted-cuda-package (pull_request) Skipped
Linux / linux-cli-container (pull_request) Successful in 1m39s
Linux / linux-static-cli (pull_request) Successful in 5m47s
Linux / release-cli (pull_request) Skipped
2026-10-08 09:51:12 +02:00
Pavlo Ratushnyi b9519f967a Harden config parity input file handling 2026-10-08 01:26:32 +02:00
Pavlo Ratushnyi 4aeec3c541 Add offline PLE config parity preflight 2026-10-08 01:19:30 +02:00
Pavlo Ratushnyi bbc8018e8b Bound runtime image probe waits and cleanup
Linux / keyless-cuda-gate (pull_request) Skipped
Desktop foundation / core (ubuntu-latest) (pull_request) Successful in 2m50s
Linux / verify (pull_request) Successful in 6m33s
Linux / keyless-cuda (pull_request) Skipped
Linux / static-cuda-package (pull_request) Skipped
Linux / hosted-cuda-package (pull_request) Skipped
Linux / linux-cli-container (pull_request) Successful in 1m34s
Linux / linux-static-cli (pull_request) Successful in 6m26s
Linux / release-cli (pull_request) Skipped
2026-10-08 00:53:28 +02:00
Pavlo Ratushnyi d7d24c7401 test: preserve container smoke failures on cleanup 2026-10-08 00:34:59 +02:00
Pavlo Ratushnyi 63a56772da test: bound CLI container startup wait 2026-10-08 00:30:54 +02:00
Pavlo Ratushnyi 3a478b603c feat(cuda): add fixed typed vector launch and isolated PTX gate
Linux / verify (pull_request) Successful in 6m15s
Linux / keyless-cuda-gate (pull_request) Skipped
Linux / keyless-cuda (pull_request) Skipped
Linux / static-cuda-package (pull_request) Skipped
Linux / hosted-cuda-package (pull_request) Skipped
Linux / linux-cli-container (pull_request) Failing after 4m2s
Linux / linux-static-cli (pull_request) Successful in 9m31s
Linux / release-cli (pull_request) Skipped
Desktop foundation / core (ubuntu-latest) (push) Failing after 13s
Desktop foundation / core (windows-latest) (push) Canceled after 0s
Desktop foundation / core (macos-latest) (push) Canceled after 0s
2026-10-07 23:43:54 +02:00
Pavlo Ratushnyi 7e61ab8007 STRA-102 implement independent CUDA Driver context and buffers
Linux / keyless-cuda-gate (pull_request) Skipped
Linux / verify (pull_request) Failing after 42s
Linux / keyless-cuda (pull_request) Skipped
Linux / static-cuda-package (pull_request) Skipped
Linux / hosted-cuda-package (pull_request) Skipped
Linux / linux-static-cli (pull_request) Skipped
Linux / linux-cli-container (pull_request) Skipped
Linux / release-cli (pull_request) Skipped
2026-10-07 23:09:48 +02:00
Pavlo Ratushnyi 4720ef135b fix(ci): verify fresh Gitea upload attachment URLs 2026-10-07 22:04:20 +02:00
Pavlo Ratushnyi a498381cb7 refactor(model): extract independent Rust IQ3 decoding core
Linux / keyless-cuda (pull_request) Skipped
Linux / static-cuda-package (pull_request) Skipped
Linux / hosted-cuda-package (pull_request) Skipped
Linux / keyless-cuda-gate (pull_request) Skipped
Linux / verify (pull_request) Successful in 5m16s
Linux / linux-cli-container (pull_request) Successful in 5m19s
Linux / release-cli (pull_request) Skipped
Linux / linux-static-cli (pull_request) Failing after 7m35s
2026-10-07 20:53:25 +02:00
Pavlo Ratushnyi c6a3fc7e42 feat(engine): extract Rust GGUF foundation and enforce model capability tuples 2026-10-07 20:33:15 +02:00