Open YuRuiii opened 1 year ago
That's a good suggestion! I think the backward propagation MACs can be calculated also in the profile function. The profile can return a list of [Forward MACs, Backward MACs]. Before this feature, I was thinking about a new shape inference architecture, because the current shape inference does not create a correct tensor data type. I can create a template profile function this week, which returns both forward and backward MACs. Then you are welcome to add each node's backward MACs calculation codes.
Now, the main branch code Node.profile function supports backward MACs calculation. Return the backward MACs will activate the backward_MACs column of the profile table.
Thanks for taking my advice! I'll make pull requests when I am available :)
I've been using onnx-tool for theoretical analysis of ONNX models, and I have a question: Is it possible to enable onnx-tool to calculate the MACs during backward propagation? If onnx-tool supports this feature, it would greatly enhance our ability to analyze the performance of models during training. I am willing to assist if you think it is feasible to implement this feature.