-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Refactorize framework/*.proto #3320
Comments
Also both op_desc and op_proto depend on attribute_proto, these three proto files should be merged. |
The current op_proto.proto file contains the following field in message VarProto message VarProto {
// Is that input/output could be a list or not.
// If so, that Op should write a attributed named `input_format` or
// `output_format`.
//
// e.g.
// If the op is a fc op, the inputs are `X`, `W`, `b`. The `X` and `W`
// could be multiple, so the multiple of `X` and `W` is True, and OpDesc
// will hold a attribute of them.
//
// The Op desc of same fc could be
// {
// "type": "fc",
// "input": ["X1", "X2", "W1", "W2", "b"],
// "output": "fc.out",
// "attrs" : {
// "input_format": [0, 2, 4, 5]
// }
// }
//
optional bool multiple = 3 [ default = false ]; I don't understand the meaning of This design is really hacky and far from readable. I would propose the introduction of message VarDesc {
string name = 1;
int dup = 2 [default = 0];
}; |
VarDesc is better than attr of |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Our CMakeLists file contains
We can see that operator depends on op_desc and attribute, and the latter depends on op_proto as well. As this dependency propagates in following rules, any target that depends on op_desc also depends on op_desc. So we can merged these two proto files together.
The text was updated successfully, but these errors were encountered: