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] Support CPU training #62

Merged
merged 1 commit into from
Jan 26, 2022
Merged

[Feature] Support CPU training #62

merged 1 commit into from
Jan 26, 2022

Conversation

HIT-cwh
Copy link
Collaborator

@HIT-cwh HIT-cwh commented Jan 25, 2022

Hi! Related to open-mmlab/mmdet#7016, CPU training in MMRazor is supported in this pr.

We modified the train api in mmrazor/apis/mmdet(mmseg)/train.py while kept mmrazor/apis/mmcls/train.py the same.

Now we can use the CPU to train/debug our model and test our model with batch size >=2. Before running the program we need to export CUDA_VISIBLE_DEVICES=-1 to disable GPU visibility.

@codecov
Copy link

codecov bot commented Jan 25, 2022

Codecov Report

Merging #62 (b26ee0c) into master (9596379) will increase coverage by 0.00%.
The diff coverage is 0.00%.

❗ Current head b26ee0c differs from pull request most recent head a71f2d4. Consider uploading reports for the commit a71f2d4 to get more accurate results
Impacted file tree graph

@@           Coverage Diff           @@
##           master      #62   +/-   ##
=======================================
  Coverage   55.60%   55.61%           
=======================================
  Files          81       81           
  Lines        2942     2938    -4     
  Branches      544      542    -2     
=======================================
- Hits         1636     1634    -2     
+ Misses       1231     1228    -3     
- Partials       75       76    +1     
Flag Coverage Δ
unittests 55.61% <0.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
mmrazor/apis/mmdet/train.py 0.00% <0.00%> (ø)
mmrazor/apis/mmseg/train.py 0.00% <0.00%> (ø)
mmrazor/models/mutators/one_shot_mutator.py 92.59% <0.00%> (-3.71%) ⬇️

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 9596379...a71f2d4. Read the comment docs.

@pppppM pppppM merged commit f67d2ab into open-mmlab:master Jan 26, 2022
@HIT-cwh HIT-cwh deleted the cpu branch January 27, 2022 00:50
pppppM pushed a commit to pppppM/mmrazor that referenced this pull request Jul 15, 2022
pppppM pushed a commit to pppppM/mmrazor that referenced this pull request Jul 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants