diff --git a/changelog.d/214-kernel-limits-records-match-what-nvcc-bu.md b/changelog.d/214-kernel-limits-records-match-what-nvcc-bu.md new file mode 100644 index 00000000000..044b0582665 --- /dev/null +++ b/changelog.d/214-kernel-limits-records-match-what-nvcc-bu.md @@ -0,0 +1,8 @@ +# Kernel contract: CUDA limits records match nvcc 13.0 on GB10 again + +- 41 launches across 12 families had stale records. They now carry the resources nvcc 13.0 compiled on TOP + (job `top-57fa0d391dec`), in `measurements/main_130.zig`. The reasons per family are in + `docs/kernel-contract/limits-receipt.md`. +- `docs/kernel-contract/limits-job.sh` runs the full five-SM limits audit as a TOP job and prints each stale launch's + `RECORD` line. +- The EXL3 prompt launches use their measured 13.0 receipt and remain pending on other releases. diff --git a/docs/kernel-contract/limits-job.sh b/docs/kernel-contract/limits-job.sh new file mode 100755 index 00000000000..55156a6e1fa --- /dev/null +++ b/docs/kernel-contract/limits-job.sh @@ -0,0 +1,34 @@ +#!/bin/sh +# kernel-contract-limits over every image of the five release SMs, as a TOP job: +# swarm gpu-run plotarmordev/TensorFold SHA docs/kernel-contract/limits-job.sh +# nvcc builds the images with -Xptxas -v (one thread per SASS target), the build stopping at 600 s. Prints each stale +# or failing check and the RECORD line of its launch (the values its record is replaced with), the router's measured +# lines, then ptxas's registers and static shared bytes per SM for the router and the 41 launches main_130.zig records. +set -u +here=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd) +symbols="tf_nemo_router_tiles d3_cfg_mix d3_router_compact dfl_topk dfl_walk fn_hcn_down2 fn_hcn_down3 fn_hcn_up3 +fn_row_topk muse_argmax muse_expert_sum muse_linear2_k2_w4 muse_linear2_k2_w8 muse_linear2_k3_w8 muse_linear2_k4_w4 +muse_linear2_k4_w8 muse_linear2_k5_w4 muse_linear2_k5_w8 muse_linear2_k6_w4 muse_linear2_k6_w8 muse_linear2_k8_w4 +muse_linear_multi_k2 muse_linear_multi_k3 muse_linear_multi_k4 muse_linear_multi_k5 muse_linear_multi_k6 +muse_linear_multi_k8 muse_rms muse_rot_multi muse_softcap tf_exl3_prompt_down tf_exl3_prompt_down_k6 tf_exl3_prompt_gu +tf_exl3_prompt_gu_k6 tf_glm_dsel_merge tf_nemo_attn64 tf_nemo_preds tf_q35_gdn_slots_1 tf_q35_gdn_slots_2 +tf_q35_gdn_slots_4 tf_qmm_prefill_many _ZN7tf_qmmf11qmmf_kernelILi4ELi16ELi64ELi1ELi4ELi4ELb1ELb0ELb1EEEvPK13__nv_bfloat16PKhS5_fPvPfiiiiiii" +status=0 +NVCC_APPEND_FLAGS="-Xptxas -v --threads 0" H3_BUILD=limits LIMITS_IMAGES= timeout 600 \ + sh "$here/../recipes/minimax-h3-cuda/cuda-build.sh" >/work/out/build.log 2>&1 || status=$? +[ "$status" = 124 ] && echo "limits job stopped at its 600 s limit" +tail -n 4 /work/out/build.log +log=/work/out/limits.log +grep -E '^(INFO|SUMMARY|MISSED|RED )' "$log" +awk '/^(PASS|FAIL) limits sm_[0-9]+ .*\(record stale\)|^FAIL limits/ { sub(/^(PASS|FAIL) limits sm_[0-9]+ /, ""); sub(/: [0-9]+ registers,.*/, ""); stale[$0] = 1; print "STALE " $0 } + /^RECORD / { name = substr($0, 8); sub(/: \.usage = .*/, "", name); if (name in stale) print }' "$log" | sort -u +grep -E '^(PASS|FAIL) limits sm_[0-9]+ router tf_nemo_router_tiles:' "$log" +symbols=$symbols awk -F"'" 'BEGIN { n = split(ENVIRON["symbols"], s, /[ \n]+/); for (i = 1; i <= n; i++) want[s[i]] = 1 } + /Compiling entry function/ { fn = $2; sm = $4; next } + fn != "" && /ptxas info *: Used / { if (fn in want) { + regs = $0; sub(/.*Used /, "", regs); sub(/ registers.*/, "", regs) + smem = "0"; if (match($0, /[0-9]+ bytes smem/)) smem = substr($0, RSTART, RLENGTH - 11) + use[fn] = use[fn] " " sm "=" regs "r/" smem "s" } + fn = "" } + END { for (f in use) print "PTXAS " f ":" use[f] }' /work/out/build.log | sort +exit "$status" diff --git a/docs/kernel-contract/limits-receipt.md b/docs/kernel-contract/limits-receipt.md new file mode 100644 index 00000000000..ff7cb312df8 --- /dev/null +++ b/docs/kernel-contract/limits-receipt.md @@ -0,0 +1,40 @@ +# Limits refresh receipt, 23 Nov + +Job `top-57fa0d391dec` ran [`limits-job.sh`](limits-job.sh) on TOP at `4db907f60104076f8e12f4c4840c7f1ecfa9b8b4` +(main `2945c7d29` plus that script). nvcc 13.0 built the images. The audit reads each launch's registers, static +shared bytes and launch bounds from the cubin ELF's `.nv.info` and `.nv.shared` sections (`cubin.zig`). Its output +is [`limits-top-57fa0d391dec.txt`](limits-top-57fa0d391dec.txt). It found 41 stale launches across 12 families, and +its 10 planted control checks went RED. Each `RECORD` line was copied unedited into +`zig/src/core/contract/measurements/main_130.zig`, except `qmm_prefill`'s four unaudited slots, taken from the +second job's `PTXAS` line below. + +Job `top-e6855ec197a2` reran the script on 24 Nov at `f8674bfaa164131e2a195e50b0529996f171bfcc`, which is current +main (`b29b19824`, with #146's `qwen35.cu`) plus this card's commits. This time nvcc ran with `-Xptxas -v` under a +600 s limit. Its output, [`limits-top-e6855ec197a2.txt`](limits-top-e6855ec197a2.txt), has no stale launch, all 10 +control checks RED and exit 0. The router `tf_nemo_router_tiles` measures 184 registers on sm_86, as recorded; the +237 seen in an earlier run did not recur. Its `PTXAS` lines give ptxas's own registers and static shared bytes for +the router and the 41 refreshed launches on all five SMs, and every record equals them on every SM. The 1 KiB that +sm_120 and sm_121 reserve is subtracted only when `cubin.zig` parses the cubin's `.nv.shared` section; ptxas's +figures leave it out. `qmm_prefill` launches on sm_121 only, so the audit checks just that slot; its other four +slots hold the same job's ptxas figures (173 registers on sm_80 to sm_89, 130 on sm_120). `qmmf`'s line is listed +under its mangled symbol. + +Why each family moved: + +| Family | Launches | Reason | +| --- | --- | --- | +| drama3 | 2 | merged change: #33 and #32 added `d3_router_compact` and `d3_cfg_mix` pending, never measured | +| exl3_experts | 4 | merged change: #52 left `tf_exl3_prompt_gu` and `tf_exl3_prompt_down` pending and #115 added their two k6 launches unmeasured | +| flashnext_hcn | 3 | toolchain: #108 recorded nvcc 13.3's values, and nvcc 13.0 builds these three launches differently | +| flashnext_mtp | 1 | merged change: #57 folded the non-finite checks into `fn_row_topk` after its record | +| glm_glue | 1 | merged change: #87 and #122 edited `tf_glm_dsel_merge` in `glm_index_decode.cuh` after #57 recorded it | +| muse_dflash2 | 2 | merged change: #87 recorded only nvcc 13.3's sm_121 values | +| muse_glue | 4 | merged change: #87 recorded only nvcc 13.3's sm_121 values | +| muse_linear | 17 | merged change: #87 recorded only nvcc 13.3's sm_121 values | +| nemo_audio | 2 | toolchain: #74 recorded nvcc 13.2's values, and nvcc 13.0 builds these two launches differently | +| qmm_prefill | 1 | merged change: `83bc87103`, merged through #87, rewrote `tf_qmm_prefill_many`'s copy addressing after the record | +| qmmf | 1 | unknown: recorded in #141, source unchanged since | +| qwen35 | 3 | merged change: #53 edited the one-row rollback in `q35_slots` (`qwen35_slots.cuh`) after #11 recorded it | + +The four EXL3 prompt launches were reported as pending at every release (`exl3_prompt_pending.zig`), so their 13.0 +receipt only applies because `usageFor` now checks 13.0's receipts first. Other releases keep them pending. diff --git a/docs/kernel-contract/limits-top-57fa0d391dec.txt b/docs/kernel-contract/limits-top-57fa0d391dec.txt new file mode 100644 index 00000000000..dd9aa46ebc8 --- /dev/null +++ b/docs/kernel-contract/limits-top-57fa0d391dec.txt @@ -0,0 +1,98 @@ +started top-57fa0d391dec +RED limits sm_121 control: heavy at 1,024 threads: 166 registers, 0 static shared bytes, bound 0 (record current): control: heavy at 1,024 threads on sm_121: 166 registers x 1024 threads need 172032, a block has 65536 +RECORD control: heavy at 1,024 threads: .usage = .{ .{ .regs = 168, .static = 0, .bound = 0 }, .{ .regs = 166, .static = 0, .bound = 0 }, .{ .regs = 166, .static = 0, .bound = 0 }, .{ .regs = 166, .static = 0, .bound = 0 }, .{ .regs = 166, .static = 0, .bound = 0 }, } +FAIL kernel-contract-limits: 75 problems +kernel-contract-limits exit 1 +INFO limits fatbins: images built by nvcc 13.0, checked against nvcc 13.0's records +RED limits sm_80 control: past its bounds: 10 registers, 0 static shared bytes, bound 256 (record current): control: past its bounds on sm_80: launched at 512 threads past its __launch_bounds__ 256 +RED limits sm_86 control: past its bounds: 10 registers, 0 static shared bytes, bound 256 (record current): control: past its bounds on sm_86: launched at 512 threads past its __launch_bounds__ 256 +RED limits sm_89 control: past its bounds: 10 registers, 0 static shared bytes, bound 256 (record current): control: past its bounds on sm_89: launched at 512 threads past its __launch_bounds__ 256 +RED limits sm_120 control: past its bounds: 10 registers, 0 static shared bytes, bound 256 (record current): control: past its bounds on sm_120: launched at 512 threads past its __launch_bounds__ 256 +RED limits sm_121 control: past its bounds: 10 registers, 0 static shared bytes, bound 256 (record current): control: past its bounds on sm_121: launched at 512 threads past its __launch_bounds__ 256 +RED limits sm_80 control: heavy at 1,024 threads: 168 registers, 0 static shared bytes, bound 0 (record current): control: heavy at 1,024 threads on sm_80: 168 registers x 1024 threads need 172032, a block has 65536 +RED limits sm_86 control: heavy at 1,024 threads: 166 registers, 0 static shared bytes, bound 0 (record current): control: heavy at 1,024 threads on sm_86: 166 registers x 1024 threads need 172032, a block has 65536 +RED limits sm_89 control: heavy at 1,024 threads: 166 registers, 0 static shared bytes, bound 0 (record current): control: heavy at 1,024 threads on sm_89: 166 registers x 1024 threads need 172032, a block has 65536 +RED limits sm_120 control: heavy at 1,024 threads: 166 registers, 0 static shared bytes, bound 0 (record current): control: heavy at 1,024 threads on sm_120: 166 registers x 1024 threads need 172032, a block has 65536 +RED limits sm_121 control: heavy at 1,024 threads: 166 registers, 0 static shared bytes, bound 0 (record current): control: heavy at 1,024 threads on sm_121: 166 registers x 1024 threads need 172032, a block has 65536 +RECORD drama3 d3_cfg_mix: .usage = .{ .{ .regs = 10, .static = 0, .bound = 0 }, .{ .regs = 10, .static = 0, .bound = 0 }, .{ .regs = 10, .static = 0, .bound = 0 }, .{ .regs = 12, .static = 0, .bound = 0 }, .{ .regs = 12, .static = 0, .bound = 0 }, } +RECORD drama3 d3_router_compact: .usage = .{ .{ .regs = 19, .static = 592, .bound = 0 }, .{ .regs = 19, .static = 592, .bound = 0 }, .{ .regs = 19, .static = 592, .bound = 0 }, .{ .regs = 26, .static = 592, .bound = 0 }, .{ .regs = 26, .static = 592, .bound = 0 }, } +RECORD exl3_experts tf_exl3_prompt_down: .usage = .{ .{ .regs = 126, .static = 43264, .bound = 256 }, .{ .regs = 126, .static = 43264, .bound = 256 }, .{ .regs = 126, .static = 43264, .bound = 256 }, .{ .regs = 126, .static = 43264, .bound = 256 }, .{ .regs = 126, .static = 43264, .bound = 256 }, } +RECORD exl3_experts tf_exl3_prompt_down_k6: .usage = .{ .{ .regs = 125, .static = 40192, .bound = 256 }, .{ .regs = 125, .static = 40192, .bound = 256 }, .{ .regs = 125, .static = 40192, .bound = 256 }, .{ .regs = 127, .static = 40192, .bound = 256 }, .{ .regs = 127, .static = 40192, .bound = 256 }, } +RECORD exl3_experts tf_exl3_prompt_gu: .usage = .{ .{ .regs = 126, .static = 43264, .bound = 256 }, .{ .regs = 128, .static = 43264, .bound = 256 }, .{ .regs = 128, .static = 43264, .bound = 256 }, .{ .regs = 124, .static = 43264, .bound = 256 }, .{ .regs = 124, .static = 43264, .bound = 256 }, } +RECORD exl3_experts tf_exl3_prompt_gu_k6: .usage = .{ .{ .regs = 127, .static = 40192, .bound = 256 }, .{ .regs = 126, .static = 40192, .bound = 256 }, .{ .regs = 126, .static = 40192, .bound = 256 }, .{ .regs = 127, .static = 40192, .bound = 256 }, .{ .regs = 127, .static = 40192, .bound = 256 }, } +RECORD flashnext_hcn fn_hcn_down2: .usage = .{ .{ .regs = 162, .static = 0, .bound = 224 }, .{ .regs = 162, .static = 0, .bound = 224 }, .{ .regs = 162, .static = 0, .bound = 224 }, .{ .regs = 161, .static = 0, .bound = 224 }, .{ .regs = 161, .static = 0, .bound = 224 }, } +RECORD flashnext_hcn fn_hcn_down3: .usage = .{ .{ .regs = 191, .static = 0, .bound = 224 }, .{ .regs = 191, .static = 0, .bound = 224 }, .{ .regs = 191, .static = 0, .bound = 224 }, .{ .regs = 190, .static = 0, .bound = 224 }, .{ .regs = 190, .static = 0, .bound = 224 }, } +RECORD flashnext_hcn fn_hcn_up3: .usage = .{ .{ .regs = 126, .static = 0, .bound = 256 }, .{ .regs = 126, .static = 0, .bound = 256 }, .{ .regs = 126, .static = 0, .bound = 256 }, .{ .regs = 128, .static = 0, .bound = 256 }, .{ .regs = 128, .static = 0, .bound = 256 }, } +RECORD flashnext_mtp fn_row_topk: .usage = .{ .{ .regs = 32, .static = 9228, .bound = 1024 }, .{ .regs = 59, .static = 9228, .bound = 1024 }, .{ .regs = 59, .static = 9228, .bound = 1024 }, .{ .regs = 34, .static = 9228, .bound = 1024 }, .{ .regs = 34, .static = 9228, .bound = 1024 }, } +RECORD glm_glue tf_glm_dsel_merge: .usage = .{ .{ .regs = 57, .static = 34064, .bound = 1024 }, .{ .regs = 64, .static = 34064, .bound = 1024 }, .{ .regs = 64, .static = 34064, .bound = 1024 }, .{ .regs = 64, .static = 34064, .bound = 1024 }, .{ .regs = 64, .static = 34064, .bound = 1024 }, } +RECORD muse_dflash2 dfl_topk: .usage = .{ .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 48, .static = 3072, .bound = 256 }, } +RECORD muse_dflash2 dfl_walk: .usage = .{ .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 38, .static = 196, .bound = 512 }, } +RECORD muse_glue muse_argmax: .usage = .{ .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 40, .static = 2048, .bound = 0 }, } +RECORD muse_glue muse_expert_sum: .usage = .{ .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 28, .static = 132, .bound = 0 }, } +RECORD muse_glue muse_rms: .usage = .{ .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 19, .static = 132, .bound = 0 }, } +RECORD muse_glue muse_softcap: .usage = .{ .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 30, .static = 0, .bound = 0 }, } +RECORD muse_linear muse_linear2_k2_w4: .usage = .{ .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 245, .static = 16, .bound = 128 }, } +RECORD muse_linear muse_linear2_k2_w8: .usage = .{ .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 251, .static = 16, .bound = 256 }, } +RECORD muse_linear muse_linear2_k3_w8: .usage = .{ .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 252, .static = 16, .bound = 256 }, } +RECORD muse_linear muse_linear2_k4_w4: .usage = .{ .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 245, .static = 16, .bound = 128 }, } +RECORD muse_linear muse_linear2_k4_w8: .usage = .{ .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 251, .static = 16, .bound = 256 }, } +RECORD muse_linear muse_linear2_k5_w4: .usage = .{ .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 253, .static = 16, .bound = 128 }, } +RECORD muse_linear muse_linear2_k5_w8: .usage = .{ .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 255, .static = 16, .bound = 256 }, } +RECORD muse_linear muse_linear2_k6_w4: .usage = .{ .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 255, .static = 16, .bound = 128 }, } +RECORD muse_linear muse_linear2_k6_w8: .usage = .{ .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 255, .static = 16, .bound = 256 }, } +RECORD muse_linear muse_linear2_k8_w4: .usage = .{ .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 245, .static = 16, .bound = 128 }, } +RECORD muse_linear muse_linear_multi_k2: .usage = .{ .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 128, .static = 16, .bound = 128 }, } +RECORD muse_linear muse_linear_multi_k3: .usage = .{ .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 153, .static = 16, .bound = 128 }, } +RECORD muse_linear muse_linear_multi_k4: .usage = .{ .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 128, .static = 16, .bound = 128 }, } +RECORD muse_linear muse_linear_multi_k5: .usage = .{ .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 154, .static = 16, .bound = 128 }, } +RECORD muse_linear muse_linear_multi_k6: .usage = .{ .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 154, .static = 16, .bound = 128 }, } +RECORD muse_linear muse_linear_multi_k8: .usage = .{ .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 141, .static = 16, .bound = 128 }, } +RECORD muse_linear muse_rot_multi: .usage = .{ .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 24, .static = 0, .bound = 128 }, } +RECORD nemo_audio tf_nemo_attn64: .usage = .{ .{ .regs = 52, .static = 43264, .bound = 256 }, .{ .regs = 53, .static = 43264, .bound = 256 }, .{ .regs = 53, .static = 43264, .bound = 256 }, .{ .regs = 68, .static = 43264, .bound = 256 }, .{ .regs = 68, .static = 43264, .bound = 256 }, } +RECORD nemo_audio tf_nemo_preds: .usage = .{ .{ .regs = 26, .static = 0, .bound = 256 }, .{ .regs = 26, .static = 0, .bound = 256 }, .{ .regs = 26, .static = 0, .bound = 256 }, .{ .regs = 27, .static = 0, .bound = 256 }, .{ .regs = 29, .static = 0, .bound = 256 }, } +RECORD qmm_prefill many bit-exact BF16 launch fusion: .usage = .{ .{ .regs = 171, .static = 0, .bound = 256 }, .{ .regs = 171, .static = 0, .bound = 256 }, .{ .regs = 171, .static = 0, .bound = 256 }, .{ .regs = 128, .static = 1024, .bound = 256 }, .{ .regs = 130, .static = 0, .bound = 256 }, } +RECORD qmmf BF16 fp32 out 16-row tile, fused slices: .usage = .{ .{ .regs = 78, .static = 0, .bound = 128 }, .{ .regs = 78, .static = 0, .bound = 128 }, .{ .regs = 78, .static = 0, .bound = 128 }, .{ .regs = 55, .static = 0, .bound = 128 }, .{ .regs = 55, .static = 0, .bound = 128 }, } +RECORD qwen35 tf_q35_gdn_slots_1: .usage = .{ .{ .regs = 80, .static = 4096, .bound = 128 }, .{ .regs = 80, .static = 4096, .bound = 128 }, .{ .regs = 80, .static = 4096, .bound = 128 }, .{ .regs = 72, .static = 4096, .bound = 128 }, .{ .regs = 72, .static = 4096, .bound = 128 }, } +RECORD qwen35 tf_q35_gdn_slots_2: .usage = .{ .{ .regs = 80, .static = 8192, .bound = 128 }, .{ .regs = 80, .static = 8192, .bound = 128 }, .{ .regs = 80, .static = 8192, .bound = 128 }, .{ .regs = 72, .static = 8192, .bound = 128 }, .{ .regs = 72, .static = 8192, .bound = 128 }, } +RECORD qwen35 tf_q35_gdn_slots_4: .usage = .{ .{ .regs = 80, .static = 16384, .bound = 128 }, .{ .regs = 90, .static = 16384, .bound = 128 }, .{ .regs = 90, .static = 16384, .bound = 128 }, .{ .regs = 84, .static = 16384, .bound = 128 }, .{ .regs = 84, .static = 16384, .bound = 128 }, } +STALE drama3 d3_cfg_mix +STALE drama3 d3_router_compact +STALE exl3_experts tf_exl3_prompt_down +STALE exl3_experts tf_exl3_prompt_down_k6 +STALE exl3_experts tf_exl3_prompt_gu +STALE exl3_experts tf_exl3_prompt_gu_k6 +STALE flashnext_hcn fn_hcn_down2 +STALE flashnext_hcn fn_hcn_down3 +STALE flashnext_hcn fn_hcn_up3 +STALE flashnext_mtp fn_row_topk +STALE glm_glue tf_glm_dsel_merge +STALE muse_dflash2 dfl_topk +STALE muse_dflash2 dfl_walk +STALE muse_glue muse_argmax +STALE muse_glue muse_expert_sum +STALE muse_glue muse_rms +STALE muse_glue muse_softcap +STALE muse_linear muse_linear2_k2_w4 +STALE muse_linear muse_linear2_k2_w8 +STALE muse_linear muse_linear2_k3_w8 +STALE muse_linear muse_linear2_k4_w4 +STALE muse_linear muse_linear2_k4_w8 +STALE muse_linear muse_linear2_k5_w4 +STALE muse_linear muse_linear2_k5_w8 +STALE muse_linear muse_linear2_k6_w4 +STALE muse_linear muse_linear2_k6_w8 +STALE muse_linear muse_linear2_k8_w4 +STALE muse_linear muse_linear_multi_k2 +STALE muse_linear muse_linear_multi_k3 +STALE muse_linear muse_linear_multi_k4 +STALE muse_linear muse_linear_multi_k5 +STALE muse_linear muse_linear_multi_k6 +STALE muse_linear muse_linear_multi_k8 +STALE muse_linear muse_rot_multi +STALE nemo_audio tf_nemo_attn64 +STALE nemo_audio tf_nemo_preds +STALE qmm_prefill many bit-exact BF16 launch fusion +STALE qmmf BF16 fp32 out 16-row tile, fused slices +STALE qwen35 tf_q35_gdn_slots_1 +STALE qwen35 tf_q35_gdn_slots_2 +STALE qwen35 tf_q35_gdn_slots_4 diff --git a/docs/kernel-contract/limits-top-e6855ec197a2.txt b/docs/kernel-contract/limits-top-e6855ec197a2.txt new file mode 100644 index 00000000000..836f69cd1ff --- /dev/null +++ b/docs/kernel-contract/limits-top-e6855ec197a2.txt @@ -0,0 +1,63 @@ +started top-e6855ec197a2 +RED limits sm_121 control: heavy at 1,024 threads: 166 registers, 0 static shared bytes, bound 0 (record current): control: heavy at 1,024 threads on sm_121: 166 registers x 1024 threads need 172032, a block has 65536 +RECORD control: heavy at 1,024 threads: .usage = .{ .{ .regs = 168, .static = 0, .bound = 0 }, .{ .regs = 166, .static = 0, .bound = 0 }, .{ .regs = 166, .static = 0, .bound = 0 }, .{ .regs = 166, .static = 0, .bound = 0 }, .{ .regs = 166, .static = 0, .bound = 0 }, } +PASS kernel-contract-limits: every audited launch fits sm_80, sm_86, sm_89, sm_120 and sm_121, every control red +kernel-contract-limits exit 0 +INFO limits fatbins: images built by nvcc 13.0, checked against nvcc 13.0's records +RED limits sm_80 control: past its bounds: 10 registers, 0 static shared bytes, bound 256 (record current): control: past its bounds on sm_80: launched at 512 threads past its __launch_bounds__ 256 +RED limits sm_86 control: past its bounds: 10 registers, 0 static shared bytes, bound 256 (record current): control: past its bounds on sm_86: launched at 512 threads past its __launch_bounds__ 256 +RED limits sm_89 control: past its bounds: 10 registers, 0 static shared bytes, bound 256 (record current): control: past its bounds on sm_89: launched at 512 threads past its __launch_bounds__ 256 +RED limits sm_120 control: past its bounds: 10 registers, 0 static shared bytes, bound 256 (record current): control: past its bounds on sm_120: launched at 512 threads past its __launch_bounds__ 256 +RED limits sm_121 control: past its bounds: 10 registers, 0 static shared bytes, bound 256 (record current): control: past its bounds on sm_121: launched at 512 threads past its __launch_bounds__ 256 +RED limits sm_80 control: heavy at 1,024 threads: 168 registers, 0 static shared bytes, bound 0 (record current): control: heavy at 1,024 threads on sm_80: 168 registers x 1024 threads need 172032, a block has 65536 +RED limits sm_86 control: heavy at 1,024 threads: 166 registers, 0 static shared bytes, bound 0 (record current): control: heavy at 1,024 threads on sm_86: 166 registers x 1024 threads need 172032, a block has 65536 +RED limits sm_89 control: heavy at 1,024 threads: 166 registers, 0 static shared bytes, bound 0 (record current): control: heavy at 1,024 threads on sm_89: 166 registers x 1024 threads need 172032, a block has 65536 +RED limits sm_120 control: heavy at 1,024 threads: 166 registers, 0 static shared bytes, bound 0 (record current): control: heavy at 1,024 threads on sm_120: 166 registers x 1024 threads need 172032, a block has 65536 +RED limits sm_121 control: heavy at 1,024 threads: 166 registers, 0 static shared bytes, bound 0 (record current): control: heavy at 1,024 threads on sm_121: 166 registers x 1024 threads need 172032, a block has 65536 +PASS limits sm_80 router tf_nemo_router_tiles: 181 registers, 0 static shared bytes, bound 256 (record current) +PASS limits sm_86 router tf_nemo_router_tiles: 184 registers, 0 static shared bytes, bound 256 (record current) +PASS limits sm_89 router tf_nemo_router_tiles: 184 registers, 0 static shared bytes, bound 256 (record current) +PASS limits sm_120 router tf_nemo_router_tiles: 177 registers, 0 static shared bytes, bound 256 (record current) +PASS limits sm_121 router tf_nemo_router_tiles: 177 registers, 0 static shared bytes, bound 256 (record current) +PTXAS _ZN7tf_qmmf11qmmf_kernelILi4ELi16ELi64ELi1ELi4ELi4ELb1ELb0ELb1EEEvPK13__nv_bfloat16PKhS5_fPvPfiiiiiii: sm_121=55r/0s sm_120=55r/0s sm_80=78r/0s sm_89=78r/0s sm_86=78r/0s +PTXAS d3_cfg_mix: sm_121=12r/0s sm_89=10r/0s sm_120=12r/0s sm_86=10r/0s sm_80=10r/0s +PTXAS d3_router_compact: sm_121=26r/592s sm_89=19r/592s sm_120=26r/592s sm_86=19r/592s sm_80=19r/592s +PTXAS dfl_topk: sm_121=48r/3072s sm_86=44r/3072s sm_120=48r/3072s sm_89=44r/3072s sm_80=44r/3072s +PTXAS dfl_walk: sm_121=38r/196s sm_86=40r/196s sm_120=38r/196s sm_89=40r/196s sm_80=32r/196s +PTXAS fn_hcn_down2: sm_121=161r/0s sm_80=162r/0s sm_120=161r/0s sm_86=162r/0s sm_89=162r/0s +PTXAS fn_hcn_down3: sm_121=190r/0s sm_80=191r/0s sm_120=190r/0s sm_86=191r/0s sm_89=191r/0s +PTXAS fn_hcn_up3: sm_121=128r/0s sm_80=126r/0s sm_120=128r/0s sm_86=126r/0s sm_89=126r/0s +PTXAS fn_row_topk: sm_121=34r/9228s sm_89=59r/9228s sm_120=34r/9228s sm_80=32r/9228s sm_86=59r/9228s +PTXAS muse_argmax: sm_121=40r/2048s sm_120=40r/2048s sm_86=37r/2048s sm_80=31r/2048s sm_89=37r/2048s +PTXAS muse_expert_sum: sm_121=28r/132s sm_120=28r/132s sm_86=28r/132s sm_80=28r/132s sm_89=28r/132s +PTXAS muse_linear2_k2_w4: sm_121=245r/16s sm_120=245r/16s sm_80=248r/16s sm_89=248r/16s sm_86=248r/16s +PTXAS muse_linear2_k2_w8: sm_121=251r/16s sm_120=251r/16s sm_80=225r/16s sm_89=224r/16s sm_86=224r/16s +PTXAS muse_linear2_k3_w8: sm_121=252r/16s sm_120=252r/16s sm_80=234r/16s sm_89=234r/16s sm_86=234r/16s +PTXAS muse_linear2_k4_w4: sm_121=245r/16s sm_120=245r/16s sm_80=248r/16s sm_89=248r/16s sm_86=248r/16s +PTXAS muse_linear2_k4_w8: sm_121=251r/16s sm_120=251r/16s sm_80=225r/16s sm_89=224r/16s sm_86=224r/16s +PTXAS muse_linear2_k5_w4: sm_121=253r/16s sm_120=253r/16s sm_80=229r/16s sm_89=229r/16s sm_86=229r/16s +PTXAS muse_linear2_k5_w8: sm_121=255r/16s sm_120=255r/16s sm_80=238r/16s sm_89=238r/16s sm_86=238r/16s +PTXAS muse_linear2_k6_w4: sm_121=255r/16s sm_120=255r/16s sm_80=229r/16s sm_89=229r/16s sm_86=229r/16s +PTXAS muse_linear2_k6_w8: sm_121=255r/16s sm_120=255r/16s sm_80=235r/16s sm_89=235r/16s sm_86=235r/16s +PTXAS muse_linear2_k8_w4: sm_121=245r/16s sm_120=245r/16s sm_80=236r/16s sm_89=236r/16s sm_86=236r/16s +PTXAS muse_linear_multi_k2: sm_121=128r/16s sm_120=128r/16s sm_80=166r/16s sm_89=167r/16s sm_86=167r/16s +PTXAS muse_linear_multi_k3: sm_121=153r/16s sm_120=153r/16s sm_80=164r/16s sm_89=165r/16s sm_86=165r/16s +PTXAS muse_linear_multi_k4: sm_121=128r/16s sm_120=128r/16s sm_80=166r/16s sm_89=167r/16s sm_86=167r/16s +PTXAS muse_linear_multi_k5: sm_121=154r/16s sm_120=154r/16s sm_80=167r/16s sm_89=167r/16s sm_86=167r/16s +PTXAS muse_linear_multi_k6: sm_121=154r/16s sm_120=154r/16s sm_80=164r/16s sm_89=165r/16s sm_86=165r/16s +PTXAS muse_linear_multi_k8: sm_121=141r/16s sm_120=141r/16s sm_80=167r/16s sm_89=167r/16s sm_86=167r/16s +PTXAS muse_rms: sm_121=19r/132s sm_120=19r/132s sm_86=19r/132s sm_80=19r/132s sm_89=19r/132s +PTXAS muse_rot_multi: sm_121=24r/0s sm_120=24r/0s sm_80=24r/0s sm_89=24r/0s sm_86=24r/0s +PTXAS muse_softcap: sm_121=30r/0s sm_120=30r/0s sm_86=28r/0s sm_80=28r/0s sm_89=28r/0s +PTXAS tf_exl3_prompt_down: sm_121=126r/43264s sm_80=126r/43264s sm_86=126r/43264s sm_89=126r/43264s sm_120=126r/43264s +PTXAS tf_exl3_prompt_down_k6: sm_121=127r/40192s sm_80=125r/40192s sm_86=125r/40192s sm_89=125r/40192s sm_120=127r/40192s +PTXAS tf_exl3_prompt_gu: sm_121=124r/43264s sm_80=126r/43264s sm_86=128r/43264s sm_89=128r/43264s sm_120=124r/43264s +PTXAS tf_exl3_prompt_gu_k6: sm_121=127r/40192s sm_80=127r/40192s sm_86=126r/40192s sm_89=126r/40192s sm_120=127r/40192s +PTXAS tf_glm_dsel_merge: sm_120=64r/34064s sm_121=64r/34064s sm_89=64r/34064s sm_80=57r/34064s sm_86=64r/34064s +PTXAS tf_nemo_attn64: sm_121=68r/43264s sm_80=52r/43264s sm_86=53r/43264s sm_89=53r/43264s sm_120=68r/43264s +PTXAS tf_nemo_preds: sm_121=29r/0s sm_80=26r/0s sm_86=26r/0s sm_89=26r/0s sm_120=27r/0s +PTXAS tf_nemo_router_tiles: sm_121=177r/0s sm_80=181r/0s sm_86=184r/0s sm_89=184r/0s sm_120=177r/0s +PTXAS tf_q35_gdn_slots_1: sm_121=72r/4096s sm_80=80r/4096s sm_120=72r/4096s sm_89=80r/4096s sm_86=80r/4096s +PTXAS tf_q35_gdn_slots_2: sm_121=72r/8192s sm_80=80r/8192s sm_120=72r/8192s sm_89=80r/8192s sm_86=80r/8192s +PTXAS tf_q35_gdn_slots_4: sm_121=84r/16384s sm_80=80r/16384s sm_120=84r/16384s sm_89=90r/16384s sm_86=90r/16384s +PTXAS tf_qmm_prefill_many: sm_121=130r/0s sm_120=130r/0s sm_89=173r/0s sm_86=173r/0s sm_80=173r/0s diff --git a/docs/recipes/minimax-h3-cuda/cuda-build.sh b/docs/recipes/minimax-h3-cuda/cuda-build.sh index 0f6296f6e0e..8e22f6f62d4 100755 --- a/docs/recipes/minimax-h3-cuda/cuda-build.sh +++ b/docs/recipes/minimax-h3-cuda/cuda-build.sh @@ -10,7 +10,8 @@ # H3_BUILD=sm121 stops once the three picture tools are in tensorfold-cuda-SHA: no release SMs, tf-cuda-test or # audit, which put bench-script.sh past the Desk's 20 minutes. # H3_BUILD=limits builds the five SMs' images and kernel-contract-limits alone, no CLI or tf-cuda-test: the audit -# as its own job, never inside a timed bench. +# as its own job, never inside a timed bench. LIMITS_IMAGES names the images it audits (unset: H3's and the +# controls; empty: every image). # H3_BUILD=contract builds tf-cuda-test for sm_121 alone and runs gates 1-4 on the kernels H3_CONTRACT's # words name (`kernel-contract WORD...`, "h3 int8" unset): contract-job.sh asks for the decoder suite. # Later TOP jobs read either folder from the pilot folder once the Desk returns it there: @@ -45,7 +46,8 @@ if [ "${H3_BUILD:-}" = limits ]; then --prefix /work/release cp -r /work/release/bin/tf-cuda-limits /work/release/fatbin "$cuda" status=0 - "$cuda/tf-cuda-limits" "$cuda/fatbin" h3 h3_image_decoder h3_image_prompt h3_image_modulation contract_controls \ + # shellcheck disable=SC2086 # the image names are words + "$cuda/tf-cuda-limits" "$cuda/fatbin" ${LIMITS_IMAGES-h3 h3_image_decoder h3_image_prompt h3_image_modulation contract_controls} \ >"$out/limits.log" 2>&1 || status=$? tail -n 3 "$out/limits.log" echo "kernel-contract-limits exit $status" diff --git a/zig/src/core/contract/exl3_prompt_pending.zig b/zig/src/core/contract/exl3_prompt_pending.zig index 7a4e979cbfa..83326aca55e 100644 --- a/zig/src/core/contract/exl3_prompt_pending.zig +++ b/zig/src/core/contract/exl3_prompt_pending.zig @@ -14,8 +14,8 @@ pub fn owns(name: []const u8) bool { return false; } -test "EXL3 prompt: unmeasured compiler usage stays pending" { - for (records) |r| for ([_]?limits.Nvcc{ null, .{ .major = 13, .minor = 0 }, .{ .major = 13, .minor = 1 }, .{ .major = 13, .minor = 2 }, .{ .major = 13, .minor = 3 } }) |version| { +test "EXL3 prompt: usage stays pending beyond nvcc 13.0's receipt" { + for (records) |r| for ([_]?limits.Nvcc{ null, .{ .major = 13, .minor = 1 }, .{ .major = 13, .minor = 2 }, .{ .major = 13, .minor = 3 } }) |version| { try std.testing.expectEqualDeep(registry.none, registry.usageFor(r, version)); }; try std.testing.expectEqual(@as(usize, 20), try registry.checkCuda(std.testing.allocator, &records, true)); diff --git a/zig/src/core/contract/measurements/main_130.zig b/zig/src/core/contract/measurements/main_130.zig index f8ef3d37585..496d7a98e7f 100644 --- a/zig/src/core/contract/measurements/main_130.zig +++ b/zig/src/core/contract/measurements/main_130.zig @@ -60,6 +60,47 @@ pub const records = [_]r.Override{ .{ .name = "qwen4_projection tf_qwen4_projection_bad_sums", .usage = .{ .{ .regs = 39, .static = 0, .bound = 128 }, .{ .regs = 39, .static = 0, .bound = 128 }, .{ .regs = 39, .static = 0, .bound = 128 }, .{ .regs = 39, .static = 0, .bound = 128 }, .{ .regs = 40, .static = 0, .bound = 128 } } }, .{ .name = "qwen4_projection tf_qwen4_projection_bad_tail", .usage = .{ .{ .regs = 40, .static = 0, .bound = 128 }, .{ .regs = 40, .static = 0, .bound = 128 }, .{ .regs = 40, .static = 0, .bound = 128 }, .{ .regs = 38, .static = 0, .bound = 128 }, .{ .regs = 38, .static = 0, .bound = 128 } } }, .{ .name = "tf_q35_attn_rows8_mt2", .usage = .{ .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 243, .static = 36992, .bound = 128 }, .{ .regs = 243, .static = 36992, .bound = 128 } } }, + .{ .name = "drama3 d3_cfg_mix", .usage = .{ .{ .regs = 10, .static = 0, .bound = 0 }, .{ .regs = 10, .static = 0, .bound = 0 }, .{ .regs = 10, .static = 0, .bound = 0 }, .{ .regs = 12, .static = 0, .bound = 0 }, .{ .regs = 12, .static = 0, .bound = 0 } } }, + .{ .name = "drama3 d3_router_compact", .usage = .{ .{ .regs = 19, .static = 592, .bound = 0 }, .{ .regs = 19, .static = 592, .bound = 0 }, .{ .regs = 19, .static = 592, .bound = 0 }, .{ .regs = 26, .static = 592, .bound = 0 }, .{ .regs = 26, .static = 592, .bound = 0 } } }, + .{ .name = "exl3_experts tf_exl3_prompt_down", .usage = .{ .{ .regs = 126, .static = 43264, .bound = 256 }, .{ .regs = 126, .static = 43264, .bound = 256 }, .{ .regs = 126, .static = 43264, .bound = 256 }, .{ .regs = 126, .static = 43264, .bound = 256 }, .{ .regs = 126, .static = 43264, .bound = 256 } } }, + .{ .name = "exl3_experts tf_exl3_prompt_down_k6", .usage = .{ .{ .regs = 125, .static = 40192, .bound = 256 }, .{ .regs = 125, .static = 40192, .bound = 256 }, .{ .regs = 125, .static = 40192, .bound = 256 }, .{ .regs = 127, .static = 40192, .bound = 256 }, .{ .regs = 127, .static = 40192, .bound = 256 } } }, + .{ .name = "exl3_experts tf_exl3_prompt_gu", .usage = .{ .{ .regs = 126, .static = 43264, .bound = 256 }, .{ .regs = 128, .static = 43264, .bound = 256 }, .{ .regs = 128, .static = 43264, .bound = 256 }, .{ .regs = 124, .static = 43264, .bound = 256 }, .{ .regs = 124, .static = 43264, .bound = 256 } } }, + .{ .name = "exl3_experts tf_exl3_prompt_gu_k6", .usage = .{ .{ .regs = 127, .static = 40192, .bound = 256 }, .{ .regs = 126, .static = 40192, .bound = 256 }, .{ .regs = 126, .static = 40192, .bound = 256 }, .{ .regs = 127, .static = 40192, .bound = 256 }, .{ .regs = 127, .static = 40192, .bound = 256 } } }, + .{ .name = "flashnext_hcn fn_hcn_down2", .usage = .{ .{ .regs = 162, .static = 0, .bound = 224 }, .{ .regs = 162, .static = 0, .bound = 224 }, .{ .regs = 162, .static = 0, .bound = 224 }, .{ .regs = 161, .static = 0, .bound = 224 }, .{ .regs = 161, .static = 0, .bound = 224 } } }, + .{ .name = "flashnext_hcn fn_hcn_down3", .usage = .{ .{ .regs = 191, .static = 0, .bound = 224 }, .{ .regs = 191, .static = 0, .bound = 224 }, .{ .regs = 191, .static = 0, .bound = 224 }, .{ .regs = 190, .static = 0, .bound = 224 }, .{ .regs = 190, .static = 0, .bound = 224 } } }, + .{ .name = "flashnext_hcn fn_hcn_up3", .usage = .{ .{ .regs = 126, .static = 0, .bound = 256 }, .{ .regs = 126, .static = 0, .bound = 256 }, .{ .regs = 126, .static = 0, .bound = 256 }, .{ .regs = 128, .static = 0, .bound = 256 }, .{ .regs = 128, .static = 0, .bound = 256 } } }, + .{ .name = "flashnext_mtp fn_row_topk", .usage = .{ .{ .regs = 32, .static = 9228, .bound = 1024 }, .{ .regs = 59, .static = 9228, .bound = 1024 }, .{ .regs = 59, .static = 9228, .bound = 1024 }, .{ .regs = 34, .static = 9228, .bound = 1024 }, .{ .regs = 34, .static = 9228, .bound = 1024 } } }, + .{ .name = "glm_glue tf_glm_dsel_merge", .usage = .{ .{ .regs = 57, .static = 34064, .bound = 1024 }, .{ .regs = 64, .static = 34064, .bound = 1024 }, .{ .regs = 64, .static = 34064, .bound = 1024 }, .{ .regs = 64, .static = 34064, .bound = 1024 }, .{ .regs = 64, .static = 34064, .bound = 1024 } } }, + .{ .name = "muse_dflash2 dfl_topk", .usage = .{ .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 48, .static = 3072, .bound = 256 } } }, + .{ .name = "muse_dflash2 dfl_walk", .usage = .{ .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 38, .static = 196, .bound = 512 } } }, + .{ .name = "muse_glue muse_argmax", .usage = .{ .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 40, .static = 2048, .bound = 0 } } }, + .{ .name = "muse_glue muse_expert_sum", .usage = .{ .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 28, .static = 132, .bound = 0 } } }, + .{ .name = "muse_glue muse_rms", .usage = .{ .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 19, .static = 132, .bound = 0 } } }, + .{ .name = "muse_glue muse_softcap", .usage = .{ .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 30, .static = 0, .bound = 0 } } }, + .{ .name = "muse_linear muse_linear2_k2_w4", .usage = .{ .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 245, .static = 16, .bound = 128 } } }, + .{ .name = "muse_linear muse_linear2_k2_w8", .usage = .{ .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 251, .static = 16, .bound = 256 } } }, + .{ .name = "muse_linear muse_linear2_k3_w8", .usage = .{ .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 252, .static = 16, .bound = 256 } } }, + .{ .name = "muse_linear muse_linear2_k4_w4", .usage = .{ .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 245, .static = 16, .bound = 128 } } }, + .{ .name = "muse_linear muse_linear2_k4_w8", .usage = .{ .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 251, .static = 16, .bound = 256 } } }, + .{ .name = "muse_linear muse_linear2_k5_w4", .usage = .{ .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 253, .static = 16, .bound = 128 } } }, + .{ .name = "muse_linear muse_linear2_k5_w8", .usage = .{ .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 255, .static = 16, .bound = 256 } } }, + .{ .name = "muse_linear muse_linear2_k6_w4", .usage = .{ .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 255, .static = 16, .bound = 128 } } }, + .{ .name = "muse_linear muse_linear2_k6_w8", .usage = .{ .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 255, .static = 16, .bound = 256 } } }, + .{ .name = "muse_linear muse_linear2_k8_w4", .usage = .{ .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 245, .static = 16, .bound = 128 } } }, + .{ .name = "muse_linear muse_linear_multi_k2", .usage = .{ .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 128, .static = 16, .bound = 128 } } }, + .{ .name = "muse_linear muse_linear_multi_k3", .usage = .{ .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 153, .static = 16, .bound = 128 } } }, + .{ .name = "muse_linear muse_linear_multi_k4", .usage = .{ .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 128, .static = 16, .bound = 128 } } }, + .{ .name = "muse_linear muse_linear_multi_k5", .usage = .{ .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 154, .static = 16, .bound = 128 } } }, + .{ .name = "muse_linear muse_linear_multi_k6", .usage = .{ .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 154, .static = 16, .bound = 128 } } }, + .{ .name = "muse_linear muse_linear_multi_k8", .usage = .{ .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 141, .static = 16, .bound = 128 } } }, + .{ .name = "muse_linear muse_rot_multi", .usage = .{ .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 0, .static = 0, .bound = 0 }, .{ .regs = 24, .static = 0, .bound = 128 } } }, + .{ .name = "nemo_audio tf_nemo_attn64", .usage = .{ .{ .regs = 52, .static = 43264, .bound = 256 }, .{ .regs = 53, .static = 43264, .bound = 256 }, .{ .regs = 53, .static = 43264, .bound = 256 }, .{ .regs = 68, .static = 43264, .bound = 256 }, .{ .regs = 68, .static = 43264, .bound = 256 } } }, + .{ .name = "nemo_audio tf_nemo_preds", .usage = .{ .{ .regs = 26, .static = 0, .bound = 256 }, .{ .regs = 26, .static = 0, .bound = 256 }, .{ .regs = 26, .static = 0, .bound = 256 }, .{ .regs = 27, .static = 0, .bound = 256 }, .{ .regs = 29, .static = 0, .bound = 256 } } }, + .{ .name = "qmm_prefill many bit-exact BF16 launch fusion", .usage = .{ .{ .regs = 173, .static = 0, .bound = 256 }, .{ .regs = 173, .static = 0, .bound = 256 }, .{ .regs = 173, .static = 0, .bound = 256 }, .{ .regs = 130, .static = 0, .bound = 256 }, .{ .regs = 130, .static = 0, .bound = 256 } } }, + .{ .name = "qmmf BF16 fp32 out 16-row tile, fused slices", .usage = .{ .{ .regs = 78, .static = 0, .bound = 128 }, .{ .regs = 78, .static = 0, .bound = 128 }, .{ .regs = 78, .static = 0, .bound = 128 }, .{ .regs = 55, .static = 0, .bound = 128 }, .{ .regs = 55, .static = 0, .bound = 128 } } }, + .{ .name = "qwen35 tf_q35_gdn_slots_1", .usage = .{ .{ .regs = 80, .static = 4096, .bound = 128 }, .{ .regs = 80, .static = 4096, .bound = 128 }, .{ .regs = 80, .static = 4096, .bound = 128 }, .{ .regs = 72, .static = 4096, .bound = 128 }, .{ .regs = 72, .static = 4096, .bound = 128 } } }, + .{ .name = "qwen35 tf_q35_gdn_slots_2", .usage = .{ .{ .regs = 80, .static = 8192, .bound = 128 }, .{ .regs = 80, .static = 8192, .bound = 128 }, .{ .regs = 80, .static = 8192, .bound = 128 }, .{ .regs = 72, .static = 8192, .bound = 128 }, .{ .regs = 72, .static = 8192, .bound = 128 } } }, + .{ .name = "qwen35 tf_q35_gdn_slots_4", .usage = .{ .{ .regs = 80, .static = 16384, .bound = 128 }, .{ .regs = 90, .static = 16384, .bound = 128 }, .{ .regs = 90, .static = 16384, .bound = 128 }, .{ .regs = 84, .static = 16384, .bound = 128 }, .{ .regs = 84, .static = 16384, .bound = 128 } } }, }; pub fn lookup(name: []const u8) ?[5]@import("../limits.zig").Usage { diff --git a/zig/src/core/contract/pending_132_test.zig b/zig/src/core/contract/pending_132_test.zig index e9d39e09940..3630122b576 100644 --- a/zig/src/core/contract/pending_132_test.zig +++ b/zig/src/core/contract/pending_132_test.zig @@ -78,7 +78,7 @@ test "compiler receipts: 13.0 additions cannot replace a different later measure try std.testing.expectEqual(@as(u32, 40), later[4].regs); var absent = row; absent.launch.name = "a launch with only a 13.0 receipt"; - try std.testing.expectEqualDeep(old, registry.usageFor(absent, .{ .major = 13, .minor = 1 })); + try std.testing.expectEqualDeep(row.usage, registry.usageFor(absent, .{ .major = 13, .minor = 1 })); for ([_]limits.Nvcc{ .{ .major = 13, .minor = 2 }, .{ .major = 13, .minor = 3 }, .{ .major = 14, .minor = 0 } }) |version| try std.testing.expectEqualDeep(registry.none, registry.usageFor(absent, version)); } diff --git a/zig/src/core/contract/registry.zig b/zig/src/core/contract/registry.zig index bfd934a42f2..c790d2b3a8f 100644 --- a/zig/src/core/contract/registry.zig +++ b/zig/src/core/contract/registry.zig @@ -229,8 +229,8 @@ pub fn setFor(release: ?limits.Nvcc) limits.Nvcc { } /// A record's usage on every SM for images built by `release` (null: an image that names no compiler, cuda's). pub fn usageFor(r: CudaRecord, release: ?limits.Nvcc) [limits.sms.len]U { - if (@import("exl3_prompt_pending.zig").owns(r.launch.name)) return none; if (release) |v| if (v.major == 13 and v.minor == 0) if (@import("measurements/main_130.zig").lookup(r.launch.name)) |u| return u; + if (@import("exl3_prompt_pending.zig").owns(r.launch.name)) return none; var u = r.usage; const rel = release orelse return u; if (r.later_pending and !newer(.{ .major = 13, .minor = 2 }, rel)) u = none;