gpu-bringup: name the include dirs of an upstream checkout strata-41cf05a0/ instead of the removed engine/strata (STRA-407)
The recipe data (sm86-recipes.json, extra-seal-plan.json, rope-regeneration.json), STANDARD_INCLUDES, the sm86 include list and the one test that asserts them
now spell the include directories as strata-41cf05a0/{include,src,third_party/ggml}; prose that named engine/strata/CMakeLists.txt or the retired
build-original-verify-ptx.sh now says Strata 41cf05a0 or the precise flags. UPSTREAM.md records where to place a restored checkout.
No pin covers these files; behaviour of the tools is unchanged (the directories did not exist before either).
This commit is contained in:
@@ -21,11 +21,11 @@ SEAL_PLAN_DIR = "crates/cuda-driver/seal-plans"
|
||||
ROPE_DOC = "scripts/gpu-bringup/rope-regeneration.json"
|
||||
ABI_SOURCE = "crates/context/src/ptx_abi.rs"
|
||||
|
||||
# -I set the sealed PTX were built with (repo-root relative). The two engine/strata directories were the vendored Strata tree, removed in
|
||||
# STRA-406 (history: third_party/strata/UPSTREAM.md); an asset whose source includes a strata/ header needs them restored there to compile.
|
||||
# -I set the sealed PTX were built with (repo-root relative). The two strata-41cf05a0 directories are an upstream checkout (third_party/strata/UPSTREAM.md);
|
||||
# an asset whose source includes a strata/ header needs that checkout placed at strata-41cf05a0/ to compile.
|
||||
STANDARD_INCLUDES = [
|
||||
"engine/strata/include",
|
||||
"engine/strata/third_party/ggml",
|
||||
"strata-41cf05a0/include",
|
||||
"strata-41cf05a0/third_party/ggml",
|
||||
"crates/cuda-driver/src/third_party/llamacpp/ggml-cuda",
|
||||
"crates/cuda-driver/src/third_party/llamacpp/ggml-include",
|
||||
"crates/cuda-driver/src/third_party/llamacpp/ggml-src",
|
||||
@@ -247,7 +247,7 @@ def parse_abi_tuples(text: str) -> Dict[str, Dict[str, Tuple[int, int]]]:
|
||||
|
||||
|
||||
ROPE_VARIANTS = ("precise", "preserve")
|
||||
# Sources that the Original compiles with --use_fast_math (engine/strata/CMakeLists.txt native_* list); the
|
||||
# Sources that the Original compiles with --use_fast_math (Strata 41cf05a0, CMakeLists.txt native_* list); the
|
||||
# committed PTX of these two contain .ftz instructions, i.e. they were built fast-math (stra169 plan).
|
||||
ROPE_FASTMATH_SOURCES = ("qsa_prompt_indexer", "qsa_decode_postops")
|
||||
# decimal-pin hits expected in the Rust tree for the committed digests (found by scanning, see seal_pins)
|
||||
@@ -420,7 +420,7 @@ def entry_param_count(text: str, entry: str) -> Optional[int]:
|
||||
|
||||
|
||||
# CUDA 13.2.0 and 13.2.1 (nvcc 13.2.51) miscompile some sm_120 kernels (IQ2_S / IQ3_S products wrong, relative error 0.5-1.0;
|
||||
# upstream engine/strata/docs/TROUBLESHOOTING.md, #892, #968); 13.2.2 (nvcc 13.2.86) is right. Their PTX names the build in its header.
|
||||
# upstream Strata 41cf05a0, docs/TROUBLESHOOTING.md, #892, #968); 13.2.2 (nvcc 13.2.86) is right. Their PTX names the build in its header.
|
||||
BAD_NVCC_BUILDS = ("13.2.0", "13.2.1", "13.2.51")
|
||||
_NVCC_HEADER = re.compile(r"Cuda compilation tools, release [0-9.]+, V([0-9]+\.[0-9]+\.[0-9]+)")
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
"--use_fast_math",
|
||||
"--extended-lambda"
|
||||
],
|
||||
"policy": "fast-math, flags quoted from the sibling mmq_original_group_{mul,fixup}.cu header ('ROOT must compile sm120 --use_fast_math'); swiglu itself uses explicit __expf. UNVERIFIED against engine/strata CMake: decide before sealing.",
|
||||
"policy": "fast-math, flags quoted from the sibling mmq_original_group_{mul,fixup}.cu header ('ROOT must compile sm120 --use_fast_math'); swiglu itself uses explicit __expf. UNVERIFIED against the CMake of Strata 41cf05a0: decide before sealing.",
|
||||
"entries": [
|
||||
"leleka_original_mmq_swiglu",
|
||||
"leleka_original_mmq_gather",
|
||||
@@ -142,7 +142,7 @@
|
||||
"--fmad=true",
|
||||
"--use_fast_math"
|
||||
],
|
||||
"policy": "fast-math RESEAL: the Original compiles native_mmvq.cu quantize_q8_1 (head_quant) with --use_fast_math (native_mmvq on the CMake fast-math list); the copy sealed by scripts/build-original-verify-ptx.sh used the non-fast flags. Audit: head_quant has two div.rn.f32 where the Original emits div.full.f32.",
|
||||
"policy": "fast-math RESEAL: the Original compiles native_mmvq.cu quantize_q8_1 (head_quant) with --use_fast_math (native_mmvq on the CMake fast-math list); the copy sealed earlier used the non-fast flags. Audit: head_quant has two div.rn.f32 where the Original emits div.full.f32.",
|
||||
"encoding": "include_bytes",
|
||||
"group": "reseal-fastmath",
|
||||
"atomic_group": "reseal-fastmath",
|
||||
@@ -164,7 +164,7 @@
|
||||
"--fmad=true",
|
||||
"--use_fast_math"
|
||||
],
|
||||
"policy": "fast-math RESEAL: the Original compiles native_qsa_indexer.cu append<false> with --use_fast_math (native_qsa_indexer on the CMake fast-math list); the copy sealed by scripts/build-original-verify-ptx.sh used the non-fast flags. Audit: powf/cosf/sinf are the libm forms here, __powf/cos.approx/sin.approx in the Original.",
|
||||
"policy": "fast-math RESEAL: the Original compiles native_qsa_indexer.cu append<false> with --use_fast_math (native_qsa_indexer on the CMake fast-math list); the copy sealed earlier used the non-fast flags. Audit: powf/cosf/sinf are the libm forms here, __powf/cos.approx/sin.approx in the Original.",
|
||||
"encoding": "concat_include_str",
|
||||
"group": "reseal-fastmath",
|
||||
"atomic_group": "reseal-fastmath",
|
||||
@@ -189,7 +189,7 @@
|
||||
"--fmad=true",
|
||||
"--use_fast_math"
|
||||
],
|
||||
"policy": "fast-math RESEAL: the Original compiles native_router.cu route with --use_fast_math (native_router on the CMake fast-math list); the copy sealed by scripts/build-original-verify-ptx.sh used the non-fast flags. Audit: expf and reciprocal.",
|
||||
"policy": "fast-math RESEAL: the Original compiles native_router.cu route with --use_fast_math (native_router on the CMake fast-math list); the copy sealed earlier used the non-fast flags. Audit: expf and reciprocal.",
|
||||
"encoding": "include_bytes",
|
||||
"group": "reseal-fastmath",
|
||||
"atomic_group": "reseal-fastmath",
|
||||
@@ -211,7 +211,7 @@
|
||||
"--fmad=true",
|
||||
"--use_fast_math"
|
||||
],
|
||||
"policy": "fast-math RESEAL: the Original compiles native_gr_postops.cu with --use_fast_math (native_gr_postops on the CMake fast-math list); the copy sealed by scripts/build-original-verify-ptx.sh used the non-fast flags. Audit: sigmoid/silu expf and division.",
|
||||
"policy": "fast-math RESEAL: the Original compiles native_gr_postops.cu with --use_fast_math (native_gr_postops on the CMake fast-math list); the copy sealed earlier used the non-fast flags. Audit: sigmoid/silu expf and division.",
|
||||
"encoding": "include_bytes",
|
||||
"group": "reseal-fastmath",
|
||||
"atomic_group": "reseal-fastmath",
|
||||
@@ -233,7 +233,7 @@
|
||||
"--fmad=true",
|
||||
"--use_fast_math"
|
||||
],
|
||||
"policy": "fast-math RESEAL: the Original compiles native_gr_norm.cu weighted_rms_norm with --use_fast_math (native_gr_norm on the CMake fast-math list); the copy sealed by scripts/build-original-verify-ptx.sh used the non-fast flags. Audit: mean = partial / n_cols.",
|
||||
"policy": "fast-math RESEAL: the Original compiles native_gr_norm.cu weighted_rms_norm with --use_fast_math (native_gr_norm on the CMake fast-math list); the copy sealed earlier used the non-fast flags. Audit: mean = partial / n_cols.",
|
||||
"encoding": "include_bytes",
|
||||
"group": "reseal-fastmath",
|
||||
"atomic_group": "reseal-fastmath",
|
||||
@@ -253,7 +253,7 @@
|
||||
"-arch=sm_120",
|
||||
"--use_fast_math"
|
||||
],
|
||||
"policy": "fast-math RESEAL: the Original compiles native_ple_postops.cu with --use_fast_math (native_ple_postops on the CMake fast-math list); the copy sealed by scripts/build-original-verify-ptx.sh used the non-fast flags. Audit: sqrtf/expf/division. Only with a PLE block. Recipe: the stra169 plan's flags plus --use_fast_math (no -std, no includes).",
|
||||
"policy": "fast-math RESEAL: the Original compiles native_ple_postops.cu with --use_fast_math (native_ple_postops on the CMake fast-math list); the copy sealed earlier used the non-fast flags. Audit: sqrtf/expf/division. Only with a PLE block. Recipe: the stra169 plan's flags plus --use_fast_math (no -std, no includes).",
|
||||
"encoding": "concat_include_str",
|
||||
"group": "reseal-fastmath",
|
||||
"atomic_group": "reseal-fastmath",
|
||||
@@ -278,7 +278,7 @@
|
||||
"-std=c++17",
|
||||
"--use_fast_math"
|
||||
],
|
||||
"policy": "native_mmvq.cu/native_bf16.cu are --use_fast_math in engine/strata/CMakeLists.txt; native head kernels adapt ggml mmvq/quantize",
|
||||
"policy": "native_mmvq.cu/native_bf16.cu are --use_fast_math in Strata 41cf05a0, CMakeLists.txt; native head kernels adapt ggml mmvq/quantize",
|
||||
"entries": [
|
||||
"head_n11_s0",
|
||||
"head_n11_s1",
|
||||
@@ -857,7 +857,7 @@
|
||||
"-std=c++17",
|
||||
"--fmad=true",
|
||||
"--ftz=false",
|
||||
"-Iengine/strata/src/kernels/cuda"
|
||||
"-Istrata-41cf05a0/src/kernels/cuda"
|
||||
],
|
||||
"include_profile": "standard",
|
||||
"policy": "precise (--fmad=true --ftz=false: the recipe of original_verify_window_moe_experts.cu; upstream STRATA_GU_SWIGLU, bitwise the three kernels it replaces)",
|
||||
@@ -888,7 +888,7 @@
|
||||
"-std=c++17",
|
||||
"--fmad=true",
|
||||
"--ftz=false",
|
||||
"-Iengine/strata/src/kernels/cuda"
|
||||
"-Istrata-41cf05a0/src/kernels/cuda"
|
||||
],
|
||||
"include_profile": "standard",
|
||||
"policy": "precise (--fmad=true --ftz=false: the recipe of original_verify_window_moe_experts.cu; claude/ffn-down-sub16: LELEKA_SM120_DOWN_SUB16, upstream native_down_multi_kernel<TD, SUB_DOWN>, bitwise window_moe_down_<T>)",
|
||||
@@ -966,7 +966,7 @@
|
||||
"--fmad=true",
|
||||
"--ftz=false"
|
||||
],
|
||||
"policy": "precise (the recipe of scripts/build-original-verify-ptx.sh, which built the single-check kernels this one batches; the predicate is the same abs + setp.ne inf)",
|
||||
"policy": "precise (the recipe that built the single-check kernels this one batches; the predicate is the same abs + setp.ne inf)",
|
||||
"entries": [
|
||||
"mtp_original_check_batch"
|
||||
],
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
"note": "Regeneration recipe of the four QSA PTX files that carry the RoPE scaling arguments (flags, include set, sources). It replaces the nvcc block that used to be parsed out of the rope and memory plan document; scripts/gpu-bringup/bringup_lib.py rope_assets() reads it. The include set is bringup_lib.STANDARD_INCLUDES (the test pins the equality).",
|
||||
"flags": ["--ptx", "-std=c++17", "-O3", "-arch=sm_120", "--fmad=true", "--ftz=false"],
|
||||
"includes": [
|
||||
"engine/strata/include",
|
||||
"engine/strata/third_party/ggml",
|
||||
"strata-41cf05a0/include",
|
||||
"strata-41cf05a0/third_party/ggml",
|
||||
"crates/cuda-driver/src/third_party/llamacpp/ggml-cuda",
|
||||
"crates/cuda-driver/src/third_party/llamacpp/ggml-include",
|
||||
"crates/cuda-driver/src/third_party/llamacpp/ggml-src"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -56,9 +56,9 @@ MANIFEST_NAME = "MANIFEST.json"
|
||||
ARCH = "sm_86"
|
||||
SRC_ARCH = "sm_120"
|
||||
|
||||
# Union of the include sets used by the repo's recipes (the retired scripts/build-original-verify-ptx.sh, the seal plans and the
|
||||
# Union of the include sets used by the repo's recipes (the precise-flags original-verify build, the seal plans and the
|
||||
# scalar-MTP recipe); a missing directory is dropped, and the round trip proves the choice.
|
||||
INCLUDES = L.STANDARD_INCLUDES + ["engine/strata/src", "engine/strata/third_party/ggml/src"]
|
||||
INCLUDES = L.STANDARD_INCLUDES + ["strata-41cf05a0/src", "strata-41cf05a0/third_party/ggml/src"]
|
||||
|
||||
# PTX name -> source stem when the .cu does not share the PTX's name. Each mapping is only used if the round trip
|
||||
# reproduces the sealed entry set; otherwise the asset has no verified recipe.
|
||||
|
||||
@@ -48,8 +48,8 @@ class PlanParsing(unittest.TestCase):
|
||||
assets, _ = L.load_all_assets(REPO, None)
|
||||
moe = next(a for a in assets if a.id == "original_verify_window_moe_experts")
|
||||
self.assertEqual(moe.pin_fields, {"original_verify_window_moe.rs": ["EXPERTS.sha"]})
|
||||
self.assertIn("-Iengine/strata/include", [f"-I{d}" for d in moe.includes])
|
||||
self.assertNotIn("-Iengine/strata/include", moe.flags)
|
||||
self.assertIn("-Istrata-41cf05a0/include", [f"-I{d}" for d in moe.includes])
|
||||
self.assertNotIn("-Istrata-41cf05a0/include", moe.flags)
|
||||
self.assertEqual(len(moe.entries), 16)
|
||||
self.assertEqual(moe.encoding, "include_bytes")
|
||||
gate = next(a for a in assets if a.id == "original_verify_window_qsa_gate")
|
||||
|
||||
Vendored
+3
-1
@@ -56,7 +56,9 @@ the complete tree, so `git archive 81039bb40 engine/strata` restores it. The rem
|
||||
the tree (so `1a4d4a73^` no longer has all of them) and `1a4d4a73` ("Remove the vendored Strata tree engine/strata and its provenance
|
||||
files (STRA-406)") deleted the rest.
|
||||
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
|
||||
and `engine/upstream/local-patches-on-0.1.50.patch`; they are in the same history.
|
||||
The `scripts/gpu-bringup` recipes name the include directories of an upstream checkout as `strata-41cf05a0/{include,src,third_party/ggml}`:
|
||||
to recompile an asset that includes `strata/` headers, extract `git archive 81039bb40 engine/strata` and place it at `strata-41cf05a0/`. 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 in New Issue
Block a user