OpenVINO™ is an open source toolkit for optimizing and deploying AI inference
C++ aicomputer-visiondeep-learningdeploy-aidiffusion-modelsgenerative-aigood-first-issueinferencellm-inferencenatural-language-processingnlpopenvinooptimize-aiperformance-boostrecommendation-systemspeech-recognitionstable-diffusiontransformersyolo
name: ov-write-transformations description: > Write or review OpenVINO ov::Model graph transformations (passes: MatcherPass, ModelPass, GraphRewrite, BackwardGraphRewrite). Use when the user asks to write, add, or refactor a transformation/fusion/decomposition pass, choose between MatcherPass and ModelPass, write pattern-matching predicates, or bring an existing pass in line with OpenVINO transformation conventions.
- Read src/common/transformations/docs/writing_transformations.md — it covers where transformations live, choosing the pass type, anatomy of a MatcherPass, pattern matching and predicates, writing the callback, modifying the graph, documenting the pass, and what NOT to do.
- Try to find an existing transformation that can be extended to cover the new pattern.
- Write or modify the pass following the patterns in that guide.
- Add tests using the
ov-transformation-testsskill, then build and run them to ensure the pass compiles and behaves as expected.