Repository navigation
refactor(cake_dense_projection_gemm): deterministic names for the dense projection GEMM package - #8046
Conversation
|
@flashinfer-bot run tests/experimental/test_cake_dense_projection_det_gemm.py tests/experimental/test_cake_dense_projection_det_gemm_names.py |
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Backend API and compatibility flashinfer/experimental/dense_projection_det_gemm/cake_backend.py, flashinfer/experimental/dense_projection_det_gemm/README.md, benchmarks/bench_cake_dense_projection_det_gemm.py, flashinfer/experimental/dense_projection_gemm/__init__.py |
Dense-projection and router APIs use DET names. Former API and package names remain aliases. The README and benchmark use the canonical package and API names. |
JIT registry and package wiring flashinfer/experimental/dense_projection_det_gemm/cake_jit.py, flashinfer/experimental/dense_projection_det_gemm/build.json, pyproject.toml, scripts/check_cake_build_manifests.py, .pre-commit-config.yaml, tests/experimental/test_cake_dense_projection_det_gemm_names.py, tests/test_helpers/cake_package.py |
Adds architecture-specific JIT registry and loading helpers plus a build manifest. Package metadata, manifest checks, pre-commit exclusions, and naming tests use the canonical package name. |
Generated kernels and validation flashinfer/experimental/dense_projection_det_gemm/csrc/cake_dense_projection_det_gemm/*, tests/experimental/test_cake_dense_projection_det_gemm.py |
Generated bindings, kernel symbols, namespaces, and compile-time selectors use DET GEMM names. Two bindings exchange TMA box dimensions. The test suite updates existing checks and adds repeated-launch bitwise equality checks. |
Estimated code review effort: 4 (Complex) | ~60 minutes
Change: Refactor
Merge Risk: 
Minimal · up to 70a9f
-
This change renames the dense projection GEMM package to the DET naming and keeps aliases for the former package and API names. No concrete merge-blocking defect was identified. The author's reported benchmark parity and the requested test runs are the remaining checks.
Pre-merge checks: 
3 · 
1 · 
1
-
Failed checks: 1 warning · 1 inconclusive Passed checks: 3 passedFull details: Description check
-
Explanation
The description gives substantial technical detail, benchmark results, and the intended deterministic naming change. However, it omits the repository template sections, including related issues, pre-commit and test checklists, experimental-track declarations, tracking issue details, and the required experimental-tests block.
Resolution
Update the description to use the repository template. Add the required sections and headings, link the experimental tracking issue, complete the pre-commit and test checklists, state test results and any full-scope CI justification, document the experimental API owner, rationale, and graduation plan, and add the required experimental-tests fenced block with valid targets such as tests/experimental/test_cake_dense_projection_det_gemm.py and tests/experimental/test_cake_dense_projection_det_gemm_names.py.
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 12.50% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 48 functions across 46 files. (122 skipped: 4 unsupported, 4 too large, 114 over the file limit.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches: 💡 1
-
🛠️ Fix failing CI checks: 💡
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- 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.
Comment @coderabbitai help to get the list of available commands.
|
@flashinfer-bot run tests/experimental/test_cake_dense_projection_det_gemm.py tests/experimental/test_cake_dense_projection_det_gemm_names.py |
…xperimental.dense_projection_det_gemm Move the package (registry, host, loader, manifest, shared headers and device helpers) to its det name. The former import path keeps an __init__ that maps its cake_backend, cake_jit and cake_build modules to the renamed ones, so existing imports name the same objects. The generated units are retired and rewritten under the new names by the regenerated package in a following commit. Co-Authored-By: Claude <noreply@anthropic.com>
…former names as aliases Rename the public entry points of cake_backend to their det names (DetGemmPlan, prepare_dense_projection_det_gemm, projection_det_forward, router_fp32_det_gemm, ...) and the loader of cake_jit; every former name stays an alias of the same object. Error messages, the README, the test suite and the benchmark (both renamed) use the det names. A new test checks the alias identities and the former import path, and a GPU test holds prepared launches to bitwise-identical reruns. Co-Authored-By: Claude <noreply@anthropic.com>
…ames in the registry and host planner The registry keys, kernel symbols and instance templates take the det spellings (dense_proj_det_gemm_*, router_fp32_det_gemm_*, split_fp32_det_bf16x3), and the host planner selects them by those names. The programs whose builds the registry used to restate keep them with the generator instead. Co-Authored-By: Claude <noreply@anthropic.com>
…er the det names The device units, bindings and build manifest move to csrc/cake_dense_projection_det_gemm with the det kernel, namespace and macro spellings; the units of the former directory are removed. The compiled programs are the same: each unit is the former unit with the names changed. Co-Authored-By: Claude <noreply@anthropic.com>
… lengthened The longer det names push three call sites and one error message past the line limit; this is the ruff format output for those lines only. Co-Authored-By: Claude <noreply@anthropic.com>
8066248 to
70a9f07
Compare
|
@flashinfer-bot run tests/experimental/test_cake_dense_projection_det_gemm.py tests/experimental/test_cake_dense_projection_det_gemm_names.py |
The Cake
dense_projection_gemmpackage inflashinfer.experimentalhas 127 programs built from 124 templates. Most are BF16-operand dense GEMMs that write BF16 or FP32 output, and there is also an FP32 router GEMM that runs through BF16x3 emulation. This PR renames the package toflashinfer.experimental.dense_projection_det_gemm, where "det" means repeated runs with the same inputs, hardware and plan give bitwise-identical results. Kernel machine code and plans do not change. The baseline is the previous Cake version on the same GPU, all on CUDA 13.4. Across 294 shapes the geomean speedup is 1.000 on NVIDIA GB200 (sm_100a), NVIDIA GB300 (sm_103a) and Rubin (sm_107a). Per-row ratios are 0.929–1.024, 0.974–1.019 and 0.990–1.021 respectively, all within run-to-run variation.The table below gives per-shape times in µs for the previous version and this PR on each GPU (GB200 and GB300 with 152 SMs, Rubin with 216 SMs), with speedup = previous / this PR.
The kernel's other Cake variants cover
kk/kn/nk/nnlayouts, row-major and transposed outputs, 64/128/256-row tiles, batched head projection, split-tail and stream-K forms, and eight-warp CTAs onsm_100a/sm_103a, across 254 build entries: 81 forsm_100a, 86 forsm_103aand 87 forsm_107a.Summary by CodeRabbit
New Features
Documentation