Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
onnxscript 0.5.1.dev20250912 documentation
Light Logo Dark Logo
  • Overview
  • Tutorial
    • Rewriter Tutorial
      • Introduction
      • Usage
      • A Simple Example
      • Specifying attributes in the pattern
      • Specifying variable inputs in the pattern
      • Specifying domains in the pattern
      • Specifying outputs in the pattern
      • Using the match_condition parameter for pattern-matching
      • Using MatchContext for Advanced Condition Checking
      • OR Patterns
      • Utilizing commute parameter for pattern-matching
      • Node and Value Level Checkers
    • Optimizer Tutorials
      • Optimizing a Model using the Optimizer
  • API
    • Decorator
    • Opsets and Types
    • Converter
    • Values
    • onnxscript.optimizer
      • optimize
      • inline
      • basic_constant_propagation
      • fold_constants
      • remove_unused_nodes
    • onnxscript.rewriter
      • rewrite
      • RewritePass
    • onnxscript.rewriter.pattern
      • Pattern
      • OpsetPatternBuilder
      • MatchResult
      • Constant
      • OrValue
      • PatternMatcher
      • SimplePatternMatcher
      • RewriteRule
      • RewriteRuleSet
      • RewriteRuleClassBase
      • MatchStatus
      • MatchingTracer
    • onnxscript.version_converter
      • convert_version
      • ConvertVersionPass
    • Testing
  • ONNX IR
  • Example Gallery
    • Generating a FunctionProto
    • Generating a ModelProto
    • Generating a LibProto
    • Eager mode evaluation
    • ModelProto Properties
    • Model Local Functions
  • Articles
    • Introducing ONNX Script: authoring ONNX with the ease of Python
Back to top
View this page

onnxscript.rewriter¶

rewriter.rewrite

Rewrite the model using the provided pattern rewrite rules.

IR passes¶

rewriter.RewritePass

Next
rewrite
Previous
remove_unused_nodes
Copyright © Microsoft. All rights reserved.
Made with Sphinx and @pradyunsg's Furo
On this page
  • onnxscript.rewriter
    • IR passes