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

when I set devices to 0, the train.py uses all GPUs #2767

Closed
jieruyao49 opened this issue Apr 12, 2021 · 3 comments
Closed

when I set devices to 0, the train.py uses all GPUs #2767

jieruyao49 opened this issue Apr 12, 2021 · 3 comments
Labels
bug Something isn't working question Further information is requested

Comments

@jieruyao49
Copy link

jieruyao49 commented Apr 12, 2021

❔Question

when I set devices to 0, the train.py uses all GPUs(There are nine GPUs),The training instructions are as follows:
python train.py --data /home/code/yolov5-master/data/coco128.yaml --cfg /home/code/yolov5-master/models/yolov5s.yaml --weights /home/code/yolov5-master/yolov5s.pt --batch-size 63 --device 1

My package as follows:
_libgcc_mutex 0.1 main https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
ca-certificates 2021.1.19 h06a4308_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
certifi 2020.12.5 py38h06a4308_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
cudatoolkit 10.1.243 h6bb024c_0
ld_impl_linux-64 2.33.1 h53a641e_7 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
libffi 3.3 he6710b0_2 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
libgcc-ng 9.1.0 hdf63c60_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
libstdcxx-ng 9.1.0 hdf63c60_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
ncurses 6.2 he6710b0_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
numpy 1.20.2
openssl 1.1.1k h27cfd23_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
Pillow 8.2.0
pip 21.0.1 py38h06a4308_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
python 3.8.8 hdb3f193_4 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
readline 8.1 h27cfd23_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
setuptools 52.0.0 py38h06a4308_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
sqlite 3.35.4 hdfb4753_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
tk 8.6.10 hbc83047_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
torch 1.7.1+cu101
torchvision 0.8.2
typing-extensions 3.7.4.3
wheel 0.36.2 pyhd3eb1b0_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
xz 5.2.5 h7b6447c_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
zlib 1.2.11 h7b6447c_3 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main

absl-py 0.12.0
cachetools 4.2.1
certifi 2020.12.5
chardet 4.0.0
cycler 0.10.0
Cython 0.29.22
google-auth 1.28.1
google-auth-oauthlib 0.4.4
greenlet 1.0.0
grpcio 1.37.0
idna 2.10
kiwisolver 1.3.1
Markdown 3.3.4
matplotlib 3.3.4
mkl-fft 1.3.0
mkl-random 1.1.1
mkl-service 2.3.0
numpy 1.20.2
oauthlib 3.1.0
olefile 0.46
opencv-python 4.5.1.48
pandas 1.2.3
Pillow 8.2.0
pip 21.0.1
protobuf 3.15.8
pyasn1 0.4.8
pyasn1-modules 0.2.8
pycairo 1.19.1
pycocotools 2.0.2
pyparsing 2.4.7
python-dateutil 2.8.1
pytz 2021.1
PyYAML 5.4.1
reportlab 3.5.66
requests 2.25.1
requests-oauthlib 1.3.0
rsa 4.7.2
scipy 1.6.2
seaborn 0.11.1
setuptools 52.0.0.post20210125
six 1.15.0
SQLAlchemy 1.4.5
tensorboard 2.4.1
tensorboard-plugin-wit 1.8.0
thop 0.0.31.post2005241907
torch 1.7.1+cu101
torchvision 0.8.2
tornado 6.1
tqdm 4.60.0
typing-extensions 3.7.4.3
urllib3 1.26.4
Werkzeug 1.0.1
wheel 0.36.2

@jieruyao49 jieruyao49 added the question Further information is requested label Apr 12, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Apr 12, 2021

👋 Hello @jieruyao49, thank you for your interest in 🚀 YOLOv5! Please visit our ⭐️ Tutorials to get started, where you can find quickstart guides for simple tasks like Custom Data Training all the way to advanced concepts like Hyperparameter Evolution.

If this is a 🐛 Bug Report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you.

If this is a custom training ❓ Question, please provide as much information as possible, including dataset images, training logs, screenshots, and a public link to online W&B logging if available.

For business inquiries or professional support requests please visit https://www.ultralytics.com or email Glenn Jocher at glenn.jocher@ultralytics.com.

Requirements

Python 3.8 or later with all requirements.txt dependencies installed, including torch>=1.7. To install run:

$ pip install -r requirements.txt

Environments

YOLOv5 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):

Status

CI CPU testing

If this badge is green, all YOLOv5 GitHub Actions Continuous Integration (CI) tests are currently passing. CI tests verify correct operation of YOLOv5 training (train.py), testing (test.py), inference (detect.py) and export (export.py) on MacOS, Windows, and Ubuntu every 24 hours and on every commit.

@jieruyao49 jieruyao49 changed the title batch-size 64 not multiple of GPU count 9 & after GPU is set, all GPUs will be used when I set devices to 0, the train.py uses all GPUs Apr 12, 2021
@glenn-jocher
Copy link
Member

glenn-jocher commented Apr 12, 2021

@jieruyao49 this should be fixed in PR #2750 a few days ago. Please git pull or reclone and try again, thank you!

@glenn-jocher glenn-jocher added the bug Something isn't working label Apr 12, 2021
@jieruyao49
Copy link
Author

@jieruyao49 this should be fixed in PR #2750 a few days ago. Please git pull or reclone and try again, thank you!

thanks,when i download the new code, i solved it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants