Repository navigation
Conversation
|
@ashhart — ready for review. This remains the focused main-based FP8 cache fix for #3062. The integration receipt links the concrete compatibility resolution for the four cumulative latent proposals and the clean-main control proving the placement conflict is inherited. The resolution passed108 host tests and both compile checks, with no additional kernel/GPU/model changes. The main-based PR and compatibility packet keep their scopes separate. Please review the focused fix and choose the integration order for the existing trains. Workflow approval is also needed for the repository's automated checks. Remaining release gates are stated explicitly in the description; no agreement or broad qualification is assumed. |
There was a problem hiding this comment.
🟡 Changes recommended
FP8 host-KV rejection occurs after buffer allocation, risking leaks or allocation failures, and the new paged-FP8 exports lack required numerical contract checks and launch-resource registrations.
2 open issues
What changed in this PR
Adds explicit paged FP8 KV caching to native GLM CUDA for #3062. Automatic FP8 selection remains contiguous, and FP8 with host-KV gathering remains unsupported.
Changes:
- Adds format-aware pages containing E4M3 codes, FP32 row scales and BF16 pooled keys.
- Connects paged writes, dense/sparse attention and snapshots to the format-aware layout.
- Adds host regressions, a synthetic CUDA reference and documentation separating integration evidence from pending device/model qualification.
| File | Description |
|---|---|
zig/tests/cuda/glm_ref_fp8.zig |
Invokes the new paged-FP8 reference. |
zig/tests/cuda/glm_ref_fp8_pages.zig |
Compares shuffled-page writes and attention with contiguous FP8. |
zig/src/families/glm/cuda_state.zig |
Adds format-aware page sizes, constructors and cache pointers. |
zig/src/families/glm/cuda_start.zig |
Allows explicit FP8 paging while preserving automatic selection. |
zig/src/families/glm/cuda_start_test.zig |
Updates paging and startup-failure regressions. |
zig/src/families/glm/cuda_sparse.zig |
Keeps FP8 sparse token lists in logical-position units. |
zig/src/families/glm/cuda_snapshot_layout.zig |
Maps snapshot codes and scales through page-aware spans. |
zig/src/families/glm/cuda_pages.zig |
Uses format-aware page allocation and rejects FP8 host-KV layouts. |
zig/src/families/glm/cuda_pages_test.zig |
Checks FP8 page-byte accounting. |
zig/src/families/glm/cuda_native.zig |
Updates admission test expectations for explicit FP8 paging. |
zig/src/families/glm/cuda_latent.zig |
Selects paged-FP8 kernels and validates sparse token units. |
zig/src/families/glm/cuda_kv8_test.zig |
Adds launch, addressing, symbol-loading and snapshot regressions. |
zig/src/families/glm/cuda_glue.zig |
Loads new exports and configures attention shared memory. |
zig/src/families/glm/cuda_dsa_block.zig |
Propagates logical-token addressing for FP8 caches. |
zig/kernels/cuda/glm_glue_latent.cuh |
Adds the paged FP8 cache writer. |
zig/kernels/cuda/glm_glue_attn.cuh |
Adds paged-FP8 attention exports for both head widths. |
zig/kernels/cuda/common/mla.cuh |
Resolves FP8 codes and scales through page tables. |
docs/recipes/glm-fp8-pages.md |
Documents layout, checks and qualification limits. |
docs/recipes/glm-fp8-integration.md |
Records compatibility resolutions and bounded verification. |
docs/recipes/glm-5.3-flash-cuda.md |
Documents explicit paged-FP8 usage and restrictions. |
Review effort: Balanced
| chunks_16_fp8_paged: cuda.Function, | ||
| chunks_32_fp8_paged: cuda.Function, |
There was a problem hiding this comment.
72989df registers the paged FP8 writer plus dense/sparse 16- and 32-head readers as five numerical cases with five distinct planted controls. Sparse zero-count outputs retain an independently checked sentinel. Three launch records carry exact geometry. Compiler-derived resource usage and the CUDA SUMMARY remain pending on an authorized CUDA toolchain/device, represented explicitly by registry.none and later_pending. I am leaving this thread open until those receipts are attached.
There was a problem hiding this comment.
Current head 7eae437d7 registers the three paged-FP8 exports with nvcc 13.0.88 measurements. The five-SM compiled-fatbin audit exits 0 and all five paged-FP8 numerical controls are red as planted. The full unfiltered run completed 630/630 numerical gates and 415/415 controls, then exited 1 because 168 unrelated launches already present at the starting PR head have no compiled usage record. I posted the exact SUMMARY, hashes, and scope in #3064 (comment). I am leaving this thread unresolved while the aggregate process status remains nonzero.
|
Thanks @gilp456. Making explicit pages work with What I checked on
Before we run it, please:
On landing order (#3062): @wojo's latent-split stack (#2415, #2935, #2937, #2938) is further along in review and conflicts with this PR in CI is waiting for workflow approval on this head. Files stay at or under 600 lines.
|
|
Review fixes are published on
Focused verification passed 59/59 steps and 210/210 tests. The full no-GPU suite passed 681/681 steps with 8,596 passes, 221 platform skips and zero failures. Formatting and diff checks pass; lean remains 345/345 with zero new findings. Selected overlap inspection is complete and the PR is now a draft while CUDA resource measurements, the device Cluster activity remained zero: no SSH, deployment, service, Docker or model-process commands were issued. |
|
Maintainer action requested for current head Please approve these fork workflow runs: Both currently show Host/static follow-up is complete:
GB10/CUDA/model receipts require an isolated runner. The available three-node GB10 cluster currently has resident production TensorFold ranks on every GPU, so qualification remains off that cluster. Pending receipts cover the measured resources, full CUDA contract The PR remains draft while those receipts are pending. FP8's independent quality gate remains separate, pending, and opt-in. |
Current-head review updateThis report targets Identity and startup behavior
The required current-head GB10 served-token identity and performance matrix remains UNRUN: GB10 Measured resources and CUDA contract
Later compiler records remain explicitly pending. Host inventory fails closed for missing registration, geometry, zero registers, static bytes/bounds, and pending-state drift. The writer and dense/sparse 16-/32-head readers each have planted address controls; all five went red as planted. The current-head five-SM fatbin audit exited
The full unfiltered current-head CUDA run completed every numerical gate and control, then exited
The separate compiled-fatbin audit above covers all registered launches and passes, including all 15 new GLM tuples. I am leaving the resource review thread open because the full aggregate process status is nonzero. Environment and immutable evidence: official Documentation and host checks
Landing order and CIFresh conflict checks found conflicts with #2415, #2935, #2937 and #2938 in The PR remains draft. At this snapshot the published head has no workflow check objects yet. Reviewed old-head runs No GPU 43374144996 and Zig format 43374145131 are |

What this changes
Explicit GLM CUDA FP8 paging uses format-aware pages containing E4M3 codes, FP32 row scales and BF16 pooled keys. Review fixes move FP8 host-KV refusal before engine/gather construction and register the paged writer plus dense/sparse 16- and 32-head readers as numerical contract cases.
72989dfb9adds three fast-forward commits to the existing PR branch.atc overlap --json: selected inspection is complete. GLM on CUDA: the latent split's per-rank page book and owner (TF_GLM_KV_SPLIT, #1431 part 1; stacked on #1411) #2415 has 11 shared files and 9 conflicts; cuda: GLM, MiniMax and Nemotron placed from one launch, by flags or aliases (T1b of #2560) #2919 has 3 shared and 1 conflict; GLM on CUDA: owner-only latent rows and owner-computed attention (TF_GLM_KV_SPLIT, #1431 part 2; stacked on #2415) #2935 and GLM on CUDA: the prompt history fetch under the latent split (TF_GLM_KV_SPLIT, #1431 part 3; stacked on #2935) #2937 each have 12 shared and 9 conflicts; GLM on CUDA: kept states, carries and prompt twins under the latent split (TF_GLM_KV_SPLIT, #1431 part 4; stacked on #2937) #2938 has 15 shared and 10 conflicts. Maintainer coordination already establishes that the ready train lands first and the other rebases. This is selected coverage.Checks on this head
72989dfb9.zig build test-glm-startup-host test-glm-page-contract-host test-glm-pages-host test-glm-fp8-kv-host test-kernel-contract test-glm-tp3-host test-glm-admission-host test-glm-snapshots-host compile-glm-fp8-gate-host compile-glm-native-open --summary all: 59/59 steps, 210/210 tests passed.zig build test test-kernel-contract test-golden fuzz-cortheon --summary all: 681/681 steps; 8,596 passed, 221 skipped, zero failed.zig fmt --check build.zig zig,git diff --check, andtools/pr_check.py: pass with zero new lean findings; the checker retains one advisory for the intentionally incomplete Unreleased entry.72989dfb9; earlier-head CI does not qualify this revision.SUMMARY, current-head device/model exactness and served performance require an authorized CUDA/model window.Receipt
TF_KV_PAGES;autokeeps FP8 contiguous, expliciton/1/allenables pages, andoff/0disables pages. FP8 plus host KV refuses before construction.Kernel contract
tf_glm_lat_write_fp8_paged,tf_glm_chunks_16_fp8_pagedandtf_glm_chunks_32_fp8_paged; numerical coverage includes writer plus dense/sparse readers for both head widths.SUMMARYline and exit status: pending CUDA execution; no passing deviceSUMMARYis claimed.registry.noneandlater_pending.Checklist
72989dfb9and the remaining gates.SUMMARY.