-
Notifications
You must be signed in to change notification settings - Fork 323
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
Can't validating on Mac MPS #566
Comments
Hi @fatevase , thanks for your report. It is a bug of autocast which will throw an error when the device is mmengine/mmengine/runner/amp.py Line 15 in 36af1f0
|
thanks, I saw that train do not use |
Both training and validation support AMP but there are different ways to enable AMP. If you need to enable mmengine/mmengine/runner/loops.py Lines 120 to 121 in 36af1f0
mmengine/mmengine/model/wrappers/distributed.py Lines 95 to 125 in 36af1f0
mmengine/mmengine/optim/optimizer/amp_optimizer_wrapper.py Lines 122 to 132 in 36af1f0
|
Describe the bug
when I follow doc to using mmengine, train is fine, but an error occurred while validate dataset.
User specified autocast device_type must be cuda or cpu, but got mps
Reproduction
What command or script did you run?
code from here: https://mmengine.readthedocs.io/zh_CN/latest/get_started/15_minutes.html
Did you make any modifications on the code or config? Did you understand what you have modified?
No
What dataset did you use?
cifar-10
Environment
use conda install PyTorch.
Bug fix
I found the error caused by
autocast
on runner.loops.py on 431The text was updated successfully, but these errors were encountered: