-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[Enhance] New-style CPU training and inference. #674
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #674 +/- ##
==========================================
+ Coverage 82.27% 83.15% +0.88%
==========================================
Files 120 126 +6
Lines 7045 7630 +585
Branches 1228 1332 +104
==========================================
+ Hits 5796 6345 +549
- Misses 1075 1095 +20
- Partials 174 190 +16
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@@ -87,17 +87,20 @@ def parse_args(): | |||
action=DictAction, | |||
help='custom options for show_result. key-value pair in xxx=yyy.' | |||
'Check available options in `model.show_result`.') | |||
parser.add_argument( | |||
'--device', default=None, help='device used for testing. (Deprecated)') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not keep this interface?
I prefer the use xxx --device cpu
rather than export CUDA_VISIBLE_DEVICES=-1 xxxx
.
the command is simpler.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To use MMDataParallel
for CPU training/test, we need to specify CUDA_VISILBE_DEVICES=-1
, and in that situation, the --device
argument is useless.
* [Enhance] New-style CPU training and inference. * Add version check in CPU training/test
* [Enhance] New-style CPU training and inference. * Add version check in CPU training/test
Motivation
Refers to open-mmlab/mmdetection#7016, and it's based on open-mmlab/mmcv#1621
Modification
As the title.
BC-breaking (Optional)
No, the old style is reserved but deprecated and it will be removed after three months.
Use cases (Optional)
Old style CPU training
python tools/train.py $CONFIG --device cpu
New style CPU training
Checklist
Before PR:
After PR: