SIGN IN SIGN UP

Fix packed GatedDeltaNet shape inference (#32708)

### Description

Updates the `GatedDeltaNet` schema to support packed QKV inputs with
omitted key and value inputs.

Shape inference now:

- Accepts rank-2 and rank-3 packed QKV tensors.
- Preserves the packed tensor’s token dimensions.
- Derives output value-head dimensions from the recurrent state.
- Retains existing behavior for separate Q, K, and V inputs.
- Rejects cases where only one of key or value is provided.

Adds focused shape-inference tests for packed and dense token layouts.

### Motivation and Context

Currently, we can emit `GatedDeltaNet` with Q, K, and V concatenated
into one tensor. The existing schema required separate key and value
inputs and only inferred shapes for rank-3 or rank-4 query tensors.

As a result, models using the packed representation failed graph
validation before execution. This change aligns schema validation and
output-shape inference with a packed QKV contract.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
K
kunal-vaishnavi committed
12e7b2b66937cae7102f668ec063c290e15ccb02
Parent: 7001d9a
Committed by GitHub <noreply@github.com> on 10/1/2026, 9:31:27 PM