Skip to content

feat(cake_grad): Normalize deterministic with grad backend names and KCP routes - #7990

Closed
yyihuang wants to merge 2 commits into
flashinfer-ai:mainfrom
yyihuang:rename-gdn-det-kcp-20261030
Closed

yyihuang wants to merge 2 commits into
flashinfer-ai:mainfrom
yyihuang:rename-gdn-det-kcp-20261030

Conversation

@yyihuang

@yyihuang yyihuang commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

📌 Description

Use det in the canonical backend names of the delivered deterministic training families, and a final kcp suffix for context-parallel routes. For example, cake_gdn_train becomes cake_gdn_det_train_kcp, and KDA and causal conv1d get explicit local and KCP entry modules.

This covers GDN, KDA, LM head/loss, grouped MoE GEMM, dense projection, mHC, RMSNorm, RMSNorm + SiLU gate, and causal conv1d. Legacy imports forward to the canonical implementation, sharing function/class identity and module state. Update consumer imports, package data, build manifests, generated-source formatting exclusions, and documentation together. The manifest checker also includes the shipped KDA and conv1d KCP sibling registries.

GQA and DSA keep their names because their backward paths use floating atomic reductions. MoK keeps its name because full distributed determinism has not been established. det means repeatability with fixed inputs, hardware, execution plan and initial accumulation buffers; it does not promise identical bits across architectures or partitions. This change encodes the existing contract and does not alter numerical algorithms.

Generated CUDA source and binary program identifiers retain their contents and identity. docs/training_backend_names.md lists every canonical name and exception.

🔍 Related Issues

🚀 Pull Request Checklist

✅ Pre-commit Checks

  • I have installed pre-commit.
  • I have installed the hooks with pre-commit install.
  • I have run pre-commit run --all-files.
  • Changed Python files pass Ruff lint and formatting; staged diff passes whitespace checks.

🧪 Tests

  • Tests have been added or updated as needed.
  • All tests are passing on the intended GPUs.
  • This PR requires full-scope CI.

CPU validation:

  • 78 passed, 3 skipped: compatibility/import identity tests plus KDA and LM-head CPU API suites. A namespace-only import harness avoids initializing GPU components of the package root; this is not a GPU integration result.
  • All 10 migrated backend packages pass check_cake_build_manifests.py: zero findings.
  • All 841 CUDA payload files moved by the broad rename are byte-identical to their prior paths. The earlier GDN change separately preserved its 38 payload files.
  • Earlier GDN CPU suites: 185 passed, 8 skipped; 3 failures reproduce on the unmodified baseline with this Python 3.13 / CPU Torch 2.15 environment (saved-tensor equality and checkpoint accounting).

GPU compilation, graph execution, numerical parity and determinism tests have not been rerun for this naming change. Keep draft pending integration validation.

Suggested CI targets: tests/experimental/test_cake_training_names.py tests/experimental/test_cake_gdn_train_api.py tests/experimental/test_cake_kda_train_api.py tests/experimental/test_cake_lm_head_loss_api.py tests/experimental/test_cake_moe_grouped_gemm_api.py tests/norm/test_cake_rmsnorm_train_api.py tests/norm/test_cake_causal_conv1d_train_api.py tests/mhc/test_cake_mhc_train_api.py

🔬 Experimental Track

tests/experimental/test_cake_training_names.py
tests/experimental/test_cake_gdn_train_api.py
tests/experimental/test_cake_gdn_train_kcp.py
tests/experimental/test_cake_gdn_train_kcp_build.py
tests/experimental/test_cake_kda_train_api.py
tests/experimental/test_cake_lm_head_loss_api.py
tests/experimental/test_cake_moe_grouped_gemm_api.py

Reviewer Notes

Review both legacy import compatibility and the explicit KCP routes. Source-directory moves account for most files; unchanged generated sources should be reviewed as renames. No performance improvement is claimed.

@coderabbitai

coderabbitai Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@flashinfer-bot flashinfer-bot added the op: linear attention KDA, mamba, GDN, etc. review filtering. label Oct 30, 2026
@flashinfer-bot flashinfer-bot added op: moe op: misc norm, activation, sampling, RoPE, quantization, etc. labels Oct 30, 2026
@yyihuang yyihuang changed the title refactor: name deterministic GDN KCP backend explicitly Normalize deterministic training backend names and KCP routes Oct 30, 2026
@yyihuang yyihuang changed the title Normalize deterministic training backend names and KCP routes feat(cake_grad): Normalize deterministic with grad backend names and KCP routes Oct 30, 2026
@yyihuang

Copy link
Copy Markdown
Collaborator Author

@yyihuang yyihuang closed this Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

op: linear attention KDA, mamba, GDN, etc. review filtering. op: misc norm, activation, sampling, RoPE, quantization, etc. op: moe

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants