Skip to content

feat(svdq): 1/N add CuTe NVFP4 workflow with native default - #1229

Merged
DefTruth merged 2 commits into
mainfrom
feat/svdq-cute-nvfp4
Nov 4, 2026
Merged

DefTruth merged 2 commits into
mainfrom
feat/svdq-cute-nvfp4

Conversation

@DefTruth

@DefTruth DefTruth commented Nov 4, 2026

Copy link
Copy Markdown
Member

Summary

  • add an independent CuTe SVDQ NVFP4 workflow: fused activation-quant + LoRA-down producer writes standard row-major E2M1 A, CUTLASS 128x4 SFA and BF16 D directly; the GEMM uses A/B/SFA/SFB TMA and fuses BF16 LoRA-up into the same FP32 accumulator.
  • remove the old producer/scratch/finalize adaptation path and lora_act_to_bf16; legacy checkpoint packs are converted once at load time while the serialized native state dict remains unchanged.
  • split svdq::native_kernels and svdq::cute_kernels, move native sources under natitve/, and remove redundant CuTe suffixes from files, kernels, hosts and pybind methods.
  • keep NVFP4 runtime_kernel=None resolving to native until the performance gates pass; runtime_kernel="cute" remains an explicit opt-in. Python tests and docs are synchronized.
  • add the cache-dit-cuda-kernel skill under .github/skills/ with the build/profiling workflow, measured performance history, rejected attempts and GEMM optimization RFC.
  • add CUTLASS v4.6.1 as a submodule for the CuTe build.

Performance status

RTX PRO 5000, M=4096, N=K=3072, rank=32, nsys kernel-only, warmup=3/iters=15:

kernel CuTe median native median gap
fused producer 32.192 us 31.936 us CuTe ~0.8% slower
GEMM + LoRA-up 133.823 us 115.135 us CuTe ~16.3% slower

The producer is at near-parity. GEMM and the required >=5% end-to-end gain are not yet met, so NVFP4 defaults to the native runtime in this PR. Remaining work is tracked in #1228.

Validation

  • 95 passed across SVDQ imports/config/dispatch, CuTe integration, and native/CuTe runtime tests.
  • pre-commit all green (flake8, pydocstyle, yapf, docformatter, EOF/line-ending checks).
  • CUDA extension rebuilt for SM120a through tools/build_fast.sh with ccache/nvcc shim.
  • origin/main merged into the feature branch with no conflicts; the full regression set was rerun after the merge.

Related issue: #1228 (tracking only; not closed by this PR).

- add the independent CuTe activation/LoRA-down producer and fully TMA NVFP4 GEMM\n- separate native and CuTe kernel namespaces and remove redundant CuTe suffixes\n- keep NVFP4 runtime_kernel on native until CuTe GEMM/e2e performance gates pass\n- add cache-dit-cuda-kernel skill with build, profiling, performance, and RFC notes
@DefTruth DefTruth changed the title feat(svdq): add CuTe NVFP4 workflow with native default feat(svdq): 1/N add CuTe NVFP4 workflow with native default Nov 4, 2026
@DefTruth
DefTruth merged commit 32e38bd into main Nov 4, 2026
4 checks passed
@DefTruth
DefTruth deleted the feat/svdq-cute-nvfp4 branch November 4, 2026 08:42
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.

1 participant