-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reorganize contrib op schemas #10494
Conversation
@yufenglee , I'm unfamiliar with the operators. I can do it. Do you want me to do it? |
@@ -3443,15 +2889,10 @@ It's an extension of Gelu. It takes the sum of input A and bias input B as the i | |||
} | |||
#endif | |||
|
|||
RegisterNhwcSchemas(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does removing this provide any advantage? I thought it gave a nice way to see what contrib schemas are registered.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding comments to ms_opset.h has the same effect. Currently we either register all the operators, or none of them. Splitting would be needed when we want to add a new macro to control which part of contrib ops should be registered. At this moment, it is not needed.
fn(GetOpSchema<ONNX_OPERATOR_SET_SCHEMA_CLASS_NAME(Microsoft, 1, NGramRepeatBlock)>()); | ||
fn(GetOpSchema<ONNX_OPERATOR_SET_SCHEMA_CLASS_NAME(Microsoft, 1, Pad)>()); | ||
fn(GetOpSchema<ONNX_OPERATOR_SET_SCHEMA_CLASS_NAME(Microsoft, 1, QAttention)>()); | ||
fn(GetOpSchema<ONNX_OPERATOR_SET_SCHEMA_CLASS_NAME(Microsoft, 1, QEmbedLayerNormalization)>()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move those 2 to quant section? you may do it in next PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the parsing to disable kernels for a reduced ops build need updating? It looks for existing macro names, so https://github.com/microsoft/onnxruntime/blob/master/tools/ci_build/op_registration_utils.py may need updating. |
@skottmckay I think it parses kernel registrations, not op schemas ? |
Description:
This change will reduce binary size about 2KB for normal Windows build. It has no impact on ort minimal build.
Motivation and Context
Reduce usages of static variables. And reduce binary size.