-
-
Notifications
You must be signed in to change notification settings - Fork 16.2k
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
Error running autobatch --batch -1
on Apple Metal Performance Shader (MPS) --device mps
#11169
Comments
👋 Hello, this issue has been automatically marked as stale because it has not had recent activity. Please note it will be closed if no further activity occurs. Access additional YOLOv5 🚀 resources:
Access additional Ultralytics ⚡ resources:
Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed! Thank you for your contributions to YOLOv5 🚀 and Vision AI ⭐! |
👋 Hello there! We wanted to give you a friendly reminder that this issue has not had any recent activity and may be closed soon, but don't worry - you can always reopen it if needed. If you still have any questions or concerns, please feel free to let us know how we can help. For additional resources and information, please see the links below:
Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed! Thank you for your contributions to YOLO 🚀 and Vision AI ⭐ |
@PetervanLunteren hi there! Thanks for reporting this issue. It looks like the error you encountered is due to the expected CUDA device while using the |
Search before asking
YOLOv5 Component
Training
Bug
The following error message pops up when running autobatch (
--batch -1
) on Apple MPS (--device mps
). Please see reprex below. I've installed the requirements as documented here. MPS is properly built and available (see below).Installation:
git clone https://github.com/ultralytics/yolov5 cd yolov5 pip install -r requirements.txt --extra-index-url https://download.pytorch.org/whl/nightly/cpu
Check mps:
python -c "import torch; print(torch.backends.mps.is_available()); print(torch.backends.mps.is_built())"
Reproduce error:
It seems to go wrong at this line of code, where a CUDA device is expected.
--batch -1
works fine without the--device mps
argument.Uninstalling
torchvision
and compiling from the vision repository like suggested here resulted in the same behaviour.Could this be an easy fix by adjusting the code in autobatch.py to also accept mps as device?
Environment
Minimal Reproducible Example
Execute from M1 mac:
Additional
No response
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: