Skip to content

[rewriter] Create a managed cache for rewrite rules to store states #2526

@justinchuby

Description

@justinchuby

Ref: https://github.com/microsoft/onnxscript/pull/2518/files#r2305733402

Currently the rewrite rules use instance properties for storing intermediate results. This can be bad because the states are not freed after the rule is done, and risk contaminating future rewrites (side effects). We should create a managed cache that is cleared every time a rewrite is done.

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions