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

[Feature] add codes for inference speed statistics #86

Merged
merged 7 commits into from
Mar 14, 2022

Conversation

heiyuxiaokai
Copy link
Contributor

Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily get feedback. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers.

Motivation

  1. add codes for inference speed statistics from https://github.com/open-mmlab/mmdetection
  2. fix the bug in eval_map

Modification

Please briefly describe what modification is made in this PR.

BC-breaking (Optional)

Does the modification introduce changes that break the back-compatibility of the downstream repos?
If so, please describe how it breaks the compatibility and how the downstream projects should modify their code to keep compatibility with this PR.

Use cases (Optional)

If this PR introduces a new feature, it is better to list some use cases here, and update the documentation.

Checklist

  1. Pre-commit or other linting tools are used to fix the potential lint issues.
  2. The modification is covered by complete unit tests. If not, please add more unit test to ensure the correctness.
  3. The documentation has been modified accordingly, like docstring or example tutorials.

@yangxue0827
Copy link
Collaborator

yangxue0827 commented Mar 8, 2022

This branch has conflicts that must be resolved

Conflicting files:
mmrotate/datasets/dota.py

You need to clone the dev branch and then submit the corresponding PR.
In addition, you need to add detailed docstring to all functions, you can refer to other scripts.

@heiyuxiaokai
Copy link
Contributor Author

heiyuxiaokai commented Mar 8, 2022

The inference speed of fp16 is about 1.5 times the speed of fp32 with a V100-SXM2-16GB. Here the gpu infos,

  • FP16 (half) performance: 31.33 TFLOPS (2:1)
  • FP32 (float) performance: 15.67 TFLOPS
  • FP64 (double) performance: 7.834 TFLOPS (1:2)

It seems not to reach the limit.

@yangxue0827 yangxue0827 requested a review from zytx121 March 8, 2022 12:14
@heiyuxiaokai heiyuxiaokai changed the base branch from main to dev March 8, 2022 12:19
@heiyuxiaokai
Copy link
Contributor Author

This branch has conflicts that must be resolved

Conflicting files: mmrotate/datasets/dota.py

You need to clone the dev branch and then submit the corresponding PR. In addition, you need to add detailed docstring to all functions, you can refer to other scripts.

ok

@codecov-commenter
Copy link

codecov-commenter commented Mar 9, 2022

Codecov Report

Merging #86 (dfcea3f) into dev (4e39a45) will increase coverage by 0.28%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev      #86      +/-   ##
==========================================
+ Coverage   28.67%   28.96%   +0.28%     
==========================================
  Files         102      104       +2     
  Lines        6604     6581      -23     
  Branches      990      985       -5     
==========================================
+ Hits         1894     1906      +12     
+ Misses       4646     4609      -37     
- Partials       64       66       +2     
Flag Coverage Δ
unittests 28.94% <ø> (+0.28%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...oi_extractors/rotate_single_level_roi_extractor.py 23.80% <0.00%> (-0.79%) ⬇️
mmrotate/models/dense_heads/rotated_anchor_head.py 10.12% <0.00%> (-0.64%) ⬇️
mmrotate/core/__init__.py 100.00% <0.00%> (ø)
mmrotate/apis/inference.py 0.00% <0.00%> (ø)
mmrotate/datasets/pipelines/loading.py 30.43% <0.00%> (ø)
...ate/models/dense_heads/kfiou_rotate_retina_head.py 30.00% <0.00%> (ø)
...e/models/dense_heads/rotated_retina_refine_head.py 25.00% <0.00%> (ø)
...els/dense_heads/kfiou_rotate_retina_refine_head.py 25.00% <0.00%> (ø)
mmrotate/core/evaluation/eval_map.py 7.58% <0.00%> (ø)
mmrotate/core/evaluation/__init__.py 100.00% <0.00%> (ø)
... and 10 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7c9a592...dfcea3f. Read the comment docs.

@yangxue0827
Copy link
Collaborator

Thank you for your contributions. Please follow https://github.com/open-mmlab/mmcv/blob/master/CONTRIBUTING.md to set pre-commit and fix the lint error.

@yangxue0827
Copy link
Collaborator

All checks have passed, looking forward to the addition of the docstring.

Copy link
Collaborator

@yangxue0827 yangxue0827 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yangxue0827 yangxue0827 changed the title add codes for inference speed statistics [Feature] add codes for inference speed statistics Mar 11, 2022
Copy link
Collaborator

@jbwang1997 jbwang1997 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@zytx121 zytx121 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zytx121 zytx121 requested a review from ZwwWayne March 12, 2022 02:42
@ZwwWayne ZwwWayne merged commit 3237e4a into open-mmlab:dev Mar 14, 2022
@zytx121 zytx121 added this to Done in New Features Mar 14, 2022
@zytx121 zytx121 mentioned this pull request Mar 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

None yet

6 participants