[pass_enhance] add global extra attributes for op def. #34009
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR types
Others
PR changes
Others
Describe
pass专项相关:
考虑到op def里面的extra 属性存在大面积的重复,因此,提炼出一个 全局的extra 属性。表示在所有op里面,该属性都是extra的。
全局extra属性主要包括opmarker的基类里面添加的一些类似 "op_callback" 的用以调试的属性,以及部分奇特的pass会给所有op都添加的类似 “is_test”、“use_mkldnn”之类的环境属性。