Commit Graph
1699 Commits
Author SHA1 Message Date
Pavlo Ratushnyi da0d931a83 Merge branch 'claude/szfn-dep' into claude/hexagonal-size-gw 2026-11-06 18:59:26 +01:00
Pavlo Ratushnyi b896072b03 Merge branch 'claude/szfn-r2' into claude/hexagonal-size-gw 2026-11-06 18:59:24 +01:00
Pavlo Ratushnyi b1191fa963 Merge branch 'claude/szfn-r1' into claude/hexagonal-size-gw 2026-11-06 18:59:23 +01:00
Pavlo Ratushnyi d04ad93149 STRA-338 size-fn: Gpu::with_tile within 30 lines 2026-11-06 18:58:22 +01:00
Pavlo Ratushnyi 6d64ad9919 STRA-338 size-fn: leleka-deploy: split the persisted-numbers check 2026-11-06 18:58:17 +01:00
Pavlo Ratushnyi 0b20e0250f STRA-338 size-fn: leleka-deploy: reconfigure e2e checks in their own module 2026-11-06 18:55:05 +01:00
Pavlo Ratushnyi 8d1b2fbb21 STRA-338 size-fn: ab_slots and ab_speculation last trims 2026-11-06 18:53:42 +01:00
Pavlo Ratushnyi 01ff42428e STRA-338 size-fn: leleka-deploy: remaining e2e and unit test helpers 2026-11-06 18:53:20 +01:00
Pavlo Ratushnyi e4da26d74b STRA-338 size-fn: ab_speculation: replay policies in their own file 2026-11-06 18:52:42 +01:00
Pavlo Ratushnyi 8cfc4a8022 STRA-338 size-fn: cpu-kernels: bench_pinning main split 2026-11-06 18:51:46 +01:00
Pavlo Ratushnyi 5cc57c2b9b STRA-338 size-fn: example mains trimmed 2026-11-06 18:51:23 +01:00
Pavlo Ratushnyi 3350154e72 STRA-338 size-fn: examples: long strings continued, more helpers 2026-11-06 18:50:59 +01:00
Pavlo Ratushnyi 79cada8a59 STRA-338 size-fn: harmony, offline-tools: test functions split into builders and asserts, wide lines wrapped (fn>30 -> 0) 2026-11-06 18:50:18 +01:00
Pavlo Ratushnyi ebdb35f3cb STRA-338 size-fn: tokenizer: bench examples keep every changed line within 120 columns 2026-11-06 18:49:54 +01:00
Pavlo Ratushnyi 5805884567 STRA-338 size-fn: cpu-kernels: bench_variants example split 2026-11-06 18:46:50 +01:00
Pavlo Ratushnyi 3df69b1ebe STRA-338 size-fn: tokenizer: test functions and examples within limits, from_vocabulary within 30 lines (fn>30 test 7 -> 0) 2026-11-06 18:46:39 +01:00
Pavlo Ratushnyi 9d533647a0 STRA-338 size-fn: cpu-kernels: bench_pinning example split 2026-11-06 18:46:03 +01:00
Pavlo Ratushnyi aaf9866e30 STRA-338 size-fn: npu-service service test helpers split 2026-11-06 18:45:04 +01:00
Pavlo Ratushnyi 12c4c97ca5 STRA-338 size-fn: experimental-ref: q4 append test split 2026-11-06 18:44:10 +01:00
Pavlo Ratushnyi 6db99bb45a STRA-338 size-fn: leleka-deploy: more e2e helpers 2026-11-06 18:43:38 +01:00
Pavlo Ratushnyi 5e8dcd4e82 STRA-338 size-fn: experimental-ref: kv_stream test split 2026-11-06 18:43:28 +01:00
Pavlo Ratushnyi 2dc383588f STRA-338 size-fn: gateway-text, sampler-ref: tool fixtures as consts, check_shapes and fixed-point test within limits 2026-11-06 18:43:15 +01:00
Pavlo Ratushnyi d7f4c3d6b1 STRA-338 size-fn: experimental-ref: cvec reduction test split 2026-11-06 18:42:49 +01:00
Pavlo Ratushnyi 49ce020c3e STRA-338 size-fn: experimental-ref: int8/k8v4 append test split by section 2026-11-06 18:42:05 +01:00
Pavlo Ratushnyi 7475cd9ee4 Merge claude/szfn-k2 into claude/hexagonal-size-gw 2026-11-06 18:41:55 +01:00
Pavlo Ratushnyi 3aa29dc01e Merge claude/szfn-k1 into claude/hexagonal-size-gw 2026-11-06 18:41:54 +01:00
Pavlo Ratushnyi 13d26b9642 Merge claude/szfn-cpt into claude/hexagonal-size-gw 2026-11-06 18:41:53 +01:00
Pavlo Ratushnyi 88da9a6b84 Merge claude/szfn-cpb into claude/hexagonal-size-gw 2026-11-06 18:41:52 +01:00
Pavlo Ratushnyi bb5fc73ed6 STRA-338 size-fn: serving-policy: vision golden test outcome check split 2026-11-06 18:41:40 +01:00
Pavlo Ratushnyi df58208eaa STRA-338 size-fn: experimental-ref: quantized attention test split by mode 2026-11-06 18:41:40 +01:00
Pavlo Ratushnyi fa24c32b07 STRA-338 size-fn: cpu-kernels: Dispatch::with_isa table split per level (fn>30 1 -> 0)
The three kernel tables (scalar, AVX2, AVX-VNNI) move unchanged into one constructor each;
with_isa keeps the support check and the match. The same function pointers and closures are
stored in the same fields; no kernel code changed. leleka-cpu-kernels tests (parity, mxfp4, q8,
lib) pass, test ids unchanged, clippy -D warnings clean.
Codegen effect is not A/B-measured; no performance claim is made.
2026-11-06 18:41:32 +01:00
Pavlo Ratushnyi fc08b9b4fe STRA-338 size-fn: cpu-sys kernels: x86 SIMD kernels split into helpers (fn>30 8 -> 0)
attn_weighted_sum_avx2, attn_weighted_sum_f16_avx2, dot_i8i8_avxvnni, dot_i4i8_avxvnni,
dot_mxfp4_q8r4_avxvnni, dot_mxfp4_q8r4_avx2 and quantize_q8_0_avx2 are cut into statement-group
helpers (#[inline] with the same #[target_feature] as the original, unsafe fn, the 64-byte/4-block
main loops, the per-head accumulator block, the scalar column tail, the amax reduction and the
scale/round/pack step, the MXFP4 scaled fma, the int4 nibble unpack). #[inline(always)] is not
combinable with #[target_feature], so #[inline] is used, as the existing helpers do.
Arithmetic, accumulator count, FMA/accumulation order, lane order, rounding and the bounds-check
sites are unchanged; no expression was rewritten.

Identity check (throwaway, deleted): the base-commit x86 module tree (git HEAD) and the new tree were
compiled side by side in a test and run on fixed xorshift inputs, comparing output bits:
attn_weighted_sum f32 and f16 (heads 1-4, hd 1..192 incl. non multiples of 8, n 1..40, stride > hd),
dot_i8i8 / dot_i4i8 (n 0..513 around the 16/32/64 steps), dot_mxfp4_q8r4 avx2 and vnni (0..33 blocks),
quantize_q8_0 (0..33 blocks, zero and -0.0 blocks): 792 cases, all bit-identical, debug and release.
The AVX-VNNI variants cannot run on this CPU (i9-11900H: AVX2, FMA, F16C, AVX-512, no AVX-VNNI):
for them the check ran both trees with vpdpbusd replaced by a scalar emulation and the avxvnni
target feature removed, which proves the loop/helper restructuring but not the instruction itself;
the real VNNI instructions were only compiled. leleka-cpu-sys tests (attention, multi, tiles, lib)
pass; test ids unchanged; clippy -D warnings clean.
Codegen effect is not A/B-measured; no performance claim is made.
2026-11-06 18:41:32 +01:00
Pavlo Ratushnyi 4543654ad1 STRA-338 size-fn: gateway-text: test functions split into builders and assert helpers (fn>30 test 12 -> 0) 2026-11-06 18:41:24 +01:00
Pavlo Ratushnyi afdbb6101b STRA-338 size-fn: ab_slots and split_prefill examples trimmed 2026-11-06 18:40:55 +01:00
Pavlo Ratushnyi 5e7131f72c STRA-338 size-fn: harmony, offline-tools: remaining production functions within limits, type aliases, usage text wrapped 2026-11-06 18:40:50 +01:00
Pavlo Ratushnyi 65a46dc867 STRA-338 size-fn: gguf, serving-policy: Inventory::build and the vision golden test within limits 2026-11-06 18:40:12 +01:00
Pavlo Ratushnyi 0041bcfbde STRA-338 size-fn: example helpers trimmed further 2026-11-06 18:40:10 +01:00
Pavlo Ratushnyi 25c73e6ade STRA-338 size-fn: tokenizer: from_assets, from_vocabulary, piece_end, merge_long, encode_piece, merge_piece, from_gguf, from_parts, bpe_heap, encode_plain, encode_segment, unmark, Classes::new and the examples within limits (fn>30 prod 12 -> 0) 2026-11-06 18:39:09 +01:00
Pavlo Ratushnyi 0abeca4871 STRA-338 size-fn: serving-policy, gguf, worker-protocol: timings, fixed point, cors, stops, budget, shared defaults, inventory, error display and test helpers within limits 2026-11-06 18:38:54 +01:00
Pavlo Ratushnyi c35d747b9a STRA-338 size-fn: gptoss kernels: attend_group_with_sink and kar_roundtrip split (fn>30 2 -> 0)
attend_group_with_sink now reads as scores, per-head inverse denominators, weighted sum, per-head scaling; the two
loops moved into `#[inline(always)]` helpers (softmax_inverse_denominators, scale_heads_by_inverse) with the same
operations in the same order (same max/exp_shift_sum/exp/reciprocal, same `*o *= inv`), error checks in the same
order. kar_roundtrip: the sample normalisation and the encode/decode of a chunk are helpers (normalized_sample,
kar_reconstruct); same calls, same order, same error mapping.

Identity check (throwaway, deleted): the original ops.rs / quant_probes.rs from the branch start were compiled next to
the new ones and compared on fixed pseudo-random inputs (xorshift): attend_group_with_sink on 6 shapes (1..32 heads,
1..1000 positions) x every available ISA level, output and scores scratch compared by f32 bit pattern, plus the n == 0
and short-scratch error paths; kar_roundtrip for 0/1/7/100/3000/5000/70000 blocks (several 32768-block chunks) x
levels 0..9, output bytes equal, error texts equal, NaN and all-zero groups equal. All equal. Crate suite passes
(31 lib + 11 integration), test ids unchanged, clippy -D warnings clean.
Codegen effect is not A/B-measured; no performance claim is made.
2026-11-06 18:38:51 +01:00
Pavlo Ratushnyi 61d53c9172 STRA-338 size-fn: cpu-worker: ab_speculation example split 2026-11-06 18:38:14 +01:00
Pavlo Ratushnyi 8a71d51bf8 STRA-338 size-fn: sampler-ref: test functions split into builders and per-case checks (fn>30 test 14 -> 0) 2026-11-06 18:38:12 +01:00
Pavlo Ratushnyi 6b9d026090 STRA-338 size-fn: harmony, offline-tools: render, render_type, push, mtp_rt, packs, draft_vocab, make_profile, cli split into stages 2026-11-06 18:37:42 +01:00
Pavlo Ratushnyi da8c4342c3 STRA-338 size-fn: cpu-worker: ab_slots example split 2026-11-06 18:37:35 +01:00
Pavlo Ratushnyi 06b5cfda9c STRA-338 size-fn: gptoss-igpu: layer0_probe example split 2026-11-06 18:36:36 +01:00
Pavlo Ratushnyi 6f225ee466 STRA-338 size-fn: leleka-deploy: e2e tests split into scenario helpers, wide messages with named arguments 2026-11-06 18:36:34 +01:00
Pavlo Ratushnyi 58c53931fe STRA-338 size-fn: gptoss-npu: npu_prefill example split 2026-11-06 18:36:03 +01:00
Pavlo Ratushnyi 81940d86d6 STRA-338 size-fn: gpu-npu-worker: split_prefill example split 2026-11-06 18:35:40 +01:00
Pavlo Ratushnyi 8a5d04a72d STRA-338 size-fn: quant-core kernels: iq3_s and iq3_xxs decode_block split (fn>30 2 -> 0, nesting>4 2 -> 0)
decode_block of both formats now reads as the subblock loop; the per-subblock scale, the quartet-pair/group decode and
the signed grid store are `#[inline(always)]` helpers with the identical arithmetic (same operands, same order, same
rounding, no reassociation).

Identity check (throwaway, deleted): the original iq3_s.rs / iq3_xxs.rs from the branch start were compiled next to the
new ones and compared on 40000 fixed pseudo-random blocks per format (xorshift seed 0x9E3779B97F4A7C15, including
non-finite iq3_s scales: 39155 Ok blocks compared by f32 bit pattern, 845 Err texts equal; 40000 iq3_xxs blocks by bit
pattern): all equal. Crate test suite 36/36 passes, test ids unchanged, clippy -D warnings and fmt clean.
Codegen effect is not A/B-measured; no performance claim is made.
2026-11-06 18:35:26 +01:00
Pavlo Ratushnyi 36ea9febf9 STRA-338 size-fn: quant-core: test functions split into assert helpers; sampler-ref: coupled_penalize, resolve (fn>30 prod 2 -> 0, test 9 -> 0 quant-core) 2026-11-06 18:35:22 +01:00