Skip to content

Forward packed QKV and normalization kind for APB - #299

Open
Supernova-45 wants to merge 3 commits into
mainfrom
perf/apb-packed-qkv
Open

Forward packed QKV and normalization kind for APB#299
Supernova-45 wants to merge 3 commits into
mainfrom
perf/apb-packed-qkv

Conversation

@Supernova-45

@Supernova-45 Supernova-45 commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Forward the optional packed Q/K/V projection parameters from the public
    cuequivariance_torch.attention_pair_bias API to the ops backend.
  • Expose the backend's optional norm_kind contract while preserving
    layer_norm as the public default.
  • Omit the default normalization keyword at dispatch so a new public package
    remains compatible with an older ops wheel; explicit RMSNorm still requires
    backend support.

This is public-API plumbing only. It does not change kernels, routing policy,
or behavior for existing callers that do not use the new options.

Motivation

RFD4's production geometry uses a packed QKV projection and RMSNorm. Without
these arguments in the public wrapper, the integration can only reach the
optimized APB backend by calling the ops package directly.

Validation

  • Complete repository pre-commit suite: worker job 3561046 (clean).
  • Focused public-wrapper forwarding/default test: 1 passed.
  • Mixed-version compatibility is exercised by the RFD4 contract test: the
    default LayerNorm path works when the installed ops backend lacks both new
    keywords.
  • Exact public-wrapper/RFD4 route qualification on locked H200: job 3561137
    at public head 6fdca1d, RFD4 head a5f4cf5, and backend head 462e9ad2.
    The actual RFD4 class compiled to cuequivariance.apb_flash_forward; at
    B=8/N=384 it measured 1.361x over compiled-native RMSNorm with output
    max-absolute error 4.88e-4 and all-gradient max-absolute error 2.74e-7.

Backend implementation and qualification: kernelcatcher MR !686.
Integration consumer: baker-laboratory/RFD4-Proteina-dev#224.

@copy-pr-bot

copy-pr-bot Bot commented Aug 8, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@Supernova-45
Supernova-45 marked this pull request as ready for review August 9, 2026 19:59
@Supernova-45

Copy link
Copy Markdown
Collaborator Author

@greptileai review

@coderabbitai review

@Supernova-45 Supernova-45 changed the title Forward packed QKV parameters for APB Forward packed QKV and normalization kind for APB Aug 9, 2026
@Supernova-45

Copy link
Copy Markdown
Collaborator Author

Final review disposition:

  • Exact-head CodeRabbit CLI review completed with zero findings.
  • Greptile produced no inline findings; its 4/5 summary refers to VERSION/release-section state that is not in this four-file PR diff, so I did not expand this API-plumbing PR with unrelated release-version edits.
  • All nine GitHub checks pass. Worker job 3561046 ran the complete all-files pre-commit suite and focused wrapper contract.
  • Locked-H200 job 3561137 exercised the final public wrapper through the actual RFD4 class and selected cuequivariance.apb_flash_forward (1.361x for the APB block at B=8/N=384, with output/all-gradient checks in the PR description).

Ready for human review.

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