No CUDA runtime is found, using CUDA_HOME=‘/usr/local/cuda-10.0‘

今天在使用pytorch 跑pointnet++的时候,出现了下面的问题:

No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda-10.0'
/home/eric/anaconda3/lib/python3.6/site-packages/pointnet2_ops/pointnet2_utils.py:15: UserWarning: Unable to load pointnet2_ops cpp extension. JIT Compiling.
  warnings.warn("Unable to load pointnet2_ops cpp extension. JIT Compiling.")
Traceback (most recent call last):
  File "pointnet2/train.py", line 61, in <module>
    main()
  File "/home/eric/anaconda3/lib/python3.6/site-packages/hydra/main.py", line 24, in decorated_main
    strict=strict,
  File "/home/eric/anaconda3/lib/python3.6/site-packages/hydra/_internal/utils.py", line 174, in run_hydra
    overrides=args.overrides,
  File "/home/eric/anaconda3/lib/python3.6/site-packages/hydra/_internal/hydra.py", line 86, in run
    job_subdir_key=None,
  File "/home/eric/anaconda3/lib/python3.6/site-packages/hydra/plugins/common/utils.py", line 109, in run_job
    ret.return_value = task_function(task_cfg)
  File "pointnet2/train.py", line 54, in main
    distributed_backend=cfg.distrib_backend,
  File "/home/eric/anaconda3/lib/python3.6/site-packages/pytorch_lightning/trainer/trainer.py", line 438, in __init__
    self.data_parallel_device_ids = parse_gpu_ids(self.gpus)
  File "/home/eric/anaconda3/lib/python3.6/site-packages/pytorch_lightning/trainer/distrib_parts.py", line 712, in parse_gpu_ids
    gpus = sanitize_gpu_ids(gpus)
  File "/home/eric/anaconda3/lib/python3.6/site-packages/pytorch_lightning/trainer/distrib_parts.py", line 678, in sanitize_gpu_ids
    """)
pytorch_lightning.utilities.exceptions.MisconfigurationException: 
                You requested GPUs: [0]
                But your machine only has: []
            
➜  Pointnet2_PyTorch git:(master) ✗ python pointnet2/train.py task=cls
/home/eric/anaconda3/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
/home/eric/anaconda3/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/home/eric/anaconda3/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
/home/eric/anaconda3/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/home/eric/anaconda3/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
/home/eric/anaconda3/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda-10.0'
/home/eric/anaconda3/lib/python3.6/site-packages/pointnet2_ops/pointnet2_utils.py:15: UserWarning: Unable to load pointnet2_ops cpp extension. JIT Compiling.
  warnings.warn("Unable to load pointnet2_ops cpp extension. JIT Compiling.")
Traceback (most recent call last):
  File "pointnet2/train.py", line 61, in <module>
    main()
  File "/home/eric/anaconda3/lib/python3.6/site-packages/hydra/main.py", line 24, in decorated_main
    strict=strict,
  File "/home/eric/anaconda3/lib/python3.6/site-packages/hydra/_internal/utils.py", line 174, in run_hydra
    overrides=args.overrides,
  File "/home/eric/anaconda3/lib/python3.6/site-packages/hydra/_internal/hydra.py", line 86, in run
    job_subdir_key=None,
  File "/home/eric/anaconda3/lib/python3.6/site-packages/hydra/plugins/common/utils.py", line 109, in run_job
    ret.return_value = task_function(task_cfg)
  File "pointnet2/train.py", line 54, in main
    distributed_backend=cfg.distrib_backend,
  File "/home/eric/anaconda3/lib/python3.6/site-packages/pytorch_lightning/trainer/trainer.py", line 438, in __init__
    self.data_parallel_device_ids = parse_gpu_ids(self.gpus)
  File "/home/eric/anaconda3/lib/python3.6/site-packages/pytorch_lightning/trainer/distrib_parts.py", line 712, in parse_gpu_ids
    gpus = sanitize_gpu_ids(gpus)
  File "/home/eric/anaconda3/lib/python3.6/site-packages/pytorch_lightning/trainer/distrib_parts.py", line 678, in sanitize_gpu_ids
    """)
pytorch_lightning.utilities.exceptions.MisconfigurationException: 
                You requested GPUs: [0]
                But your machine only has: []

解决方法

把原来的torch卸载了,然后安装:

pip install torchvision==0.5

参考文献

[1].FCOS出现No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda-10.0'. https://blog.youkuaiyun.com/qq_44814641/article/details/103683842

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

农民小飞侠

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值