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>
79 lines
4.5 KiB
JSON
79 lines
4.5 KiB
JSON
{
|
|
"schema": 1,
|
|
"note": "Assets that are unsealed placeholders in crates/cuda-driver/src but are covered by none of docs/cuda-seal-plan*.json. Same entry format as those plans (plus group/optional/deferred/entry_prefix_counts/include_profile). Recipes are taken from the placeholder/.cu headers; none has been compiled. Sibling plans carry cu_pin; these entries have none because no pin was ever written, so the compile manifest (cu sha256 at compile time) is the pin.",
|
|
"assets": [
|
|
{
|
|
"cu": "crates/cuda-driver/src/kar_decode_levels.cu",
|
|
"ptx": "crates/cuda-driver/src/kar_decode_levels.ptx",
|
|
"flags": ["-ptx", "-O3", "-arch=sm_120", "-std=c++17", "--ftz=false", "--prec-div=true", "--prec-sqrt=true", "--fmad=true"],
|
|
"policy": "precise (flags quoted from the placeholder header of kar_decode_levels.ptx; no fast-math)",
|
|
"entries": ["leleka_kar_decode_levels_f32", "leleka_kar_multiply_f32", "leleka_kar_swiglu_f32"],
|
|
"encoding": "concat_include_str",
|
|
"rust_fields_to_fill": {
|
|
"kar_decode_levels.rs": ["KAR_DECODE_LEVELS_PIN.source_sha256", "KAR_DECODE_LEVELS_PIN.ptx_sha256"]
|
|
},
|
|
"group": "kar"
|
|
},
|
|
{
|
|
"cu": "crates/cuda-driver/src/mmq_original_group_swiglu.cu",
|
|
"ptx": "crates/cuda-driver/src/mmq_original_group_swiglu.ptx",
|
|
"flags": ["-ptx", "-O3", "-arch=sm_120", "-std=c++17", "--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.",
|
|
"entries": ["leleka_original_mmq_swiglu", "leleka_original_mmq_gather", "leleka_original_mmq_gu_finite"],
|
|
"encoding": "include_bytes",
|
|
"include_profile": "standard",
|
|
"rust_fields_to_fill": {"mmq_original_group.rs": ["SEALED[0]"]},
|
|
"group": "mmq_group",
|
|
"optional": true,
|
|
"atomic_group": "mmq_group"
|
|
},
|
|
{
|
|
"cu": "crates/cuda-driver/src/mmq_original_group_mul.cu",
|
|
"ptx": "crates/cuda-driver/src/mmq_original_group_mul.ptx",
|
|
"flags": ["-ptx", "-O3", "-arch=sm_120", "-std=c++17", "--use_fast_math", "--extended-lambda"],
|
|
"policy": "fast-math, flags quoted from the .cu header and the stra169 mmq-original-formats recipe (--use_fast_math --extended-lambda). UNVERIFIED: decide before sealing.",
|
|
"entry_prefix_counts": {"_Z9mul_mat_q": 66},
|
|
"encoding": "include_bytes",
|
|
"include_profile": "standard",
|
|
"rust_fields_to_fill": {"mmq_original_group.rs": ["SEALED[1]"]},
|
|
"group": "mmq_group",
|
|
"optional": true,
|
|
"atomic_group": "mmq_group"
|
|
},
|
|
{
|
|
"cu": "crates/cuda-driver/src/mmq_original_group_fixup.cu",
|
|
"ptx": "crates/cuda-driver/src/mmq_original_group_fixup.ptx",
|
|
"flags": ["-ptx", "-O3", "-arch=sm_120", "-std=c++17", "--use_fast_math", "--extended-lambda"],
|
|
"policy": "fast-math, flags quoted from the .cu header and the stra169 mmq-original-formats-fixup recipe. UNVERIFIED: decide before sealing.",
|
|
"entry_prefix_counts": {"_Z24mul_mat_q_stream_k_fixup": 66},
|
|
"encoding": "include_bytes",
|
|
"include_profile": "standard",
|
|
"rust_fields_to_fill": {"mmq_original_group.rs": ["SEALED[2]"]},
|
|
"group": "mmq_group",
|
|
"optional": true,
|
|
"atomic_group": "mmq_group"
|
|
},
|
|
{
|
|
"cu": "crates/cuda-driver/src/mtp_original_scalar_norm.cu",
|
|
"ptx": "crates/cuda-driver/src/mtp_original_scalar_norm.ptx",
|
|
"flags": [],
|
|
"deferred": "placeholder says 'literal Original scalar MTP assets; no executable entry'. No recipe exists in any plan; the scalar MTP prefill path (mtp_original_scalar_prefill.rs) stays fail-closed.",
|
|
"group": "scalar_mtp"
|
|
},
|
|
{
|
|
"cu": "crates/cuda-driver/src/mtp_original_scalar_gr.cu",
|
|
"ptx": "crates/cuda-driver/src/mtp_original_scalar_gr.ptx",
|
|
"flags": [],
|
|
"deferred": "placeholder says 'literal Original scalar MTP assets; no executable entry'. The .cu is a host+device translation unit (fused_gr.cu with <random>, <cstdio>, Strata headers), not a PTX-only source; needs a decision by the owner.",
|
|
"group": "scalar_mtp"
|
|
},
|
|
{
|
|
"cu": "crates/cuda-driver/src/native_parity.cu",
|
|
"ptx": "crates/cuda-driver/src/native_parity.ptx",
|
|
"flags": [],
|
|
"deferred": "placeholder says 'compile native_parity.cu using pinned Original headers and flags. No executable entries.' Parity oracle source (iq_kernels.cu derivative); not needed for serving.",
|
|
"group": "native_parity"
|
|
}
|
|
]
|
|
}
|