Skip to content

build: admit Ampere (sm_80) via TENSORFOLD_MIN_CAPABILITY, keep NVFP4/cluster floors - #464

Closed
liumorrisclaw wants to merge 2 commits into
ashhart:mainfrom
liumorrisclaw:sm80-admission
Closed

liumorrisclaw wants to merge 2 commits into
ashhart:mainfrom
liumorrisclaw:sm80-admission

Conversation

@liumorrisclaw

Copy link
Copy Markdown
Contributor

What this changes

Adds an import-time env switch, TENSORFOLD_MIN_CAPABILITY=8.0, that lowers the CUDA capability floor (only down, never up) so the W4A16 and EXL3 paths run on Ampere. The NVFP4/cluster floor stays pinned, so a lowered floor cannot admit cluster kernels, and the FP8-only refusal hint names the switch.

Receipt

  • Environment: TensorFold v0.6.3 base + this patch, PyTorch 2.13.0+cu130, 4x NVIDIA CMP 170HX 64 GB (GA100, sm_80, PCIe Gen2 x4), checkpoint brandonmusic/GLM-5.3-Flash-tr3-4bpw
  • Exactness: drafted replies SHA256-identical to "draft": false in every benchmark run (13 acceptance runs across the patch series)
  • Decode speed: serial 46.7 tok/s -> 169.8 tok/s across the companion patches (shm all-gather + bf16 payload, sent separately); this patch alone is admission only
  • Prompt speed: 194 tok/s cold at 10.5K tokens (EXL3 path, unchanged by this patch)
  • Tests run: 8/8 target CUDA extensions compile for sm_80; 293+ kernel bit-exact tests pass (tensorfold_qmm_v5, tensorfold_exl3_linear_v3, tensorfold_glm_exl3_v1, tensorfold_exl3_experts_v1, tensorfold_glm_kda_v2, tensorfold_prefill_attention_v1, (4,4,2,2)/(8,4,4,1) expert tiles); 26 initially-failing cases re-ran green on a free GPU (37 passed / 1 skipped)
  • Not run: the full v0.6.6 suite on the rebased branch (patches were developed and verified on the v0.6.3 base; a rebase-verification window is scheduled)

Checklist

  • Every token still goes through the lane rounds; nothing needs drafts off
  • Drafted output equals "draft": false (SHA256, every run)
  • No precision traded for speed: this patch changes which GPUs are admitted, not any arithmetic
  • Prompt processing unchanged (admission only)
  • Platform: CUDA (sm_80 Ampere) run and measured; Metal not applicable
  • Comments and docstrings kept to one line

…/cluster floors

TENSORFOLD_MIN_CAPABILITY=8.0 lowers the capability floor at import time
(only down, never up) so the W4A16 and EXL3 paths run on Ampere; the
NVFP4/cluster floor stays pinned so a lowered floor cannot admit them.
The refusal hint for FP8-only GPUs names the switch.

Verified on 4x CMP 170HX (GA100, sm_80): all 8 target extensions compile,
293+ bit-exact kernel tests pass, GLM-5.3-Flash serves end to end.
The FP8 prefill kernels' inline PTX (cvt.e4m3x2.f16x2, e4m3 mma) has no
arch guard, which fails ptxas when the whole qmm_v5 extension compiles
for sm_80 even though the FP8 path is opt-in and never runs there. The
dead branches become trap; bits on sm_89+ are unchanged.
@liumorrisclaw

Copy link
Copy Markdown
Contributor Author

Rebase-verification window done on the v0.6.6 tree (this branch merged with the companion branches): 4-rank serve end to end, four heavy extensions compile clean for sm_80 (the e4m3 guard also fixes a ptxas hang-level compile on sm_80 for qmm_prefill8.cu), and the same MiaAI-protocol benchmark reproduces the receipt numbers within noise — structured 124.6 / coding 97.7 / prose 75.0 tok/s (vs 124.9/98.1/75.1 on the dev base), drafted vs serial still SHA256-identical, accept ratio identical (0.7576). Receipt JSON archived.

@ashhart

ashhart commented Oct 7, 2026

Copy link
Copy Markdown
Owner

Thank you! This is in main under your name, as 23f4e7f and c87248d. Putting Ampere W4A16 and EXL3 behind TENSORFOLD_MIN_CAPABILITY=8.0 while the NVFP4 and cluster floor stays pinned opens the door without touching anyone on Ada or newer.

One fix of ours follows it in 6e8f29e. The Ampere hint read why before it was assigned, so a GPU below the floor got an UnboundLocalError instead of the refusal message. The existing test_an_older_gpu_is_refused_by_name catches it on any machine with torch, and it passes now.

The Python engine is frozen at 0.6.6, so this won't ship in a tagged Python release. It is in main's history with your name on it, and you're now one of the repo's contributors. Closing this as landed.

@ashhart ashhart closed this Oct 7, 2026
@liumorrisclaw

Copy link
Copy Markdown
Contributor Author

Landed and verified — thank you for the clean relands and especially for 6e8f29e: the UnboundLocalError in my Ampere hint was a real bug (I had only exercised the below-floor path on a GPU that passes admission), and test_an_older_gpu_is_refused_by_name is exactly the right guard. Everything of yours reads as strict improvements.

ashhart pushed a commit that referenced this pull request Oct 16, 2026
…med at its refusal

Release fatbins build and check sm_80 alongside sm_86, sm_120 and sm_121, so
the A100 and its Ampere peers load the 4-bit path. A ModelOpt checkpoint at
the FP8/NVFP4 floor is refused by name now: the card, its sm and the cluster
reason, from one tested helper (#840, the native port of #464).
ashhart pushed a commit that referenced this pull request Oct 16, 2026
…med at its refusal

Release fatbins build and check sm_80 alongside sm_86, sm_120 and sm_121, so
the A100 and its Ampere peers load the 4-bit path. A ModelOpt checkpoint at
the FP8/NVFP4 floor is refused by name now: the card, its sm and the cluster
reason, from one tested helper (#840, the native port of #464).
BlivionIaG pushed a commit to BlivionIaG/TensorFold that referenced this pull request Oct 20, 2026
…med at its refusal

Release fatbins build and check sm_80 alongside sm_86, sm_120 and sm_121, so
the A100 and its Ampere peers load the 4-bit path. A ModelOpt checkpoint at
the FP8/NVFP4 floor is refused by name now: the card, its sm and the cluster
reason, from one tested helper (ashhart#840, the native port of ashhart#464).
BlivionIaG pushed a commit to BlivionIaG/TensorFold that referenced this pull request Oct 20, 2026
…med at its refusal

Release fatbins build and check sm_80 alongside sm_86, sm_120 and sm_121, so
the A100 and its Ampere peers load the 4-bit path. A ModelOpt checkpoint at
the FP8/NVFP4 floor is refused by name now: the card, its sm and the cluster
reason, from one tested helper (ashhart#840, the native port of ashhart#464).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants