onnx / onnx/optimizer

Fold LpNormalization

Open
#143 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
834
Forks
109
Avg merge
6h 55m
Merged PRs (30d)
2

Description

Why?
Pytorch onnx unfolds L2* normalization as multiple operators, as opposed to use LpNormalization in onnx.

What?
I feel that it's within the scope of this package to fold multiple operators into a single, no?

Relevance
Some hardware partners, e.g., Qualcomm:QNN/SNPE support LpNormalization. In such cases, model performance might suffer due to an arbitrary choice of Pytorch.

Kindly provide an example to accomplish such task.

*Possibly L1 and others

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Start by reading the linked ONNX LpNormalization specification and inspecting the PyTorch-exported operator graph, then locate the optimizer pass and its existing tests. Done means a normalization pattern is folded into LpNormalization, with any supported L1 or other cases explicitly covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend, performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.