test(oracle): add cross-attention, AdaLN, timestep-embed to gradcheck+oracle#164
Merged
Merged
Conversation
…+oracle
Extends the ADR-091 gradcheck + PyTorch-oracle harness with three more E127
diffusion-DiT op classes (T127.1.0a), each composed from existing engine ops
with an analytic backward verified against finite-difference on CPU:
- CrossAttention: single-head scaled dot-product attention (Q,K,V; no params).
torch: scaled_dot_product_attention.
- AdaLN: out = x*(1+c@Ws) + c@Wsh modulation core (two projection params).
- TimestepEmbed: concat(sin(t@freqs), cos(t@freqs)) sinusoidal embedding.
Verified: TestRegistry/{CrossAttention,AdaLN,TimestepEmbed} gradcheck pass;
full gradcheck + oracle registry<->torchmap lockstep green; go vet clean.
With GroupNorm (already merged), 4 of the 6 T127.1.0a op classes are now
covered. The remaining two (Conv3D, ConvTranspose) are FORWARD-ONLY per ADR-092
and do not fit a backward-checking gradcheck harness; they need a separate
forward-parity path (tracked follow-up).
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.
Extends the ADR-091 gradcheck + PyTorch-oracle harness with three more E127/T127.1.0a diffusion-DiT op classes — each composed from existing engine ops with an analytic backward verified against finite-difference on CPU:
scaled_dot_product_attention.out = x*(1 + c@Ws) + c@Wshmodulation core (two projection params).concat(sin(t@freqs), cos(t@freqs))sinusoidal embedding (freqsleaf).Verified
TestRegistry/{CrossAttention,AdaLN,TimestepEmbed}gradcheck pass; full gradcheck + oracle registry↔torchmap lockstep green;go vet/buildclean.Coverage
With GroupNorm (already merged, #159), 4 of the 6 T127.1.0a op classes are now covered. The remaining two — Conv3D, ConvTranspose — are forward-only per ADR-092 (inference-only VAE, forward-parity not gradcheck) and do not fit this backward-checking harness; they need a separate forward-parity path (tracked follow-up, not this PR).
Companion to #159. Refs zerfoo E127.