Commit Graph
5288 Commits
Author SHA1 Message Date
Niko1221 e3ca02ec09 split HIP CMake: STRATA_SPLIT_HIP_ARCHS names the split's code objects (gfx11-generic is not in the main backend's arch list); amd_split_report issue template 2026-11-02 13:02:58 +01:00
Niko1221 a0247cdee8 split HIP: gfx11-generic code object for RDNA3 (self-test passes on a 780M), self-test tolerance for the WMMA accumulate, p2006 self-test scripts 2026-11-02 13:01:04 +01:00
Niko1221 5f82379cf6 NVIDIA split engine compiles again after split-hip: FNX_HIP is defined only by the HIP build (prefill.cu used it as an expression) and k_pfr_cmp read host memory with HIP intrinsics (NVIDIA uses __ldcv) 2026-11-02 12:39:13 +01:00
Niko1221 83cadd32fe split HIP: gfx11/gfx12 WMMA paths, one binary with code objects for gfx1100-1103 gfx1200 gfx1201, kernel self-test on cards not run (hip/selftest*), exe lookup strata-split-N-amd, experimental AMD only on explicit on, packaging for N=2,3,4 2026-11-02 12:39:12 +01:00
Niko1221 b0bbba5f8b packaging: build_split_hip.sh builds N = 2, 3, 4 2026-11-02 12:27:12 +01:00
Niko1221 202bb94ae6 split HIP: AMD gfx1201 starts the split by default (AUTO_SPLIT_AMD_ARCHS), off by key, preset or STRATA_SPLIT_ENGINE=0; tests and docs 2026-11-02 12:27:01 +01:00
Niko1221 2c1771dce2 Merge f-0291-split (up to ea2aed12c: auto/on/off switch, drafting fix, i-quant sets, PF_JOB) into f-0291-split-hip; AMD opt-in rule (AUTO_SPLIT_AMD_ARCHS), strata-split-N-gfx1201 lookup, packaging/build_split_hip.sh, AMD tests 2026-11-02 12:13:42 +01:00
Niko1221 242549e432 split-hip: line endings back to LF in the files my edits had turned to CRLF (diff against f-0291-split is now the real change) 2026-11-02 12:00:59 +01:00
Niko1221 296e6780fa split HIP: RCCL self-test kernels static (two files include the header) 2026-11-02 11:56:17 +01:00
Niko1221 71120303b1 split HIP: peer push on by default (probe and host fallback stay); RCCL for the prompt sums behind FNX_PF_RCCL (dlopen, self-test, one-line fallback) with a policy test 2026-11-02 11:51:56 +01:00
Niko1221 a2123a73a0 split-hip: fix the log lines of the peer decision 2026-11-02 11:21:18 +01:00
Niko1221 bbfa7c85cf split-hip: FNX_PEER (AMD): peer push of the window sums and the attention merge into the other cards' device memory, behind a start probe of every directed pair (stores, full read-back compare, flag round trips) with the host exchange as the fallback for the whole run; FNX_PEER=0 forces the host exchange; CPU policy test; NoPeerAccess now allows HIP peer calls in the one probed file only 2026-11-02 11:19:35 +01:00
Niko1221 ea2aed12cd split: build option STRATA_SPLIT_PF_JOB (64 default, 128): rows of one expert per prompt-path job, so a weight tile is dequantized once for twice the tokens
Default unchanged (64). The expert prompt kernel's token-tile count follows PF_JOB (it was fixed at four).
2026-11-02 11:13:09 +01:00
Niko1221 15fb6ffe3f split: Auto drafting on a setup the split accepts runs the split with its MTP; DFlash2 or off chosen by the person keeps the layer split
split_config writes "drafting": "mtp" (what the split engine runs), so serve/server.py's drafter step, which resolves Auto to DFlash2 where the
engine has it, cannot add DFlash2 flags to the split engine's arguments; the fallback keeps the person's own drafting word (or none: Auto), so the
layer split that starts instead gets DFlash2 as usual. The rule refuses (quietly in auto) for an explicit dflash2 or off, and for Auto on a card
where the split has not been measured to decode faster than the layer split with DFlash2. Tests: all four cases, the card rule, the server's
drafter step on a split config.
2026-11-02 10:53:28 +01:00
Niko1221 ac1965edea split: the all-cards split engine is automatic by default, with an off switch
strata launch --split-engine auto|on|off (settings field, saved in the preset and written to the launch config, so an off survives updates);
STRATA_SPLIT_ENGINE=0/1 for testers. auto (the default) uses the split engine where the rule says yes and says nothing where it says no; on says
why it cannot run; off never. The rule also leaves the layer split for choices the split engine does not honour (DFlash2, custom engine arguments,
replicas, a conversation memory format other than int8). The engine is looked up per card count and architecture (strata-split-N-smCC, then
strata-split-N); sm_120 joins sm_86 as a tested architecture. Tests: modes, auto/on/off, silent refusals, the flag, a saved off.
2026-11-02 10:44:43 +01:00
Niko1221 ec1b3b273b split-hip: FNX_DUMP_FIRST_LOGITS (first-token logits per request, for KL between the engines) 2026-11-02 10:36:45 +01:00
Niko1221 575caededc split: the fallback line carries the engine's own reason and keeps its log; FNX_DUMP_FIRST_LOGITS diagnostic
serve/server.py: when the split engine fails to start, the one line now says why in the engine's words (its 'sfnx: failed:' line) and the
split engine's log is kept beside the normal engine's (it wrote the same file). src/split/src/session.cpp: FNX_DUMP_FIRST_LOGITS=PATH writes
each request's first-token full-vocabulary logits to PATH.<n>, for comparing the prompt path with another engine's.
2026-11-02 10:15:30 +01:00
Niko1221 1ba2312176 split: refuse a model whose routed experts it has no kernel for at once, in one plain line
Before this, a start with such a file (UD-Q6_K_XL) read 55 GB of embeddings and spent more than 25 minutes loading before it gave up, so the
server's fallback to the normal layer split came very late. The check runs when the file is opened, before anything is read or placed.
2026-11-02 09:29:42 +01:00
Niko1221 db865e9b3d split-hip: the stream flags are one-thread kernels by default (the runtime's native stream memory ops made the prompt path's text vary from start to start with the exchange overlapped: 1 distinct output of 5 fresh starts at 6.5K / 26K / 103K now) 2026-11-02 09:28:01 +01:00
Niko1221 aaa7a8e494 split: the selection rule accepts the i-quant and Q2_0 expert sets the engine now runs
EXPERT_TYPES gains IQ2_S, IQ3_XXS, IQ3_S, IQ4_XS, IQ4_NL and Q2_0; a set with such experts may have embeddings, shared experts and an output
head in any type the loader converts to Q8_0; the memory estimate counts the Q2_0 to Q4_0 repack twice; the per-layer embedding table type is
checked. Tests for the supported sets (the IQ3_S set, UD-IQ4_XS), the plain refusal lines and the scan.
2026-11-02 08:41:19 +01:00
Niko1221 48d05d0735 split-hip: one-hop decode sum and attention merge for NCARD > 2, per-row batch stats, determinism and handshake test tools 2026-11-02 08:33:10 +01:00
Niko1221 fd3839172c split: tile exactness test and fnx_run (teacher-forced logits) as optional build targets
split_moe_tile_test runs the prompt kernel's weight tiles on a GPU for one expert of each routed-expert type and tests/split/tile_check.py compares them with gguf-py. split_fnx_run is sFNX's logits tool on the same engine objects.
2026-11-02 06:27:49 +01:00
Niko1221 e8abcadeef split-hip: chunked GDN prompt kernel in 58 KB of LDS (16 state columns, 128 threads, same sums), DMA receive/gather as an opt-in with its self-check (FNX_PF_DMA=1, FNX_PF_DMA_CHECK=1), batch stats (FNX_BATCH_STATS=1) 2026-11-02 04:57:44 +01:00
Niko1221 17c6c4cd80 split: the prompt ring's receive and gather steps move data to and from device memory by DMA on the copy engines (the add and output kernels read device memory, not host memory over PCIe) 2026-11-02 02:36:08 +01:00
Niko1221 77b4bc42dc split-hip: direct all-gather (every card stores its finished part into all peers' gather buffers), answers bit-identical to the ring; run scripts 2026-11-02 02:36:07 +01:00
Niko1221 9a35255008 split-hip: side-stream sync copies for HIP graph capture, row-by-row GDN default on HIP, mlock warning 2026-11-02 02:01:42 +01:00
Niko1221 3d08a095ff split: routed expert kernels for the IQ3_S set (first version, to be gated)
Decode: ggml's vec_dot for IQ4_XS, IQ3_S, IQ3_XXS and IQ2_S added to the mmvq expert launchers beside IQ4_NL and Q4_0.
Prompt: weight tiles for Q4_0, IQ4_NL, IQ4_XS, IQ3_S, IQ3_XXS and IQ2_S in moe_mma_iq.cuh (ggml's dequantization rounded once to f16).
Loader: Strata's Q2_0 down experts are repacked to Q4_0 blocks (lossless, twice the bytes).
2026-11-02 01:30:07 +01:00
Niko1221 058f65322b split-hip: an mlock that the user's RLIMIT_MEMLOCK refuses is a warning on HIP (the table stays in the page cache), not a failed start 2026-11-02 01:23:48 +01:00
Niko1221 84f16f7a27 split: load-time conversion of the dense and small tensors of the IQ3_S set
Adds the IQ2_S, IQ3_XXS, IQ3_S, IQ4_XS and Q2_0 types to the GGUF type table and a
loader step that, only when a file has routed experts in IQ2_S, IQ3_XXS, IQ3_S or Q2_0,
dequantizes its dense matrices, shared experts, projections and embeddings (K-quants,
IQ4_XS, IQ4_NL, BF16, F16) and writes them again as Q8_0, and the routers, injections
and SSM gates as F32. Other files are not touched. The routed IQ expert kernels are not
there yet, so the set still falls back.

Checked against gguf-py on the ISTA IQ3_S file: 762 tensors converted, the sampled ones
all within the Q8_0 bound (F32 targets exact), every source type covered.
2026-11-02 01:23:25 +01:00
Niko1221 46f84d4646 split-hip: native stream memory ops by default (13 us cross-card trip on R9700), the rule accepts the F32 router gate beside the Q8_0 shared expert 2026-11-02 01:14:25 +01:00
Niko1221 7e25613634 split-hip: stream memory ops as one-thread kernels by default on HIP (FNX_HIP_MEMOP=native for the runtime's) 2026-11-02 01:03:36 +01:00
Niko1221 5a258235c6 split-hip: the launcher rule knows two makes (NVIDIA sm_86 x2, AMD gfx1201): per-make tested sets, KFD-topology card probe for AMD 2026-11-02 00:46:15 +01:00
Niko1221 12c2d740c6 split: the prompt ring's receive and gather steps move data to and from device memory by DMA on the copy engines (the add and output kernels read device memory, not host memory over PCIe) 2026-11-02 00:40:54 +01:00
Niko1221 857d0e3fe9 split-hip: CMake HIP target (strata-split-N for gfx1201 with -DSTRATA_ENABLE_HIP=ON), card check by gfx name 2026-11-02 00:40:32 +01:00
Niko1221 ea2b0d9c63 split-hip: first HIP gfx12 compile of the split engine: gfx12 WMMA expert prompt kernel (replaces mma.m8n8k4), nvcuda::wmma shim for attention and the QSA scores, driver stream-memory-op shim, HIP stubs for the shared-memory holder 2026-11-02 00:37:55 +01:00
Niko1221 9d642b9eb9 split: the expert prompt kernel on Ampere's m16n8k16 tensor-core instruction for sm_80 and later (the Volta m8n8k4 version stays for older cards); first version, to be gated for exactness and speed 2026-11-02 00:33:26 +01:00
Niko1221 8bccfe281e docs: SPLIT_ENGINE.md with the copy-engine ring's numbers, the parallel table and the suite result 2026-11-01 23:46:34 +01:00
Niko1221 d4ab9edc3f split: the prompt path's chunk sums use the copy engines through host memory by default (suite 56/61 against 55/61 on the GPU-thread ring, parallel loads equal or better, prompts 17-20% faster); FNX_PF_RING_SM=1 keeps the GPU-thread ring 2026-11-01 23:44:53 +01:00
Niko1221 f74bceeb6a split: the prompt path's finished part goes to the next card's gather buffer by a kernel, not a host-to-host cudaMemcpyAsync (which blocks the one thread that enqueues the cards in turn: the cause of the copy-engine ring stalling in the first read) 2026-11-01 21:25:01 +01:00
Niko1221 43c40ecb19 split: the launcher side: apply_to_config probes the cards (nvidia-smi) and RAM, reads the GGUF, and turns the run config into the split engine's with the normal one kept as fallback; strata launch calls it only when the config says split_engine true (or STRATA_SPLIT_ENGINE=1 for testers); tests 2026-11-01 21:05:45 +01:00
Niko1221 fcba411c41 split: packaging/build_split_cuda.sh (fails if the engine can call a peer function) and docs/SPLIT_ENGINE.md 2026-11-01 21:01:47 +01:00
Niko1221 ff913c6bf0 serve: a run config for the all-cards split engine starts the normal layer split, with one plain line, if the split engine refuses or fails to come up (start_engine_or_fallback, tests) 2026-11-01 20:58:08 +01:00
Niko1221 28f94d6890 split: the rule for when the all-cards split engine may run (off unless asked; Linux, 2-4 identical cards of a tested kind, UD-Q4_K_XL-type GGUF, every expert fits the cards, RAM free), its run config with the normal config kept as fallback, tests incl. no peer API in src/split; defaults: SM-ring prompt path, Strata's draft-layer files 2026-11-01 20:51:40 +01:00
Niko1221 333e113d53 split: host-memory exchange between the cards, no peer access anywhere: the ring, attention-exchange and prompt-path buffers live in page-locked mapped host memory; the peer probe, peer enabling, peer copies and the IOMMU/BAR1 start checks are gone; the 27B files are dropped; CMake option STRATA_BUILD_SPLIT (off by default) builds strata-split-N for N cards 2026-11-01 20:46:46 +01:00
Niko1221 b8668d0385 split: sFNX (johnfink8/sfnx f9ba1e9, MIT) as published: engine, engine process, CPU tests, two data files, LICENSE and NOTICE 2026-11-01 20:42:54 +01:00
Niko1221 16f513ad78 HIP: the PcieAuto start share from the pool size (06ebf2e4d, BW-MEASURE E26) is opt-in on AMD (STRATA_PCIE_START=new); CUDA keeps it by default. It flipped near-tie tokens in the first ~50 windows after a start on the R9700 for +-1%, the only default that made merged-with-the-other-defaults-off differ from v0.2.9 there (p620, G2: 21/45 -> 45/45 identical serve answers with the old start) 2026-11-01 19:49:00 +01:00
Niko1221 27a3e056ab Int3 merge f-0291-df2-more (a84eebb51): bit-exact HC down kernel, default mask 133 on sm_120
# Conflicts:
#	src/program/generate.cpp
2026-11-01 16:11:56 +01:00
Niko1221 3a3fd4391b Int3 merge f-0291-mac-q (bef28201f): FP16 default on resident IQ3_S and Q2_0 on Metal through setup's config, Coder on spec 3 2026-11-01 15:52:51 +01:00
Niko1221 bef28201ff Mac config: the fp16 decode (STRATA_METAL_F16=1) is the default of a resident IQ3_S or Q2_0 pack; the Coder joins --spec 3 --spec-min-p 0.5
Coder: expert-pruned 256-expert Coder, M5 Max, 5 interleaved pairs, identical greedy tokens in all 40 runs per class, over --spec 2: story -2.5%
(0/5), code +7.1%, JSON +9.3%, agent turn +12.5% (5/5 each). It has no Mac setup entry yet; the name is what a config for it would pass.

fp16 decode (PR 4807): setup writes STRATA_METAL_F16=1 into the config's env for a resident IQ3_S or Q2_0 pack (STRATA_METAL_F16=0 there turns
it off; streaming and the other sets are untouched). The owner's rule was an option unless it passes the 61-task quality suite: off / on / off
again on IQ3_S 54/61 each, on Q2_0 54/61 each, the same 7 tasks failing in all arms, no family drop, no new hallucination flag, 0 pass/fail
changes between two runs of the same arm; decode +14% (IQ3_S) and +15% (Q2_0) in the suite runs, top-1 96-97% and mean KL 0.009-0.016 against fp32
(phaseA-tests/mac-q/RESULTS.md sections 20, 22, 30).
2026-11-01 15:52:11 +01:00
Niko1221 95597c2dae Windows gfx1151: launch the verify window's graph from a helper thread (fixes the Q4_K_XL first-window start stall)
On a Strix Halo under Windows the first cudaGraphLaunch of a doorbell window sometimes never returned: the GPU had already rung layer 0
("GPU rang 1, flags served 0") while the main thread, which serves the doorbells, was still inside the launch call. HostGraphLaunch (the
CUDA instrumented-launch helper, STRATA_VERIFY_ASYNC_LAUNCH=1) is now compiled for the Windows HIP build too, and arch_defaults sets the
switch for Windows gfx1151 (launch_default_env; STRATA_GFX1151_DEFAULTS=0 or STRATA_VERIFY_ASYNC_LAUNCH=0 turns it off, a user setting is kept).

Measured on the strix box, UD-Q4_K_XL, default queues, 19,853 slots, interleaved within one job: old launch 14 hangs in 75 starts
(t2 4/20, t5 3/25, release build 7/30), helper-thread launch 0 in 75 (+ 8/8 on the final build); decode 48.2 vs 48.4 tok/s; output tokens
identical; IQ3_S 8K prompt 1,413-1,427 vs 1,419-1,423 tok/s with identical output; quality quick subset PASS, agent loops 2/2.

Also STRATA_LAUNCH_PROBE=1 (diagnostic): launch-call time, GPU doorbell state during the call, window graph node count.

(cherry picked from commit 93b9264e30054996d1cb9e89d27d211ed1156b15)
2026-11-01 15:38:54 +01:00