Skip to content

Pr 94 99 01 - #1307

Open
butanehi wants to merge 9 commits into
quic:mainfrom
butanehi:pr-94-99-01
Open

butanehi wants to merge 9 commits into
quic:mainfrom
butanehi:pr-94-99-01

Conversation

@butanehi

@butanehi butanehi commented Sep 3, 2026

Copy link
Copy Markdown

PR-1294 PR-1299 PR-1301 merged

vbaddi and others added 9 commits August 31, 2026 14:07
  Replace QEff einsum-based reduction workarounds with equivalent torch.sum()
  forms now that ONNX subfunction ReduceSum axes are localized as constants.

  Add a narrow ONNX transform that detects ReduceSum nodes inside FunctionProto
  bodies where the axes input was promoted to a function formal input. When every
  top-level call site passes the same compile-time integer constant for that
  formal input, the transform inserts a local Constant node inside the function,
  rewires ReduceSum to use it, removes the formal function input, and removes the
  matching actual argument from each call site.

  This keeps PyTorch code such as:

      (query * query).sum(dim=-1, keepdim=True)

  lowering to Mul + ReduceSum instead of requiring an einsum workaround, while
  still presenting ReduceSum axes to the compiler as a compile-time constant
  inside the ONNX FunctionProto.

Signed-off-by: vbaddi <vbaddi@qti.qualcomm.com>
Signed-off-by: vbaddi <vbaddi@qti.qualcomm.com>
Signed-off-by: Mohit Soni <mohisoni@qti.qualcomm.com>
Signed-off-by: Kushal Dulla <kdulla@qti.qualcomm.com>
Signed-off-by: Kushal Dulla <kdulla@qti.qualcomm.com>
Merge branch 'pr-1299' into pr-94-99-01
Merge branch 'pr-1294' into pr-94-99-01
Merge branch 'pr-1301' into pr-94-99-01
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.

3 participants