MetaOperator overhaul required?
MetaOp issue
-
Operator Registration
- Cannot merge registration for Operators and MetaOperators because OperatorImpl will not have the same API to retrieve attributes
-
LayerNorm
- Once fused to a metaoperator, it is complicated to retrieve the attributes to generate the ONNX
- How can the user change a MetaOperator attribute?
- For example, if a user have a Gemm MetaOperator and want to change transA to true, how can we handle it? We would need to add/remove a Transpose layer based on what the attribute is.
- Simplification of operator export
- retrieving attributes from MetaOperator is currently not straight forward and requires a lot of logic when parsing the micro-graph.
Ideas
Add attributes to the MetaOperator
When registering a MetaOperator with fusetoMetaOp, register a function to retrieve the attribute given a regex and return them in a DynamicAttributes that will be set to the MetaOperator
MetaOperator attributes read only
I think that given the use of our framework, we can make the assumption that for MetaOperator, attributes will be readonly. This remove the issue of how to update the graph when updating the MetaOperator