Hi
I am trying to run opennmt from anaconda prompt using GPU. I am trying to run the code -
python train.py -data data/demo -save_model data/demo-model --train_from data/demo-model_step_50000.pt --save_checkpoint_steps 5000 --train_steps 90000 --world_size 1 --gpu_ranks 0
But I am getting the error - AttributeError: module 'torch._C' has no attribute '_cuda_setDevice'
This code is running fine when I am running using CPU
My OS is Windows 10 64 bit and my graphix card is NVIDIA GeForece GTX 1050. I am using CUDA 10.0 and Anaconda 3,
Could you please help me
Neither of those mentioned issues solve the problem. #360 is in reference to something really old and #267 is a reference to configuring something to run on a mac cpu.
I got this error when I inadvertently downgraded pytorch to a CPU-only version (by conda installing some other packages).
Should be verifiable via:
>>> torch.cuda.is_available()
False
My fix was reinstalling pytorch/torchvision to these pinned versions:
conda install pytorch=1.3.1 torchvision=0.4.2 -c pytorch
, which showed the CPU-only version was in fact installed:
The following packages will be SUPERSEDED by a higher-priority channel:
pytorch pkgs/main::pytorch-1.3.1-cpu_py37h62f~ --> pytorch::pytorch-1.3.1-py3.7_cuda10.1.243_cudnn7.6.3_0
torchvision pkgs/main::torchvision-0.4.2-cpu_py37~ --> pytorch::torchvision-0.4.2-py37_cu101
Most helpful comment
I got this error when I inadvertently downgraded pytorch to a CPU-only version (by conda installing some other packages).
Should be verifiable via:
My fix was reinstalling pytorch/torchvision to these pinned versions:
, which showed the CPU-only version was in fact installed: