Skip to content

A pass to set some attribute to discardable#3387

Open
chentong319 wants to merge 6 commits intoonnx:mainfrom
chentong319:set-discard
Open

A pass to set some attribute to discardable#3387
chentong319 wants to merge 6 commits intoonnx:mainfrom
chentong319:set-discard

Conversation

@chentong319
Copy link
Collaborator

@chentong319 chentong319 commented Feb 10, 2026

The decorative attributes, such as onnx_node_name, may prevent CSE on two otherwise identical operations. This PR add a pass before CSE for user to turn those attributes into discardable attributes, according to the suggestion from Copilot.
However, I found that the discardable attribute still interference with CSE. Current implementation is simple removal of the attributes.
Attributes are controlled with option, --discardable-attrs, as a list of strings. The default value is "onnx_node_name". You may provide names of other decorative attributes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant