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

Does it support torch.bmm() or torch.matmul() #78

Closed
kamiLight opened this issue Sep 20, 2021 · 2 comments
Closed

Does it support torch.bmm() or torch.matmul() #78

kamiLight opened this issue Sep 20, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@kamiLight
Copy link

One part of my model performs the matrix multiplication, i.e torch.bmm() / torch.matmul(), but results show the GMac of this part is 0.0, i want to know if this is because the GMac is too small or it is not support torch.bmm() or torch.matmul()?

@sovrasov sovrasov added the enhancement New feature or request label Sep 21, 2021
@sovrasov
Copy link
Owner

sovrasov commented Sep 21, 2021

ptflops can take into account only ops that are derived from nn.Module. Support of torch.bmm and similar operations requires complete redesign of the flops counting mechanism. I've started thinking of that but barely will do this soon.

@sovrasov
Copy link
Owner

Supported by both pytorch and aten backend, see https://github.com/sovrasov/flops-counter.pytorch/blob/master/ptflops/pytorch_ops.py#L443

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