cpu loop R72: 2D gemm_bias batch2 family (294→298)#68
Merged
chenxingqiang merged 1 commit intoJun 30, 2026
Conversation
Add four value-verify builders: - gemm_bias_batch2 - gemm_bias_relu_batch2 - gemm_bias_gelu_batch2 - gemm_bias_silu_batch2 Register in CUSTOMIZED_OP_BUILDERS, parity list, and inventory gates. Co-authored-by: Johnson.Chen <joy6677@outlook.com>
Reviewer's GuideAdd batch=2 2D gemm_bias CPU builders (with ReLU/GELU/SiLU variants), register them in parity/inventory tests, and bump the planned value-verify inventory count from 294 to 298, documenting Loop R72 in AGENTS.md. Flow diagram for new 2D gemm_bias batch2 CPU builders and activation variantsflowchart LR
gemm_bias_batch2["gemm_bias_batch2\n[M,K] @ [K,N] + [1,N] bias"]
gemm_bias_relu_batch2["gemm_bias_relu_batch2\nGEMM + bias + ReLU"]
gemm_bias_gelu_batch2["gemm_bias_gelu_batch2\nGEMM + bias + GELU"]
gemm_bias_silu_batch2["gemm_bias_silu_batch2\nGEMM + bias + SiLU"]
gemm_bias_batch2 --> gemm_bias_relu_batch2
gemm_bias_batch2 --> gemm_bias_gelu_batch2
gemm_bias_batch2 --> gemm_bias_silu_batch2
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
febf5b7
into
cursor/cpu-loop-r71-layernorm-gated-batch2-78f5
5 of 12 checks passed
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The four new
build_gemm_bias_*_batch2helpers duplicate most of their setup logic; consider factoring out a shared builder factory that takes the activation op as a parameter to reduce repetition and potential for inconsistencies. - The planned value-verify count
298is now hardcoded in multiple tests; it may be more robust to source this from a single constant or helper to avoid future mismatches when the inventory changes again.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The four new `build_gemm_bias_*_batch2` helpers duplicate most of their setup logic; consider factoring out a shared builder factory that takes the activation op as a parameter to reduce repetition and potential for inconsistencies.
- The planned value-verify count `298` is now hardcoded in multiple tests; it may be more robust to source this from a single constant or helper to avoid future mismatches when the inventory changes again.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CPU optimization loop R72 — closes batch=2 inference naming for the full 2D
gemm_biascompound family.Inventory: 294 → 298 (+4 builders)
New builders
gemm_bias_batch2[M,K] @ [K,N] + [1,N]biasgemm_bias_relu_batch2gemm_bias_gelu_batch2gemm_bias_silu_batch2Verification
make test-cpu-value-verify # 298 passed, 1 skippedStacked on R71 (
cursor/cpu-loop-r71-layernorm-gated-batch2-78f5).R73 candidates
gemm_gelu_batch2/gemm_relu_batch2/gemm_silu_batch2rms_norm_linear_batch2+ GELU/ReLU/SiLUSummary by Sourcery
Add batch=2 coverage for the 2D gemm_bias operator family and update CPU certification inventory counts accordingly.
New Features:
Documentation:
Tests: