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

No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda-11.1' #19

Open
byronsit opened this issue Jul 2, 2022 · 6 comments
Open

Comments

@byronsit
Copy link

byronsit commented Jul 2, 2022

(edge36) (venv) lu@lu:~/code/EDTER-main$ python tools/test.py
No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda-11.1'
Traceback (most recent call last):
File "tools/test.py", line 142, in
main()
File "tools/test.py", line 108, in main
init_dist(args.launcher, **cfg.dist_params)
File "/home/lu/code/EDTER-main/venv/lib/python3.6/site-packages/mmcv/runner/dist_utils.py", line 20, in init_dist
_init_dist_pytorch(backend, **kwargs)
File "/home/lu/code/EDTER-main/venv/lib/python3.6/site-packages/mmcv/runner/dist_utils.py", line 33, in _init_dist_pytorch
torch.cuda.set_device(rank % num_gpus)
ZeroDivisionError: integer division or modulo by zero

我检测过了,显卡驱动什么的都是正常的,但是运行这个python tools/test.py就会显示找不到CUDA,用了两台电脑都出现这样的错误,是不是python setup.py 这个有问题?

@byronsit
Copy link
Author

byronsit commented Jul 2, 2022

python
Python 3.6.9 (default, Mar 15 2022, 13:55:28)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

import torch
torch.cuda.is_available()
True
exit()
(edge36) (venv) lu@lu:~/code/EDTER-main$

@byronsit
Copy link
Author

byronsit commented Jul 2, 2022

请问如何对自己的图片进行边缘检测,不是检测BSDS500数据集的图片

@leesureel
Copy link

我也遇到了同样的问题,训练的时候没问题,测试就有问题了,找不到GPU

@chenguilin111
Copy link

请问你后面是如何解决的呢?

@chenguilin111
Copy link

(edge36) (venv) lu@lu:~/code/EDTER-main$ python tools/test.py No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda-11.1' Traceback (most recent call last): File "tools/test.py", line 142, in main() File "tools/test.py", line 108, in main init_dist(args.launcher, **cfg.dist_params) File "/home/lu/code/EDTER-main/venv/lib/python3.6/site-packages/mmcv/runner/dist_utils.py", line 20, in init_dist _init_dist_pytorch(backend, **kwargs) File "/home/lu/code/EDTER-main/venv/lib/python3.6/site-packages/mmcv/runner/dist_utils.py", line 33, in _init_dist_pytorch torch.cuda.set_device(rank % num_gpus) ZeroDivisionError: integer division or modulo by zero

我检测过了,显卡驱动什么的都是正常的,但是运行这个python tools/test.py就会显示找不到CUDA,用了两台电脑都出现这样的错误,是不是python setup.py 这个有问题?

请问你是如何解决的呢

@MengyangPu
Copy link
Owner

我也遇到了同样的问题,训练的时候没问题,测试就有问题了,找不到GPU

找到../tools/test.py这个文件,注释掉line14-17行的代码再运行测试试一下。另外,line3强制指定了GPU,请酌情修改或注释。
../tools/test_local.py同上。

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

No branches or pull requests

4 participants