diff --git a/.dockerignore b/.dockerignore index cf5dc200..da968ce5 100644 --- a/.dockerignore +++ b/.dockerignore @@ -4,14 +4,14 @@ models/ captures/ logs/ control-plane/target/ -engine/* -!engine/strata/ -engine/strata/* -!engine/strata/LICENSE -# prompt.rs embeds the pinned chat template at compile time -!engine/strata/serve/ -engine/strata/serve/* -!engine/strata/serve/chat_template.jinja +third_party/* +!third_party/strata/ +third_party/strata/* +!third_party/strata/LICENSE +# prompt.rs and server_api.rs embed the pinned chat template at compile time +!third_party/strata/serve/ +third_party/strata/serve/* +!third_party/strata/serve/chat_template.jinja benchmarks/ target/ dist/ diff --git a/.gitattributes b/.gitattributes index 61da554d..414736db 100644 --- a/.gitattributes +++ b/.gitattributes @@ -27,3 +27,6 @@ scripts/check-ci-coverage.py text eol=lf scripts/install-pinned-rustup.sh text eol=lf scripts/test-cuda-fixed-ptx.sh text eol=lf .github/workflows/*.yml text eol=lf + +# Strata files kept for the shipped product and the Rust tests (third_party/strata/UPSTREAM.md): embedded and hashed byte for byte, never converted. +third_party/strata/** -text diff --git a/README.md b/README.md index 0adac84c..344ca216 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Leleka is a Rust/CUDA inference runtime for coding agents. Release **0.1** serves one model, **Qwen3.8-Flash-Next IQ3_S** (KAR level-2 PLE, MTP speculative decode), on **one RTX 5090 (32 GB)** at **262,144 tokens of context**, to Codex CLI and other clients over the Responses, Chat Completions and Messages APIs. It is a Rust/CUDA port of the Original mode17 serve path of [Strata](https://github.com/Niko1221/Strata) (reference copy in `engine/strata/`, pinned at -upstream `41cf05a0`, see `engine/upstream.md`). Serving needs no Python and no CUDA toolkit on the host. +upstream `41cf05a0`, see `third_party/strata/UPSTREAM.md`). Serving needs no Python and no CUDA toolkit on the host. **Status of 0.1.** It runs real Codex sessions to completion and decodes about 155 tok/s on the 245k-token benchmark of the 5090 server (section "Numbers"). It is **not a formally quality-gated profile**, only the RTX 5090 is supported, and the limits below are real. Release notes: `spec node release/RELEASE-NOTES-5090-v0.1.md`; diff --git a/control-plane/src/cli/operations.rs b/control-plane/src/cli/operations.rs index 154ff2c1..33573a77 100644 --- a/control-plane/src/cli/operations.rs +++ b/control-plane/src/cli/operations.rs @@ -201,7 +201,7 @@ fn engine_info() -> Result<(), BoxError> { } fn engine_license() -> Result<(), BoxError> { - print!("{}", include_str!("../../../engine/strata/LICENSE")); + print!("{}", include_str!("../../../third_party/strata/LICENSE")); Ok(()) } diff --git a/control-plane/src/native_pack/tests.rs b/control-plane/src/native_pack/tests.rs index 1afc9dd5..4653f606 100644 --- a/control-plane/src/native_pack/tests.rs +++ b/control-plane/src/native_pack/tests.rs @@ -236,12 +236,12 @@ fn shards_for(golden: &Golden) -> Vec { #[test] fn real_golden_expert_tables_are_reproduced() { let goldens = [ - include_str!("../../../engine/strata/tests/data/native_experts/iq3_s.txt"), - include_str!("../../../engine/strata/tests/data/native_experts/iq3_xxs.txt"), - include_str!("../../../engine/strata/tests/data/native_experts/iq2_xs.txt"), - include_str!("../../../engine/strata/tests/data/native_experts/q2_0.txt"), - include_str!("../../../engine/strata/tests/data/native_experts/coder-iq1_m.txt"), - include_str!("../../../engine/strata/tests/data/native_experts/swift-iq2_xs.txt"), + include_str!("../../../third_party/strata/tests/data/native_experts/iq3_s.txt"), + include_str!("../../../third_party/strata/tests/data/native_experts/iq3_xxs.txt"), + include_str!("../../../third_party/strata/tests/data/native_experts/iq2_xs.txt"), + include_str!("../../../third_party/strata/tests/data/native_experts/q2_0.txt"), + include_str!("../../../third_party/strata/tests/data/native_experts/coder-iq1_m.txt"), + include_str!("../../../third_party/strata/tests/data/native_experts/swift-iq2_xs.txt"), ]; for text in goldens { let golden = parse_golden(text); diff --git a/control-plane/src/server_api.rs b/control-plane/src/server_api.rs index 06a1b4f5..35d414be 100644 --- a/control-plane/src/server_api.rs +++ b/control-plane/src/server_api.rs @@ -32,7 +32,7 @@ use crate::{ }; /// The chat template the Original serves in `/props` when the model ships none. -pub const DEFAULT_CHAT_TEMPLATE: &str = include_str!("../../engine/strata/serve/chat_template.jinja"); +pub const DEFAULT_CHAT_TEMPLATE: &str = include_str!("../../third_party/strata/serve/chat_template.jinja"); mod engine_lifecycle; pub use engine_lifecycle::*; diff --git a/control-plane/tests/mcp_hub/harness.rs b/control-plane/tests/mcp_hub/harness.rs index 46cb3d9a..e546faa2 100644 --- a/control-plane/tests/mcp_hub/harness.rs +++ b/control-plane/tests/mcp_hub/harness.rs @@ -7,7 +7,7 @@ use std::path::PathBuf; use std::process::{Command, Stdio}; pub(super) fn fake_path() -> PathBuf { - PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("../engine/strata/serve/mcp_fake_server.py") + PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("tests/mcp_hub/mcp_fake_server.py") } pub(super) fn python() -> Option<&'static str> { diff --git a/engine/strata/serve/mcp_fake_server.py b/control-plane/tests/mcp_hub/mcp_fake_server.py similarity index 100% rename from engine/strata/serve/mcp_fake_server.py rename to control-plane/tests/mcp_hub/mcp_fake_server.py diff --git a/control-plane/third_party/ggml/UPSTREAM.md b/control-plane/third_party/ggml/UPSTREAM.md index d7bc7ed9..85ac63dd 100644 --- a/control-plane/third_party/ggml/UPSTREAM.md +++ b/control-plane/third_party/ggml/UPSTREAM.md @@ -2,7 +2,7 @@ These unmodified source and header files come from `ggml-org/llama.cpp` commit `3cf03257f219afbe7334045ff7c6a06ac68c627d`, the same commit pinned by -the imported Strata engine in `engine/strata/third_party/ggml/VERSION.txt`. +the Strata engine pinned in `third_party/strata/UPSTREAM.md` (its `third_party/ggml/VERSION.txt`). Their original repository paths are under `ggml/src/` or `ggml/include/`; `ggml-cpu-impl.h` came from `ggml/src/ggml-cpu/`. `SHA256SUMS` records every vendored file. The upstream MIT license is in `LICENSE`. diff --git a/crates/deploy/build.rs b/crates/deploy/build.rs index ef6aa65a..fa3a9e38 100644 --- a/crates/deploy/build.rs +++ b/crates/deploy/build.rs @@ -1,7 +1,7 @@ //! Build identity for `leleka version`. //! //! Embeds the git commit of the tree the binary was built from, whether that tree had uncommitted changes, and the -//! Strata upstream pin recorded in `engine/upstream.md`. The release packager (`scripts/release/package-5090.sh`) +//! Strata upstream pin recorded in `third_party/strata/UPSTREAM.md`. The release packager (`scripts/release/package-5090.sh`) //! exports `LELEKA_GIT_COMMIT` and `LELEKA_GIT_DIRTY` so the values do not depend on `git` being callable from the //! build script; an ordinary developer build asks git itself and falls back to `unknown` (an exported tree has //! no `.git`). @@ -22,7 +22,7 @@ fn git(repo: &Path, args: &[&str]) -> Option { Some(String::from_utf8_lossy(&output.stdout).trim().to_owned()) } -/// The 40-hex commit on the `Upstream commit SHA` row of the pin table in `engine/upstream.md`. +/// The 40-hex commit on the `Upstream commit SHA` row of the pin table in `third_party/strata/UPSTREAM.md`. fn upstream_pin(doc: &Path) -> Option { let text = std::fs::read_to_string(doc).ok()?; let line = text @@ -40,7 +40,7 @@ fn main() { std::env::var_os("CARGO_MANIFEST_DIR").expect("cargo sets CARGO_MANIFEST_DIR"), ); let repo = manifest.join("..").join(".."); - let doc = repo.join("engine").join("upstream.md"); + let doc = repo.join("third_party").join("strata").join("UPSTREAM.md"); emit_reruns(&repo, &doc); let commit = std::env::var("LELEKA_GIT_COMMIT") .ok() diff --git a/crates/deploy/src/app/entry.rs b/crates/deploy/src/app/entry.rs index 9a88fdd8..85c844f6 100644 --- a/crates/deploy/src/app/entry.rs +++ b/crates/deploy/src/app/entry.rs @@ -11,7 +11,7 @@ pub fn version_text() -> String { format!( "leleka {} commit {} ({}) -strata pin {} (upstream commit of engine/upstream.md at build time) +strata pin {} (upstream commit of third_party/strata/UPSTREAM.md at build time) built for {}, {} profile", env!("CARGO_PKG_VERSION"), env!("LELEKA_BUILD_COMMIT"), diff --git a/crates/deploy/src/app/version_tests.rs b/crates/deploy/src/app/version_tests.rs index f1dab41b..6017c16a 100644 --- a/crates/deploy/src/app/version_tests.rs +++ b/crates/deploy/src/app/version_tests.rs @@ -11,7 +11,7 @@ fn the_version_names_the_commit_and_the_strata_pin_and_keeps_the_first_line() { Some(concat!("leleka ", env!("CARGO_PKG_VERSION"))) ); let pin = env!("LELEKA_BUILD_STRATA_PIN"); - // engine/upstream.md is in the repository this crate is built from; an exported tree without it reports `unknown`. + // third_party/strata/UPSTREAM.md is in the repository this crate is built from; an exported tree without it reports `unknown`. assert!( pin == "unknown" || (pin.len() == 40 && pin.bytes().all(|b| b.is_ascii_hexdigit())), "{pin}" diff --git a/crates/deploy/src/expert_profile.rs b/crates/deploy/src/expert_profile.rs index 91e3cb2c..f5bd17d9 100644 --- a/crates/deploy/src/expert_profile.rs +++ b/crates/deploy/src/expert_profile.rs @@ -6,7 +6,7 @@ //! It is Strata's `STRP` v1 table: all 48 x 512 = 24,576 (layer, expert) pairs of the Qwen3.8-Flash-Next model, ranked //! by how often a calibration workload routed to them, plus the inverse slot table (24 + 4 x 24,576 + 4 x 48 x 512 = //! 196,632 bytes). `--expert-cache auto` fills the VRAM expert slots in that order -//! (`engine/strata/tools/make_profile.py`, header comment). +//! (Strata 41cf05a0, `tools/make_profile.py`, header comment). //! //! * It cannot be derived from the model weights: it is a routing statistic. Producing one means running the model on //! calibration prompts with `--dump-routing` and ranking the routed experts (`make_profile.py`, Python, offline). The @@ -16,8 +16,8 @@ //! 43 argmax flips in 1,660 rows (2.59 %), VRAM share 48 % against 90 %. Any other table needs its own quality //! gate; none exists, so the product pins the upstream bytes. //! * Upstream publishes it at `data/expert-profile.bin` in https://github.com/Niko1221/Strata (MIT, -//! `engine/strata/LICENSE`), byte-identical at the pin `41cf05a0` and at the older pin `d9ab8435` -//! (`engine/upstream.md` lists it as left out of the import because `*.bin` is git-ignored). Commit-pinned raw +//! `third_party/strata/LICENSE`), byte-identical at the pin `41cf05a0` and at the older pin `d9ab8435` +//! (the removed vendored tree left it out because `*.bin` is git-ignored). Commit-pinned raw //! URLs are immutable content; the SHA-256 is what is trusted, not the URL. //! //! * The 192 KiB file is small, so the exact upstream bytes are committed (`crates/deploy/data/expert-profile.bin`, the @@ -47,7 +47,7 @@ pub static EMBEDDED: &[u8] = include_bytes!("../data/expert-profile.bin"); /// Nothing larger is hashed or accepted (the pinned file is 192 KiB). pub const MAX_BYTES: u64 = 1 << 20; -/// The Strata commit the sources below are pinned to (`engine/upstream.md`). +/// The Strata commit the sources below are pinned to (`third_party/strata/UPSTREAM.md`). pub const UPSTREAM_COMMIT: &str = "41cf05a06a25dd29103b7b27a2279a3f60c21876"; /// Download sources, tried in order. All serve the same bytes; each result is checked against [`PINNED_SHA256`]. pub const SOURCES: [&str; 3] = [ diff --git a/crates/gateway-text/src/prompt.rs b/crates/gateway-text/src/prompt.rs index de408ed0..e6750fe2 100644 --- a/crates/gateway-text/src/prompt.rs +++ b/crates/gateway-text/src/prompt.rs @@ -1,6 +1,6 @@ //! Chat prompt rendering: the model's real Jinja chat template, executed natively. //! -//! The pinned Strata template (`engine/strata/serve/chat_template.jinja`, the Qwen3.8-Flash-Next template with +//! The pinned Strata template (`third_party/strata/serve/chat_template.jinja`, the Qwen3.8-Flash-Next template with //! Unsloth's developer-role and tool fixes) is rendered with `minijinja`, configured like the Python server's //! `ChatTemplate` (`serve/frontend.py`): `trim_blocks` and `lstrip_blocks`, no autoescape, Python-style string //! methods, a `raise_exception` global, and Python-compatible `tojson` and `trim` filters. All ten cases of @@ -32,7 +32,7 @@ use serde::{ use serde_json::Value as Plain; /// The pinned chat template, embedded at build time. -pub const PINNED_TEMPLATE: &str = include_str!("../../../engine/strata/serve/chat_template.jinja"); +pub const PINNED_TEMPLATE: &str = include_str!("../../../third_party/strata/serve/chat_template.jinja"); // --------------------------------------------------------------------------------------------------------------- // ordered JSON diff --git a/crates/gateway-text/src/prompt/tests.rs b/crates/gateway-text/src/prompt/tests.rs index 14cc439c..d69326ab 100644 --- a/crates/gateway-text/src/prompt/tests.rs +++ b/crates/gateway-text/src/prompt/tests.rs @@ -21,7 +21,7 @@ struct Case { } fn golden() -> Vec { - serde_json::from_str(include_str!("../../../../engine/strata/serve/chat_golden.json")).unwrap() + serde_json::from_str(include_str!("../../../../third_party/strata/serve/chat_golden.json")).unwrap() } /// All ten cases of `serve/chat_golden.json`, straight through the Jinja template: system merging, tool diff --git a/crates/model-format/README.md b/crates/model-format/README.md index 2cbd2b4a..5bc471e1 100644 --- a/crates/model-format/README.md +++ b/crates/model-format/README.md @@ -9,7 +9,7 @@ their public paths. The original parser geometry and its three tests were moved unchanged from `control-plane/src/gguf.rs`. Tensor block geometry and the legacy Flash-Next metadata guard retain their -upstream references; see the provenance record (`engine/upstream.md`). +upstream references; see the provenance record (`third_party/strata/UPSTREAM.md`). Those helpers inspect metadata and byte layout, not tensor values or inference. Recognizing a quantization block size is not support for decoding or serving it. diff --git a/crates/model-format/src/gguf/read_index_file.rs b/crates/model-format/src/gguf/read_index_file.rs index 003eaf1a..96efdd51 100644 --- a/crates/model-format/src/gguf/read_index_file.rs +++ b/crates/model-format/src/gguf/read_index_file.rs @@ -16,7 +16,7 @@ pub(super) fn read_index_file(file: &mut File, size: u64, strict: bool) -> Resul /// (values per block, bytes per block) of each tensor kind. /// /// Mirrors engine/strata/include/strata/artifact/gguf_reader.hpp at the -/// upstream commit recorded in engine/upstream.md, plus the kinds +/// upstream commit recorded in third_party/strata/UPSTREAM.md, plus the kinds /// engine/strata/tools/gguf_reader.py BLOCK_GEOMETRY knows beyond it (Q8_K 15, /// IQ1_S 19, F64 28, MXFP4 39, NVFP4 40). Geometry is only a byte count: a /// consumer that cannot decode a kind still refuses it at use. Differential: diff --git a/deploy/Dockerfile.static-cli b/deploy/Dockerfile.static-cli index 9a4fdad0..23b7e692 100644 --- a/deploy/Dockerfile.static-cli +++ b/deploy/Dockerfile.static-cli @@ -14,8 +14,8 @@ COPY crates/ ./crates/ COPY manifests/ ./manifests/ COPY desktop-core/ ./desktop-core/ COPY control-plane/ ./control-plane/ -COPY engine/strata/LICENSE ./engine/strata/LICENSE -COPY engine/strata/serve/chat_template.jinja ./engine/strata/serve/chat_template.jinja +COPY third_party/strata/LICENSE ./third_party/strata/LICENSE +COPY third_party/strata/serve/chat_template.jinja ./third_party/strata/serve/chat_template.jinja RUN cargo build --manifest-path control-plane/Cargo.toml --locked --release \ --target "${RUST_TARGET}" --bin leleka-api diff --git a/deploy/README.md b/deploy/README.md index 8f54d628..f53ad557 100644 --- a/deploy/README.md +++ b/deploy/README.md @@ -515,7 +515,7 @@ full payload and require memory and disk space proportional to its size. `leleka-api engine-help` materializes the embedded worker and runs its `--help` with no GPU visible; this checks loading and help output, not model readiness. `leleka-api --engine-license` prints the imported Strata MIT license. The -upstream record in `engine/upstream.md` remains authoritative and unchanged. +upstream record in `third_party/strata/UPSTREAM.md` remains authoritative and unchanged. Select the embedded worker explicitly in the usual configuration: ```json diff --git a/paper/leleka.tex b/paper/leleka.tex index df7b66d4..8094e52f 100644 --- a/paper/leleka.tex +++ b/paper/leleka.tex @@ -479,7 +479,7 @@ on interactive performance. \begin{description} \item[Source history.] The source revisions and weight digests are listed in Table~\ref{tab:revisions}. The local Strata import and patch - set are documented in \path{engine/upstream.md}. + set are documented in \path{third_party/strata/UPSTREAM.md}. \item[Weights.] The model-pair SHA-256 is the identity recorded by the KAR/GGUF PLE comparison. The records and aggregate results are listed in \path{spec node build-validation.md}, \path{spec node kar-sparse-memfd.md} diff --git a/scripts/e2e/codex/speed/spd_ab_job.sh b/scripts/e2e/codex/speed/spd_ab_job.sh index df105a8a..fc2bb074 100644 --- a/scripts/e2e/codex/speed/spd_ab_job.sh +++ b/scripts/e2e/codex/speed/spd_ab_job.sh @@ -16,7 +16,7 @@ # PH = PG and QQ = QP: A/A twins (same engine environment under another name) for the A/A control of a group A/B / a CUPTI window pair # S as E, and the replay is repeated once per entry of SPD_TUNES (default "none 0.35 0.30 none 0.35 0.30"): `strata_tune.pcie_frac` per request, files replay--.jsonl; the engine log is cut by request count # T[b] as E with LELEKA_ORIGINAL_SERVE_PCIE_FRAC=0. (T45 = the shipped 0.45, no override); a trailing b only names a repeat (T45b) -# K[b] as T45 (E) with the sm_120 kernel sets on (LELEKA_SM120_ATTN_DAILY, _GU_SWIGLU, _SIDE_MIXER = 1): the vanilla 0.1.50 defaults (engine/upstream.md); a trailing b names a repeat +# K[b] as T45 (E) with the sm_120 kernel sets on (LELEKA_SM120_ATTN_DAILY, _GU_SWIGLU, _SIDE_MIXER = 1): the vanilla 0.1.50 defaults (third_party/strata/UPSTREAM.md); a trailing b names a repeat # KA[x] as K without SIDE_MIXER (ATTN_DAILY + GU_SWIGLU: byte-identical in the model-free probe and the 243-row replay of 2026-10-29); KS[x] as K with SIDE_MIXER only # L shipped (lossless, tail skip OFF) + sm_120 ATTN_DAILY + GU_SWIGLU (lever 1: byte-identical expected, gate = every out_sha equal to A) # FA frozen placement: tier swaps off (LELEKA_ORIGINAL_SERVE_ADAPT_EVERY=0) and the fixed Original window (LELEKA_SPEC_ADAPTIVE=off LELEKA_SPEC=4, floor 0), nothing else; the identity-gate base diff --git a/scripts/e2e/decode/baseline-install.sh b/scripts/e2e/decode/baseline-install.sh index d909bb3c..1c6fab06 100644 --- a/scripts/e2e/decode/baseline-install.sh +++ b/scripts/e2e/decode/baseline-install.sh @@ -24,5 +24,5 @@ ENG=$(ls -d /home/para/.local/share/strata/components/engine/*/strata | head -1) } >"$BP/MANIFEST.sha256.new" mv "$BP/MANIFEST.sha256.new" "$BP/MANIFEST.sha256" cat "$D/bin-footprint3b/COMMIT.txt" "$D/bin-cpuservice/COMMIT.txt" >"$BP/PROVENANCE.txt" -{ echo "vanilla engine component: $ENG"; echo "vanilla launcher: $HOME/work/vanilla-strata/control/bin/strata (Strata 0.2.6 per engine/upstream.md)"; date -u +%FT%TZ; } >>"$BP/PROVENANCE.txt" +{ echo "vanilla engine component: $ENG"; echo "vanilla launcher: $HOME/work/vanilla-strata/control/bin/strata (Strata 0.2.6 per third_party/strata/UPSTREAM.md)"; date -u +%FT%TZ; } >>"$BP/PROVENANCE.txt" echo "installed; $(wc -l <"$BP/MANIFEST.sha256") inputs in $BP/MANIFEST.sha256" diff --git a/scripts/e2e/evidence/capture.py b/scripts/e2e/evidence/capture.py index 36780910..5cfec25c 100644 --- a/scripts/e2e/evidence/capture.py +++ b/scripts/e2e/evidence/capture.py @@ -78,7 +78,7 @@ import tempfile HERE = os.path.dirname(os.path.abspath(__file__)) DEFAULT_ANALYZE = os.path.normpath(os.path.join(HERE, "..", "analyze_session.py")) -DEFAULT_UPSTREAM_DOC = os.path.normpath(os.path.join(HERE, "..", "..", "..", "engine", "upstream.md")) +DEFAULT_UPSTREAM_DOC = os.path.normpath(os.path.join(HERE, "..", "..", "..", "third_party", "strata", "UPSTREAM.md")) EXIT_OK, EXIT_NO_CPU, EXIT_INPUT, EXIT_POWER_NA, EXIT_ANALYZE, EXIT_USAGE = 0, 2, 3, 4, 5, 64 GAP_S = 10.0 # a sample gap above this is counted (scripts/laptop/monitor.sh uses 10 s) @@ -492,10 +492,10 @@ def upstream_commit(doc_path): with open(doc_path, encoding="utf-8") as f: text = f.read() except OSError as exc: - raise fail_input("engine/upstream.md not readable (%s): %s" % (doc_path, exc.strerror or exc)) + raise fail_input("third_party/strata/UPSTREAM.md not readable (%s): %s" % (doc_path, exc.strerror or exc)) m = re.search(r"\|\s*Upstream commit SHA\s*\|\s*`([0-9a-f]{40})`", text) if not m: - raise fail_input("engine/upstream.md: no `Upstream commit SHA` row with a 40-hex commit") + raise fail_input("third_party/strata/UPSTREAM.md: no `Upstream commit SHA` row with a 40-hex commit") return m.group(1) @@ -655,7 +655,7 @@ def main(argv=None): ap.add_argument("--power-series", required=True) ap.add_argument("--out", required=True) ap.add_argument("--analyze-session", default=DEFAULT_ANALYZE, help="path of analyze_session.py (default: the sibling in scripts/e2e)") - ap.add_argument("--upstream-doc", default=DEFAULT_UPSTREAM_DOC, help="engine/upstream.md (default: this checkout's)") + ap.add_argument("--upstream-doc", default=DEFAULT_UPSTREAM_DOC, help="third_party/strata/UPSTREAM.md (default: this checkout's)") args = ap.parse_args(argv) try: return run(args) diff --git a/scripts/e2e/evidence/capture_vanilla.py b/scripts/e2e/evidence/capture_vanilla.py index 9098fd9c..e7ab4191 100644 --- a/scripts/e2e/evidence/capture_vanilla.py +++ b/scripts/e2e/evidence/capture_vanilla.py @@ -34,7 +34,7 @@ fit the S0.1 turn object (additionalProperties false): it is parsed and written synthetic, long_session_argv, source_snapshot_sha256, owner_attestation, foreign_load) PLUS the facts a vanilla log cannot carry: model {digest, digest_mapping}, configuration {context_tokens, kv, slots, batch, speculation}, cache {state, metric, value, unit}, hardware {cpu_model, gpu_name (optional: sampler or nvidia-smi), os (optional: this machine)}, software {cuda_version, driver_version (optional), - strata_upstream_commit (optional: engine/upstream.md)}, vanilla_noskip_environment [NAME=VALUE, ...] (vanilla_noskip only: the environment the engine + strata_upstream_commit (optional: third_party/strata/UPSTREAM.md)}, vanilla_noskip_environment [NAME=VALUE, ...] (vanilla_noskip only: the environment the engine was started with), vanilla_family {control_printed [lines], predicate {tool, output} | "unavailable: ", binary_identity {engine_version, sha256}} (the fallback of --family-dir). --family-dir: control.log (the engine log of the start-up with STRATA_FORCE_AVX2=1), predicate.json ({tool, output}; absent and not in --meta = @@ -611,8 +611,8 @@ def main(argv=None): ap.add_argument("--out", required=True) ap.add_argument("--family-dir", default=None, help="control.log, predicate.json, binary_identity.json") ap.add_argument("--parsed-out", default=None, help="write the parsed per-turn engine values and per-round timing here (not part of the record)") - ap.add_argument("--upstream-doc", default=os.path.normpath(os.path.join(HERE, "..", "..", "..", "engine", "upstream.md")), - help="engine/upstream.md (default: this checkout's)") + ap.add_argument("--upstream-doc", default=os.path.normpath(os.path.join(HERE, "..", "..", "..", "third_party", "strata", "UPSTREAM.md")), + help="third_party/strata/UPSTREAM.md (default: this checkout's)") return run_capture(ap.parse_args(argv)) except Fail as exc: sys.stderr.write("capture_vanilla: %s\n" % exc.message) diff --git a/scripts/package-release.py b/scripts/package-release.py index 39ce531a..d943dd9e 100755 --- a/scripts/package-release.py +++ b/scripts/package-release.py @@ -8,7 +8,7 @@ repository tree (for templates, sealed PTX and docs) and a provenance record. Ou leleka-VERSION-COMMIT12-linux-x86_64.tar.xz.sha256 The provenance record names the git commit, whether the tree was clean, and the local changes to the imported -Strata source relative to the upstream commit in engine/upstream.md. Builds happen in WSL/Linux from an exported tree +Strata source relative to the upstream commit in third_party/strata/UPSTREAM.md. Builds happen in WSL/Linux from an exported tree (no .git there), so the record is produced where git exists: python3 scripts/package-release.py provenance --repo . --out provenance.json @@ -36,8 +36,7 @@ TEMPLATES = [ 'deploy/rust-runtime/leleka-inference.service', 'deploy/rust-runtime/runtime.env.example', ] -UPSTREAM_DOC = 'engine/upstream.md' -SUBTREE = 'engine/strata' +UPSTREAM_DOC = 'third_party/strata/UPSTREAM.md' def run(args, cwd=None, check=True): @@ -65,7 +64,7 @@ def upstream_record(repo): def provenance(repo, allow_dirty=False): - """Git commit, cleanliness, and the local changes to engine/strata relative to the recorded upstream commit.""" + """Git commit, cleanliness and the recorded Strata upstream commit.""" url, upstream_sha = upstream_record(repo) commit = run(['git', '-C', repo, 'rev-parse', 'HEAD']) status = run(['git', '-C', repo, 'status', '--porcelain', '--untracked-files=normal']) @@ -74,10 +73,6 @@ def provenance(repo, allow_dirty=False): diff_digest = hashlib.sha256(run(['git', '-C', repo, 'diff', 'HEAD', '--binary'], check=False).encode()).hexdigest() if dirty_files else None if dirty_files and not allow_dirty: raise RuntimeError(f'the tree has {len(dirty_files)} uncommitted change(s); commit them or pass --allow-dirty (the release is then marked dirty)') - # Import commit(s): the first commit that touched the subtree. - history = run(['git', '-C', repo, 'log', '--format=%H %s', '--reverse', '--', SUBTREE]).splitlines() - import_commit = history[0].split(' ', 1)[0] if history else None - subtree_tree = run(['git', '-C', repo, 'rev-parse', f'HEAD:{SUBTREE}']) record = { 'schema_version': 1, 'git_commit': commit, @@ -90,33 +85,10 @@ def provenance(repo, allow_dirty=False): 'strata': { 'upstream_url': url, 'upstream_commit': upstream_sha, - 'subtree_path': SUBTREE, - 'subtree_tree_at_head': subtree_tree, - 'import_commit': import_commit, - 'commits_touching_subtree': len(history), - 'local_patch_commits': [line.split(' ', 1) for line in history[1:]][:200], + 'record': UPSTREAM_DOC, + 'vendored_tree': 'removed (STRA-406); the full tree is in git history before the removal commit, see the record', }, } - # Local changes since the import (the committed ones), and against the upstream tree when it is present. - if import_commit: - stat = run(['git', '-C', repo, 'diff', '--shortstat', f'{import_commit}', 'HEAD', '--', SUBTREE], check=False) - diff = run(['git', '-C', repo, 'diff', '--binary', f'{import_commit}', 'HEAD', '--', SUBTREE], check=False) - record['strata']['diff_since_import'] = { - 'shortstat': stat or 'no change', - 'diff_sha256': hashlib.sha256(diff.encode()).hexdigest(), - } - have_upstream = subprocess.run(['git', '-C', str(repo), 'cat-file', '-e', f'{upstream_sha}^{{commit}}'], capture_output=True).returncode == 0 - if have_upstream: - upstream_tree = run(['git', '-C', repo, 'rev-parse', f'{upstream_sha}^{{tree}}']) - record['strata']['diff_vs_upstream'] = { - 'upstream_tree': upstream_tree, - 'shortstat': run(['git', '-C', repo, 'diff', '--shortstat', upstream_tree, f'HEAD:{SUBTREE}'], check=False) or 'identical', - } - else: - record['strata']['diff_vs_upstream'] = { - 'available': False, - 'why': f'the upstream commit {upstream_sha} is not in this repository (fetch the strata-upstream remote to compare)', - } return record @@ -176,7 +148,7 @@ def package(args): members[f'share/leleka/templates/{Path(template).name}'] = ((repo / template).read_bytes(), False) for profile in sorted((repo / 'deploy/rust-runtime/profiles').glob('*.json')): members[f'share/leleka/profiles/{profile.name}'] = (profile.read_bytes(), False) - for doc in ['engine/upstream.md']: + for doc in ['third_party/strata/UPSTREAM.md']: if (repo / doc).is_file(): members[f'share/leleka/docs/{Path(doc).name}'] = ((repo / doc).read_bytes(), False) members['install.sh'] = ((repo / 'deploy/rust-runtime/install.sh').read_bytes(), True) diff --git a/scripts/release/package-5090.sh b/scripts/release/package-5090.sh index e9ae3866..bf5d8e79 100644 --- a/scripts/release/package-5090.sh +++ b/scripts/release/package-5090.sh @@ -36,9 +36,9 @@ set -eu # --- the release identity: change these only with the checklist ------------------------------------------------------------------ RELEASE_TAG=leleka-5090-v0.1 -RELEASE_STRATA_PIN=41cf05a06a25dd29103b7b27a2279a3f60c21876 # engine/upstream.md; upstream 0.2.8 exists, the pin is NOT moved for this release +RELEASE_STRATA_PIN=41cf05a06a25dd29103b7b27a2279a3f60c21876 # third_party/strata/UPSTREAM.md; upstream 0.2.8 exists, the pin is NOT moved for this release BINARIES="leleka leleka-api leleka-inference leleka-daemon leleka-cli leleka-seal-exec" -DOCS="engine/upstream.md" +DOCS="third_party/strata/UPSTREAM.md" UNATTENDED_DEFAULTS="scripts/ops/README.md scripts/ops/install-leleka-service.sh scripts/ops/leleka.service scripts/ops/owner-wifi-stability.sh" MAX_TRACKED_BYTES=20000000 SECRET_RE='-----BEGIN [A-Z ]*PRIVATE KEY-----|AKIA[0-9A-Z]{16}|ghp_[A-Za-z0-9]{30,}|github_pat_[A-Za-z0-9_]{30,}|hf_[A-Za-z0-9]{30,}|sk-[A-Za-z0-9]{32,}|xox[abp]-[A-Za-z0-9-]{10,}|AIza[0-9A-Za-z_-]{35}|eyJ[A-Za-z0-9_-]{20,}\.[A-Za-z0-9_-]{20,}\.' @@ -111,14 +111,12 @@ else P_BRANCH=$(git rev-parse --abbrev-ref HEAD) P_DESCRIBE=$(git describe --always --abbrev=12 2>/dev/null || echo unknown) P_EPOCH=$(git log -1 --format=%ct HEAD) - P_SUBTREE=$(git rev-parse HEAD:engine/strata) - P_TOUCHING=$(git log --format=%h -- engine/strata | wc -l | tr -d ' ') P_TREE=$(git rev-parse 'HEAD^{tree}') if [ -n "$(git status --porcelain --untracked-files=no)" ]; then P_DIRTY=true; else P_DIRTY=false; fi fi release_version() { field version m { print $4, $5 }') if [ -z "$big" ]; then ok "no tracked file is larger than $MAX_TRACKED_BYTES bytes"; else bad "tracked files over $MAX_TRACKED_BYTES bytes:"; printf '%s\n' "$big"; fi } @@ -224,7 +222,7 @@ gate_licence() { if ! grep -qE '^license(\.workspace)? *=' "$manifest"; then unlicensed="$unlicensed $(field name <"$manifest")"; fi done if [ -z "$unlicensed" ]; then ok "every workspace crate declares a licence"; else bad "workspace crates without a licence field:$unlicensed (these build the shipped binaries leleka-api, leleka-inference, leleka-daemon, leleka-cli, leleka-seal-exec)"; fi - for f in engine/strata/LICENSE engine/strata/third_party/ggml/LICENSE engine/strata/third_party/project-maya/LICENSE engine/strata/third_party/project-maya/NOTICE.md control-plane/third_party/ggml/LICENSE crates/native-cpu-expert/LICENSE.ggml crates/native-cpu-expert/LICENSE.strata crates/quant-core/LICENSE-GGML crates/cpu-sys/NOTICE.colibri; do + for f in third_party/strata/LICENSE third_party/strata/ggml/LICENSE third_party/strata/project-maya/LICENSE third_party/strata/project-maya/NOTICE.md control-plane/third_party/ggml/LICENSE crates/native-cpu-expert/LICENSE.ggml crates/native-cpu-expert/LICENSE.strata crates/quant-core/LICENSE-GGML crates/cpu-sys/NOTICE.colibri; do [ -f "$f" ] || bad "third-party licence text missing: $f" done } @@ -257,7 +255,7 @@ run_stage() { mkdir -p "$dest" git -c core.autocrlf=false -c core.eol=lf archive --format=tar HEAD | tar -x -C "$dest" { - printf "P_COMMIT='%s'\nP_SHORT='%s'\nP_BRANCH='%s'\nP_DESCRIBE='%s'\nP_EPOCH='%s'\nP_SUBTREE='%s'\nP_TOUCHING='%s'\nP_TREE='%s'\n" "$P_COMMIT" "$P_SHORT" "$P_BRANCH" "$P_DESCRIBE" "$P_EPOCH" "$P_SUBTREE" "$P_TOUCHING" "$P_TREE" + printf "P_COMMIT='%s'\nP_SHORT='%s'\nP_BRANCH='%s'\nP_DESCRIBE='%s'\nP_EPOCH='%s'\nP_TREE='%s'\n" "$P_COMMIT" "$P_SHORT" "$P_BRANCH" "$P_DESCRIBE" "$P_EPOCH" "$P_TREE" printf "P_CHECK_FAILURES='%s'\nP_STAGED_UTC='%s'\n" "$failures" "$(date -u +%Y-%m-%dT%H:%M:%SZ)" } >"$dest/PROVENANCE.env" crlf_after=$(cd "$dest" && for f in $(ptx_all_list); do no_cr "$f" || echo "$f"; done | wc -l | tr -d ' ') @@ -315,15 +313,15 @@ run_package() { ( cd "$stage/share/leleka/ptx/sm_120" && LC_ALL=C ls | grep -v '^SHA256SUMS$' | xargs sha256sum >SHA256SUMS ) for d in $DOCS; do [ -f "$d" ] || die "$d is missing" - rel=${d#engine/}; mkdir -p "$stage/share/leleka/docs/$(dirname "$rel")"; cp "$d" "$stage/share/leleka/docs/$rel" + rel=${d#third_party/strata/}; mkdir -p "$stage/share/leleka/docs/$(dirname "$rel")"; cp "$d" "$stage/share/leleka/docs/$rel" done [ ! -f LICENSE ] || cp LICENSE "$stage/LICENSE" - cp engine/strata/LICENSE "$stage/share/leleka/licenses/strata-MIT.txt" + cp third_party/strata/LICENSE "$stage/share/leleka/licenses/strata-MIT.txt" cp crates/deploy/data/expert-profile.NOTICE "$stage/share/leleka/licenses/expert-profile-NOTICE.txt" cp crates/deploy/data/expert-profile.NOTICE "$stage/share/leleka/licenses/strata-expert-profile-NOTICE.txt" - cp engine/strata/third_party/ggml/LICENSE "$stage/share/leleka/licenses/ggml-MIT.txt" - cp engine/strata/third_party/project-maya/LICENSE "$stage/share/leleka/licenses/project-maya-MIT.txt" - cp engine/strata/third_party/project-maya/NOTICE.md "$stage/share/leleka/licenses/project-maya-NOTICE.md" + cp third_party/strata/ggml/LICENSE "$stage/share/leleka/licenses/ggml-MIT.txt" + cp third_party/strata/project-maya/LICENSE "$stage/share/leleka/licenses/project-maya-MIT.txt" + cp third_party/strata/project-maya/NOTICE.md "$stage/share/leleka/licenses/project-maya-NOTICE.md" cp crates/cpu-sys/NOTICE.colibri "$stage/share/leleka/licenses/colibri-NOTICE.txt" [ ! -f deploy/release/third-party-crates-5090-v0.1.tsv ] || cp deploy/release/third-party-crates-5090-v0.1.tsv "$stage/share/leleka/licenses/rust-crates.tsv" found_unattended= @@ -355,7 +353,7 @@ run_package() { { printf '{\n "schema_version": 1,\n "release": "%s",\n "git_commit": "%s",\n "git_branch": "%s",\n "git_describe": "%s",\n "git_tree": "%s",\n "dirty": %s,\n' "$RELEASE_TAG" "$P_COMMIT" "$P_BRANCH" "$P_DESCRIBE" "$P_TREE" "$dirty" printf ' "cargo_lock_sha256": "%s",\n "rust_toolchain": "%s",\n "built_in_mode": "%s",\n' "$cargo_lock" "$(field channel "$stage/PROVENANCE.json" printf '%s\n' "$RELEASE_TAG" >"$stage/RELEASE" diff --git a/scripts/smoke-cli-container.py b/scripts/smoke-cli-container.py index 3ee51d42..ecda15ae 100644 --- a/scripts/smoke-cli-container.py +++ b/scripts/smoke-cli-container.py @@ -51,7 +51,7 @@ def main(image): assert version.startswith('leleka-api '), version license_text = docker('run', '--rm', *common, '--network', 'none', image, '--engine-license').stdout - assert license_text == (root / 'engine/strata/LICENSE').read_text() + assert license_text == (root / 'third_party/strata/LICENSE').read_text() info = json.loads(docker('run', '--rm', *common, '--network', 'none', image, 'engine-info').stdout) assert info['embedded'] is False and info['model_bundled'] is False, info diff --git a/engine/strata/LICENSE b/third_party/strata/LICENSE similarity index 100% rename from engine/strata/LICENSE rename to third_party/strata/LICENSE diff --git a/third_party/strata/UPSTREAM.md b/third_party/strata/UPSTREAM.md new file mode 100644 index 00000000..aadb2818 --- /dev/null +++ b/third_party/strata/UPSTREAM.md @@ -0,0 +1,62 @@ +# Strata upstream record + +Leleka is a Rust/CUDA port of the Original mode17 serve path of Strata. The Strata source tree that was vendored under +`engine/strata/` is removed; this directory keeps the few files that Rust code and the shipped product still read, and this record. + +## Pin + +| Field | Value | +| --- | --- | +| Upstream repository URL | https://github.com/Niko1221/Strata.git | +| Upstream commit SHA | `41cf05a06a25dd29103b7b27a2279a3f60c21876` | +| Upstream commit date | 2026-10-25 11:35 +0100 | +| Upstream version at the pin | engine and Control 0.1.50, Terminal and app 0.2.5 | +| Licence | MIT, `LICENSE` in this directory (shipped by `leleka engine license` and by the release packager) | + +`leleka version` prints the `Upstream commit SHA` above (`crates/deploy/build.rs` reads the row of this table), and the release packager +records it. Do not advance the pin silently: choose a commit, review the diff from the pin, and change this row in the same commit. + +The old pin was `d9ab8435f654c368c586340d490915f6addf56a3` (engine 0.1.35, upstream tree `487c4cc0`, identical to upstream commit +`5b734e42`; upstream rewrote its history, so `d9ab8435` is not an ancestor of upstream `main`). + +## What is kept here, and who reads it + +All of these are byte-identical to upstream at the pin (`.gitattributes` keeps them out of line-ending conversion). + +| File | Read by | +| --- | --- | +| `LICENSE` | `leleka engine license` (`control-plane/src/cli/operations.rs`), `deploy/Dockerfile.static-cli`, the release packagers | +| `ggml/LICENSE`, `project-maya/LICENSE`, `project-maya/NOTICE.md` | release packagers (licence texts shipped in `share/leleka/licenses/`) | +| `serve/chat_template.jinja` | `leleka-gateway-text` (`prompt.rs`) and `leleka-control-plane` (`server_api.rs`), both with `include_str!` | +| `serve/chat_golden.json` | `leleka-gateway-text` prompt tests | +| `tests/data/native_experts/*.txt` | `leleka-control-plane` `native_pack` tests | + +`control-plane/tests/mcp_hub/mcp_fake_server.py` is the upstream `serve/mcp_fake_server.py`, kept next to the test that runs it. + +## Local patches that the removed tree carried + +The tree at `engine/strata/` was upstream `41cf05a0` plus 25 locally patched files (21 modified, 4 new), all default-off or build-profile only: + +- `CMakeLists.txt` (`STRATA_CUDA_STATIC` profile, KAR and PLE targets, keyless sources) +- `include/strata/core/expert_source.hpp`, `include/strata/core/keyless.hpp` (new), `include/strata/core/layer.hpp`, + `include/strata/core/verify.hpp`, `include/strata/kernels/kv_stream.hpp`, `include/strata/kernels/ngram.hpp`, + `include/strata/kernels/qsa_decode_attn.hpp` +- `src/core/conversation_snapshot.cpp`, `src/core/conversation_snapshot_test.cpp`, `src/core/expert_source.cpp`, + `src/core/keyless.cpp` (new), `src/core/layer.cpp`, `src/core/mtp.cpp`, `src/core/verify.cpp` +- `src/kernels/cuda/keyless.cu` (new), `src/kernels/cuda/kv_q8.cu`, `src/kernels/cuda/kv_stream.cu`, + `src/kernels/cuda/qsa_decode_attn.cu`, `src/kernels/keyless_parity.cpp` (new), `src/kernels/kv_stream_parity.cpp`, + `src/kernels/ngram.cpp` +- `src/prefill/kernels.cu`, `src/prefill/prefill.cpp`, `src/program/generate.cpp` + +## Where the removed tree is + +The full tree is in git history before the removal commit: `87e2633af` ("bring the Strata subtree to upstream 41cf05a0 (engine 0.1.50) +with the local patches re-applied") is the last commit that changed `engine/strata/`, and `git show ^:engine/strata` +(or `git archive ^ engine/strata`) restores it. The removal commit is REMOVAL_COMMIT. +The local patches as a diff (old pin to old subtree, and new pin to new subtree) were `engine/upstream/local-patches-on-0.1.35.patch` +and `engine/upstream/local-patches-on-0.1.50.patch`; they are in the same history. The upstream remote is +`git remote add strata-upstream https://github.com/Niko1221/Strata.git`; the pin commit is fetched from there. + +Why it was removed (owner decision, 2026-11-23): Leleka never builds or runs it (no `Cargo.toml` or `build.rs` depends on it), the vanilla +reference build for benchmarks is made from its own checkout on the benchmark server, the comparison measurements are finished and the +CUDA ports are frozen. Oracles and checks that compiled or read the removed sources were retired with it (see the removal commit message). diff --git a/engine/strata/third_party/ggml/LICENSE b/third_party/strata/ggml/LICENSE similarity index 100% rename from engine/strata/third_party/ggml/LICENSE rename to third_party/strata/ggml/LICENSE diff --git a/engine/strata/third_party/project-maya/LICENSE b/third_party/strata/project-maya/LICENSE similarity index 100% rename from engine/strata/third_party/project-maya/LICENSE rename to third_party/strata/project-maya/LICENSE diff --git a/engine/strata/third_party/project-maya/NOTICE.md b/third_party/strata/project-maya/NOTICE.md similarity index 100% rename from engine/strata/third_party/project-maya/NOTICE.md rename to third_party/strata/project-maya/NOTICE.md diff --git a/engine/strata/serve/chat_golden.json b/third_party/strata/serve/chat_golden.json similarity index 100% rename from engine/strata/serve/chat_golden.json rename to third_party/strata/serve/chat_golden.json diff --git a/engine/strata/serve/chat_template.jinja b/third_party/strata/serve/chat_template.jinja similarity index 100% rename from engine/strata/serve/chat_template.jinja rename to third_party/strata/serve/chat_template.jinja diff --git a/engine/strata/tests/data/native_experts/coder-iq1_m.txt b/third_party/strata/tests/data/native_experts/coder-iq1_m.txt similarity index 100% rename from engine/strata/tests/data/native_experts/coder-iq1_m.txt rename to third_party/strata/tests/data/native_experts/coder-iq1_m.txt diff --git a/engine/strata/tests/data/native_experts/iq2_xs.txt b/third_party/strata/tests/data/native_experts/iq2_xs.txt similarity index 100% rename from engine/strata/tests/data/native_experts/iq2_xs.txt rename to third_party/strata/tests/data/native_experts/iq2_xs.txt diff --git a/engine/strata/tests/data/native_experts/iq3_s.txt b/third_party/strata/tests/data/native_experts/iq3_s.txt similarity index 100% rename from engine/strata/tests/data/native_experts/iq3_s.txt rename to third_party/strata/tests/data/native_experts/iq3_s.txt diff --git a/engine/strata/tests/data/native_experts/iq3_xxs.txt b/third_party/strata/tests/data/native_experts/iq3_xxs.txt similarity index 100% rename from engine/strata/tests/data/native_experts/iq3_xxs.txt rename to third_party/strata/tests/data/native_experts/iq3_xxs.txt diff --git a/engine/strata/tests/data/native_experts/q2_0.txt b/third_party/strata/tests/data/native_experts/q2_0.txt similarity index 100% rename from engine/strata/tests/data/native_experts/q2_0.txt rename to third_party/strata/tests/data/native_experts/q2_0.txt diff --git a/engine/strata/tests/data/native_experts/swift-iq2_xs.txt b/third_party/strata/tests/data/native_experts/swift-iq2_xs.txt similarity index 100% rename from engine/strata/tests/data/native_experts/swift-iq2_xs.txt rename to third_party/strata/tests/data/native_experts/swift-iq2_xs.txt diff --git a/tools/kernel-ab/README.md b/tools/kernel-ab/README.md index 76073b68..03e29be4 100644 --- a/tools/kernel-ab/README.md +++ b/tools/kernel-ab/README.md @@ -37,8 +37,8 @@ Recorded in `manifest.json` (`provenance`) and printed by the build: compiler id strings (`strata_cxx_flags`, `strata_per_file_flags`, `ggml_c_flags`, `ggml_cxx_flags`, `ggml_cpu_arch_flags`), `GGML_NATIVE=ON` (ggml-cpu is built with `-march=native` for the **build host**, so build and run on the same machine), `STRATA_PORTABLE=OFF`, `STRATA_ISA_FLOOR` empty, `STRATA_ENABLE_CUDA=OFF`, the ggml commit (pin + the checkout's actual HEAD), -the `engine/strata` pin from `engine/upstream.md`, and the tools commit. The comparator flags are the **pin's CMake flags**, not -those of upstream's release packaging (`engine/upstream.md`: the packaging recipes were not run here). +the `engine/strata` pin from `third_party/strata/UPSTREAM.md`, and the tools commit. The comparator flags are the **pin's CMake flags**, not +those of upstream's release packaging (`third_party/strata/UPSTREAM.md`: the packaging recipes were not run here). The Makefile's `STRATA_AVXVNNI` define comes from running the engine's own probe (`cpp/avxvnni_probe.cpp`); ggml's own generated header `ggml-version.h` is regenerated from `ggml/CMakeLists.txt` and the pin. diff --git a/tools/kernel-ab/cpp/Makefile b/tools/kernel-ab/cpp/Makefile index 09e035d3..bad04998 100644 --- a/tools/kernel-ab/cpp/Makefile +++ b/tools/kernel-ab/cpp/Makefile @@ -157,7 +157,7 @@ $(BUILD)/build-info.txt: $(BUILD)/kab Makefile printf 'ggml_pin\t%s\n' '$(GGML_PIN)'; \ printf 'ggml_source\t%s\n' '$(GGML_URL)'; \ printf 'strata_version\t%s\n' '$(STRATA_VERSION)'; \ - printf 'engine_strata_pin\t%s\n' "$$(grep -o 'Upstream commit SHA | `[0-9a-f]*`' $(REPO)/engine/upstream.md | head -1 | grep -o '[0-9a-f]\{40\}')"; \ + printf 'engine_strata_pin\t%s\n' "$$(grep -o 'Upstream commit SHA | `[0-9a-f]*`' $(REPO)/third_party/strata/UPSTREAM.md | head -1 | grep -o '[0-9a-f]\{40\}')"; \ c=$$(git -C '$(REPO)' rev-parse HEAD 2>/dev/null || cat '$(REPO)/.source-commit' 2>/dev/null || echo unknown); \ printf 'tools_commit\t%s\n' "$$c"; \ d=unknown; if git -C '$(REPO)' rev-parse HEAD >/dev/null 2>&1; then d=$$(git -C '$(REPO)' status --porcelain -- tools/kernel-ab | wc -l); fi; \