Skip to content
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

Make onnx-tool support backward propagation MACs calculation #42

Open
YuRuiii opened this issue Aug 17, 2023 · 3 comments
Open

Make onnx-tool support backward propagation MACs calculation #42

YuRuiii opened this issue Aug 17, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@YuRuiii
Copy link
Contributor

YuRuiii commented Aug 17, 2023

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.

@ThanatosShinji
Copy link
Owner

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.

@ThanatosShinji ThanatosShinji added the enhancement New feature or request label Aug 17, 2023
@ThanatosShinji
Copy link
Owner

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.

@YuRuiii
Copy link
Contributor Author

YuRuiii commented Aug 21, 2023

Thanks for taking my advice! I'll make pull requests when I am available :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants