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

AttributeError: module 'torch._C' has no attribute '_cuda_setDevice' #90

Open
byungjinku opened this issue Sep 6, 2023 · 4 comments
Open

Comments

@byungjinku
Copy link

Traceback (most recent call last):
File "c:\Users\byung\Desktop\AtlasNet-master\train.py", line 14, in
torch.cuda.set_device(opt.multi_gpu[0])
File "C:\Users\byung\anaconda3\Lib\site-packages\torch\cuda_init_.py", line 350, in set_device
torch._C._cuda_setDevice(device)
^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'torch._C' has no attribute '_cuda_setDevice'

I tried to run your demo but I had this issue

@ThibaultGROUEIX
Copy link
Owner

Hi @byungjinku

Thanks for trying the demo

It looks like your torch version might not be GPU enabled from a quick google search ; pytorch/pytorch#33655 (comment)

best regards,
Thibault

@byungjinku
Copy link
Author

this code supoort only cuda 10.1 ?

we can't use on cuda 11.8?

@ThibaultGROUEIX
Copy link
Owner

No it should support both.

@byungjinku
Copy link
Author

/home/bjku/miniconda3/envs/atlasnet/lib/python3.6/site-packages/torch/cuda/init.py:104: UserWarning:
NVIDIA GeForce RTX 4080 with CUDA capability sm_89 is not compatible with the current PyTorch installation.
The current PyTorch install supports CUDA capabilities sm_37 sm_50 sm_60 sm_61 sm_70 sm_75 compute_37.
If you want to use the NVIDIA GeForce RTX 4080 GPU with PyTorch, please check the instructions at https://pytorch.org/get-started/locally/

warnings.warn(incompatible_device_warn.format(device_name, capability, " ".join(arch_list), device_name))
Jitting Chamfer 3D
Traceback (most recent call last):
File "train.py", line 16, in
import training.trainer as trainer
File "/home/bjku/AtlasNet/training/trainer.py", line 13, in
from training.trainer_loss import TrainerLoss
File "/home/bjku/AtlasNet/training/trainer_loss.py", line 2, in
import auxiliary.ChamferDistancePytorch.chamfer3D.dist_chamfer_3D as dist_chamfer_3D
File "/home/bjku/AtlasNet/auxiliary/ChamferDistancePytorch/chamfer3D/dist_chamfer_3D.py", line 15, in
"/".join(os.path.abspath(file).split('/')[:-1] + ["chamfer3D.cu"]),
File "/home/bjku/miniconda3/envs/atlasnet/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 997, in load
keep_intermediates=keep_intermediates)
File "/home/bjku/miniconda3/envs/atlasnet/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1202, in _jit_compile
with_cuda=with_cuda)
File "/home/bjku/miniconda3/envs/atlasnet/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1293, in _write_ninja_file_and_build_library
with_cuda=with_cuda)
File "/home/bjku/miniconda3/envs/atlasnet/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1635, in _write_ninja_file_to_build_library
cuda_flags = common_cflags + COMMON_NVCC_FLAGS + _get_cuda_arch_flags()
File "/home/bjku/miniconda3/envs/atlasnet/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1438, in _get_cuda_arch_flags
raise ValueError("Unknown CUDA arch ({}) or GPU not supported".format(arch))
ValueError: Unknown CUDA arch (8.9) or GPU not supported

I'tried to resoleve but i couldn't

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

2 participants