Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
326 lines
13 KiB
JSON
326 lines
13 KiB
JSON
{
|
|
"schema": 1,
|
|
"note": "Additions to CUDA-SEAL-PLAN.json (schema 1, see stra169 plan) for the .cu assets added on claude/port-forward-leaves. Same fields; seal_sha256/seal_length are filled by the sealing session after nvcc. None of these needs -I/work/include (they include only cuda_fp16.h/cuda_runtime.h/libc headers). Verify each compiled entry list with `cuobjdump -sass`/`grep .entry` against `entries` before pinning. Flags follow engine/strata/CMakeLists.txt: --use_fast_math only for files in the native_* fast-math list.",
|
|
"assets": [
|
|
{
|
|
"cu": "crates/cuda-driver/src/qsa_prompt_attention_variants.cu",
|
|
"cu_pin": {
|
|
"sha256": "6ee7f0d468a714767f684ebe302cd2e269f68764944dd862ed92a94813c7f1e4",
|
|
"bytes": 23880
|
|
},
|
|
"ptx": "crates/cuda-driver/src/qsa_prompt_attention_variants.ptx",
|
|
"flags": [
|
|
"-ptx",
|
|
"-O3",
|
|
"-arch=sm_120"
|
|
],
|
|
"policy": "Original qsa_prompt_attn.cu precise (not in CMake fast-math list); v1 template kernel modes 0 fp16 / 1 int8 / 3 K8V4",
|
|
"direct_original_headers": [],
|
|
"rust_consumers": {
|
|
"qsa_prompt_attention.rs": {
|
|
"sha256": "464e6f0ec82736c5337b540e6015e946b1651a278329c9dc19e29e17d17d3a2d",
|
|
"bytes": 17896
|
|
}
|
|
},
|
|
"rust_fields_to_fill": {},
|
|
"encoding": "include_bytes",
|
|
"seal_sha256": "9041e250f6ffca2f849c20605a3f758c54f7856e7cd015c8a1da6625048d6aac",
|
|
"seal_length": 216290,
|
|
"entries": [
|
|
"leleka_qsa_prompt_attn_v1_i8",
|
|
"leleka_qsa_prompt_attn_f16",
|
|
"leleka_qsa_prompt_attn_k8v4",
|
|
"leleka_qsa_prompt_guard",
|
|
"leleka_qsa_prompt_output_guard"
|
|
],
|
|
"note": "Wired: qsa_prompt_attention.rs loads it lazily (only for non-default pools / debug switches). Dynamic smem 54288 / 37904 / 46096 B; the v1 launcher opts in via cuFuncSetAttribute (allowlist in qsa_prompt_attention_ffi.rs)."
|
|
},
|
|
{
|
|
"cu": "crates/cuda-driver/src/native_flash_attn.cu",
|
|
"cu_pin": {
|
|
"sha256": "5cb73b5892c94238ae3a4470aa71585550c1526983ea0b5655281f294f354734",
|
|
"bytes": 8955
|
|
},
|
|
"ptx": "crates/cuda-driver/src/native_flash_attn.ptx",
|
|
"flags": [
|
|
"-ptx",
|
|
"-O3",
|
|
"-arch=sm_120",
|
|
"--use_fast_math"
|
|
],
|
|
"policy": "Original native_flash_attn.cu fastmath (CMake fast-math list); short-context Q24x256/KV2x256 F16 only",
|
|
"direct_original_headers": [],
|
|
"rust_consumers": {
|
|
"native_flash_attn.rs": {
|
|
"sha256": "db43d4b64692024cc1c3647363c5a1731dca8410f160c8517ce8a1ff665a0132",
|
|
"bytes": 10775
|
|
},
|
|
"closed_kernels.rs": {
|
|
"sha256": "4fdfaae52112dc60e21ec1aa5eca82baa7916bc706578018f3d941f69fcd3afa",
|
|
"bytes": 28979
|
|
},
|
|
"closed_kernels_gpu.rs": {
|
|
"sha256": "bf92ce678f4b1bee725771ac238313ea95159c9d124982902ca22069b76888da",
|
|
"bytes": 18057
|
|
}
|
|
},
|
|
"rust_fields_to_fill": {
|
|
"closed_kernels.rs": [
|
|
"PINS[0].source_sha256",
|
|
"PINS[0].ptx_sha256"
|
|
]
|
|
},
|
|
"encoding": "concat_include_str",
|
|
"seal_sha256": "be353e619a15a566e57bae12a0bf30cc1712a281bce6928f3bb76c14e5114bba",
|
|
"seal_length": 208590,
|
|
"entries": [
|
|
"leleka_native_flash_attn_short"
|
|
],
|
|
"note": "Wired by closed_kernels_gpu.rs (ClosedKernels::native_flash_attn_short, grid 24, block (32, 4), no dynamic smem) behind a zero PTX pin; the (32, 4) block goes through the generic KAR launcher (Api::launch_closed). Run the closed_gpu_* ignored smokes before freezing the pin."
|
|
},
|
|
{
|
|
"cu": "crates/cuda-driver/src/mmq_original_prefill_misc.cu",
|
|
"cu_pin": {
|
|
"sha256": "da4cc72e19ca1ad694f4be807d6c0c1337ecfd8ca553fe31dd4c5185ed24cf4a",
|
|
"bytes": 3072
|
|
},
|
|
"ptx": "crates/cuda-driver/src/mmq_original_prefill_misc.ptx",
|
|
"flags": [
|
|
"-ptx",
|
|
"-O3",
|
|
"-arch=sm_120"
|
|
],
|
|
"policy": "Original prefill/moe_mmq.cu copy1/strata_q2/iota; integer only so precise and -use_fast_math PTX are identical",
|
|
"direct_original_headers": [],
|
|
"rust_consumers": {
|
|
"mmq_original_prefill_misc.rs": {
|
|
"sha256": "3dbfa2bb94a8c2adeb231c970ed3726de5fd43dbeaceeb105bb9ff166b79a093",
|
|
"bytes": 9943
|
|
}
|
|
},
|
|
"rust_fields_to_fill": {},
|
|
"encoding": "include_bytes",
|
|
"seal_sha256": "3e57326d0dd6aec8147e6cf837ceca9d779ba06ea67bf4311b3ce0baa6d04d69",
|
|
"seal_length": 5267,
|
|
"entries": [
|
|
"leleka_original_mmq_copy1",
|
|
"leleka_original_mmq_strata_q2",
|
|
"leleka_original_mmq_iota"
|
|
],
|
|
"note": "Not wired: launched by the prompt composer hooks (executor_original_prompt.rs OriginalPromptHooks) once the MMQ owner loads it. 256 threads, ceil(n/256) blocks."
|
|
},
|
|
{
|
|
"cu": "crates/cuda-driver/src/device_poison.cu",
|
|
"cu_pin": {
|
|
"sha256": "6b2ca992ac39d5b6b1820a744ad8bca03f6426302bc178c0d3089e4f767b610e",
|
|
"bytes": 914
|
|
},
|
|
"ptx": "crates/cuda-driver/src/device_poison.ptx",
|
|
"flags": [
|
|
"-ptx",
|
|
"-O3",
|
|
"-arch=sm_120"
|
|
],
|
|
"policy": "Original core/device.cu poison_kernel; device.cu is not in the CMake fast-math list",
|
|
"direct_original_headers": [],
|
|
"rust_consumers": {
|
|
"device_arena.rs": {
|
|
"sha256": "777a57fe571949e293e781fba254a0dae71ce2be7935ff4ad7435a3829bc23d0",
|
|
"bytes": 8773
|
|
},
|
|
"closed_kernels.rs": {
|
|
"sha256": "4fdfaae52112dc60e21ec1aa5eca82baa7916bc706578018f3d941f69fcd3afa",
|
|
"bytes": 28979
|
|
},
|
|
"closed_kernels_gpu.rs": {
|
|
"sha256": "bf92ce678f4b1bee725771ac238313ea95159c9d124982902ca22069b76888da",
|
|
"bytes": 18057
|
|
}
|
|
},
|
|
"rust_fields_to_fill": {
|
|
"closed_kernels.rs": [
|
|
"PINS[2].source_sha256",
|
|
"PINS[2].ptx_sha256"
|
|
]
|
|
},
|
|
"encoding": "concat_include_str",
|
|
"seal_sha256": "587b097a201a6730e8fe5543291987bbf807da72da12b8e0a169f9e5e8f6a658",
|
|
"seal_length": 870,
|
|
"entries": [
|
|
"leleka_poison_f32"
|
|
],
|
|
"note": "Wired by closed_kernels_gpu.rs (ClosedKernels::poison_f32: 256 threads, blocks sliced at 0x7FFFFFFF) behind a zero PTX pin; nothing calls it by default."
|
|
},
|
|
{
|
|
"cu": "crates/cuda-driver/src/s_gemv_legacy.cu",
|
|
"cu_pin": {
|
|
"sha256": "0922bb96ca3b2f1110509adab242cf76fa1f910cde859d1e4e4150c607b51952",
|
|
"bytes": 51423
|
|
},
|
|
"ptx": "crates/cuda-driver/src/s_gemv_legacy.ptx",
|
|
"flags": [
|
|
"-ptx",
|
|
"-O3",
|
|
"-arch=sm_120"
|
|
],
|
|
"policy": "Original s_gemv.cu / s2_gemv*.cu precise (none is in the CMake fast-math list); legacy S2/S4/S8 canonical-form GEMVs",
|
|
"direct_original_headers": [],
|
|
"rust_consumers": {
|
|
"s_gemv_legacy.rs": {
|
|
"sha256": "bf294d7996b76ef62a5307f59ec061eb8eabbd45dd2aa8efc9a28068d354963f",
|
|
"bytes": 36529
|
|
},
|
|
"closed_kernels.rs": {
|
|
"sha256": "4fdfaae52112dc60e21ec1aa5eca82baa7916bc706578018f3d941f69fcd3afa",
|
|
"bytes": 28979
|
|
},
|
|
"closed_kernels_gpu.rs": {
|
|
"sha256": "bf92ce678f4b1bee725771ac238313ea95159c9d124982902ca22069b76888da",
|
|
"bytes": 18057
|
|
}
|
|
},
|
|
"rust_fields_to_fill": {
|
|
"closed_kernels.rs": [
|
|
"PINS[1].source_sha256",
|
|
"PINS[1].ptx_sha256"
|
|
]
|
|
},
|
|
"encoding": "concat_include_str",
|
|
"seal_sha256": "3ab4d12a5e97c4e2f4602c6c872372c5c0685d8cf1a20260af6e0f5205ac76d5",
|
|
"seal_length": 303521,
|
|
"entries": [
|
|
"leleka_s_gemv_2",
|
|
"leleka_s_gemv_4",
|
|
"leleka_s_gemv_8",
|
|
"leleka_s_gemv_split_2",
|
|
"leleka_s_gemv_split_4",
|
|
"leleka_s_gemv_split_8",
|
|
"leleka_s_gemv_q8k_4",
|
|
"leleka_s_gemv_q8k_8",
|
|
"leleka_s_gemv_q8k_split_4",
|
|
"leleka_s_gemv_q8k_split_8",
|
|
"leleka_s_gemv_q8_0_split_4",
|
|
"leleka_s_gemv_q8_0_split_8",
|
|
"leleka_s2_gemv",
|
|
"leleka_s2_gemv_quads",
|
|
"leleka_s2_gemv_q8",
|
|
"leleka_s2_gemv_fast_staged",
|
|
"leleka_s2_gemv_fast_unstaged"
|
|
],
|
|
"note": "Wired by closed_kernels_gpu.rs (ClosedKernels::s_gemv / s2_gemv over the s_gemv_legacy planners, dynamic shared memory via Api::launch_closed) behind a zero PTX pin; nothing calls it by default."
|
|
}
|
|
],
|
|
"flags_policy_audit": {
|
|
"audited": "2026-10-14 with scripts/cuda-stubs/literal_diff.py (SOURCES=1) over every crates/cuda-driver/src/*.cu, against engine/strata/CMakeLists.txt",
|
|
"cmake_policy": {
|
|
"per_source_use_fast_math": [
|
|
"native_mmvq",
|
|
"native_bf16",
|
|
"native_gr_norm",
|
|
"native_moe",
|
|
"native_gdn",
|
|
"native_gr_postops",
|
|
"native_router",
|
|
"native_gdn_preprocess",
|
|
"native_qsa",
|
|
"native_rope",
|
|
"native_ple_postops",
|
|
"native_flash_attn",
|
|
"native_qsa_indexer",
|
|
"native_qsa_score"
|
|
],
|
|
"cmake_lines": "engine/strata/CMakeLists.txt:340-352 (strata_kernels), :965 (strata_mmq)",
|
|
"strata_mmq_extended_lambda_use_fast_math": [
|
|
"src/prefill/moe_mmq.cu",
|
|
"src/prefill/ggml_cuda_host.cu",
|
|
"ggml-cuda/quantize.cu",
|
|
"ggml-cuda/template-instances/mmq-instance-*.cu"
|
|
],
|
|
"everything_else": "default nvcc flags (no --use_fast_math); strata_next_kar* add CUDA_STANDARD 17 only"
|
|
},
|
|
"unsealed_assets_without_an_entry_in_the_three_additions_files": [
|
|
{
|
|
"cu": "mmq_original_group_swiglu.cu",
|
|
"original": "prefill/moe_mmq.cu swiglu_kernel / copy16_kernel",
|
|
"required": "--extended-lambda -use_fast_math (strata_mmq). swiglu_kernel computes g / (1 + __expf(-g)) * u, so the division is rcp.approx under fast math; a precise build is NOT the Original",
|
|
"entries": [
|
|
"leleka_original_mmq_swiglu",
|
|
"leleka_original_mmq_gather",
|
|
"leleka_original_mmq_gu_finite"
|
|
],
|
|
"note": "leleka_original_mmq_gu_finite is a port-side integer exponent scan, not an Original kernel"
|
|
},
|
|
{
|
|
"cu": "mmq_original_group_mul.cu / mmq_original_group_fixup.cu / mmq_original_formats.cu / mmq_original_formats_fixup.cu",
|
|
"original": "ggml-cuda mmq.cuh instances (strata_mmq)",
|
|
"required": "-use_fast_math (the .cu headers already say so); 66 mul_mat_q + 66 stream-k fixup instantiations are exactly the (type,width) set of ffi.rs mmq_original_group_function"
|
|
},
|
|
{
|
|
"cu": "mtp_original_scalar_gr.cu",
|
|
"original": "kernels/cuda/fused_gr.cu",
|
|
"required": "default (precise)"
|
|
},
|
|
{
|
|
"cu": "mtp_original_scalar_norm.cu",
|
|
"original": "native_qsa.cu norm<1024> + native_rope.cu apply<false>",
|
|
"required": "--use_fast_math"
|
|
},
|
|
{
|
|
"cu": "mtp_original_session_native_rope.cu",
|
|
"original": "native_rope.cu apply<TAB>",
|
|
"required": "--use_fast_math"
|
|
},
|
|
{
|
|
"cu": "mtp_original_session_legacy_rope.cu",
|
|
"original": "rope.cu rope_neox_kernel",
|
|
"required": "default (precise)"
|
|
},
|
|
{
|
|
"cu": "original_sampler.cu (= mtp_original_full_coupled.cu = native_head_sampler.cu text)",
|
|
"original": "kernels/cuda/sampler.cu",
|
|
"required": "default (precise)"
|
|
},
|
|
{
|
|
"cu": "native_parity.cu",
|
|
"original": "iq_kernels.cu",
|
|
"required": "default (precise); test harness only"
|
|
},
|
|
{
|
|
"cu": "native_head_native.cu / native_head_iq.cu / native_head_sampler.cu",
|
|
"original": "native_mmvq.cu / iq_kernels.cu / sampler.cu",
|
|
"required": "native_head_native: --use_fast_math (native_mmvq); the other two precise. These are byte/semantic twins of the sealed mtp_original_full_head_* sources and are not referenced by any Rust asset"
|
|
},
|
|
{
|
|
"cu": "kar_decode_levels.cu",
|
|
"original": "none (gpu/kar/src/kar_expert.cu pairing; spec in crates/model-format/src/kar_kernel_model.rs)",
|
|
"required": "precise: --ftz=false --prec-div=true --prec-sqrt=true --fmad=true; the multiply uses explicit __fmul_rn/__fadd_rn"
|
|
}
|
|
],
|
|
"sealed_assets_built_precise_whose_original_is_fast_math": [
|
|
"mtp_original_tail (native_mmvq)",
|
|
"mtp_original_full_checks (native_mmvq)",
|
|
"mtp_original_full_head_native (native_mmvq)",
|
|
"mtp_original_full_bf16 (native_bf16)",
|
|
"mtp_original_full_router (native_router)",
|
|
"mtp_original_full_gr_norm (native_gr_norm)",
|
|
"mtp_original_full_gr_post (native_gr_postops)",
|
|
"mtp_original_full_combine (native_moe)",
|
|
"mtp_original_full_qnorm / mtp_original_full_qsa_gate / qsa_native_gate (native_qsa)",
|
|
"qsa_decode_postops (native_qsa norm + native_rope)",
|
|
"original_verify_qsa / qsa_prompt_indexer (native_qsa_indexer)",
|
|
"ple_native_batch / ple_prompt_device (native_ple_postops)",
|
|
"moe_route_top10 (native_router)",
|
|
"mtp_original_prefill_mmq / _fixup / _quant (strata_mmq -use_fast_math: the q8_1 quantizer divides)"
|
|
],
|
|
"sealed_assets_whose_original_is_precise": [
|
|
"mtp_original_full_attention (qsa_decode_attn)",
|
|
"qsa_prompt_postops (prefill/kernels.cu)",
|
|
"qsa_prompt_select (qsa_select.cu)",
|
|
"mtp_original_full_router_legacy (router_top10)",
|
|
"mtp_original_full_fused_gr (fused_gr)",
|
|
"mtp_original_full_s2 / mtp_original_full_shared / mtp_original_full_verify / mtp_original_full_element / mtp_original_full_gr_write / mtp_original_full_head_iq / mtp_original_full_head_sampler / mtp_original_full_coupled / mtp_original_full_quant80"
|
|
],
|
|
"stale_toolkit_comments": "kar_decode_levels.cu, experimental_*.cu, mmq_original_group_*.cu, mmq_original_formats*.cu say nvcc 12.8.93; deploy/cuda-toolkit.lock.json and scripts/build-original-verify-ptx.sh pin 13.0.88"
|
|
}
|
|
}
|