Skip to content

Optimizer Suggestions for Common Graph Fusions #2301

Open
@AyoubMDL

Description

@AyoubMDL

I've been using ONNXScript extensively lately and really appreciate how powerful and flexible it is. As part of that experience, I and @Johansmm would like to suggest a few optimization patterns that could improve performance and simplify common model graphs. These are generally applicable across many models:

  1. Fold BatchNormalization into preceding nodes (Conv, ConvTranspose, Gemm) Rewriter: Fold Batchnorm nodes #2312
  2. Fuse MatMul + Add into Gemm
  3. Fuse Min + Max into Clip
  4. Eliminate redundant Reshape / Flatten nodes
  5. Fold Pad into Conv / ConvTranspose
  6. Fuse successive Clip / ReLU nodes

We're happy to contribute if any of these are a good fit. Feel free to add other suggestions or let us know if some of these are out of scope.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions