Improve PyTorch profiler flop computation formulas#51377
Improve PyTorch profiler flop computation formulas#51377xuzhao9 wants to merge 1 commit intopytorch:masterfrom
Conversation
💊 CI failures summary and remediationsAs of commit b9e9205 (more details on the Dr. CI page):
This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.Please report bugs/suggestions to the (internal) Dr. CI Users group. |
a5f6d43 to
bbf8537
Compare
Codecov Report
@@ Coverage Diff @@
## master #51377 +/- ##
=======================================
Coverage 80.86% 80.86%
=======================================
Files 1938 1938
Lines 211184 211221 +37
=======================================
+ Hits 170767 170797 +30
- Misses 40417 40424 +7 |
jspark1105
left a comment
There was a problem hiding this comment.
Thanks for incorporating changes! Accepting but it would be great if @ilia-cher can also take a look.
There was a problem hiding this comment.
PyTorch doesn't support having a different padding for left and right (or top and bottom)? Sorry I'm more familiar with Caffe2 conv operator.
There was a problem hiding this comment.
According to torch.nn.conv2d doc, padding only supports number of points in two directions and is applied on both sides: https://pytorch.org/docs/stable/generated/torch.nn.Conv2d.html
facebook-github-bot
left a comment
There was a problem hiding this comment.
@jspark1105 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
facebook-github-bot
left a comment
There was a problem hiding this comment.
@xuzhao9 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
facebook-github-bot
left a comment
There was a problem hiding this comment.
@xuzhao9 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary: Improve the flops computation formula of aten::conv2d operator to support stride, pad, dilation, and groups arguments. This diff also fixes the following issues: - Apply a factor of 2 to aten::mm because output accounts for multiplication and addition. - Fix incorrect names of scalar operators to aten::mul and aten::add. Test Plan: ```python python test/test_profiler.py ``` Reviewers: Subscribers: Tasks: Tags:
bbf8537 to
b9e9205
Compare
facebook-github-bot
left a comment
There was a problem hiding this comment.
@xuzhao9 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary: Improve the flops computation formula of aten::conv2d operator to support stride, pad, dilation, and groups arguments. This diff also fixes the following issues: - Apply a factor of 2 to aten::mm because output accounts for multiplication and addition. - Fix incorrect names of scalar operators to aten::mul and aten::add. Pull Request resolved: pytorch#51377 Test Plan: ```python python test/test_profiler.py ``` Reviewed By: jspark1105 Differential Revision: D26165223 Pulled By: xuzhao9 fbshipit-source-id: 2c5f0155c47af2e6a19332fd6ed73ace47fa072a
Summary:
Improve the flops computation formula of aten::conv2d operator to support stride, pad, dilation, and groups arguments.
This diff also fixes the following issues:
Test Plan: