Hey, I am really impressed with the intuitiveness of Pytorch’s both Python and C++ apis and want to use it at work where we mainly do C++ development, but I am struggling to get the GAN demo going because of a weird issue.
.Setup : FastAI Paperspace Ubuntu instance with all the latest version of pytorch.
When I open up the Python interperter and run torch.cuda.is_available() -> TRUE
Are you able to run the DCGAN example on the GPU or is it using your CPU?
I just cloned your repo and tried to run it.
It looks like my GPU was detected:
Number of colour channels: 4
Running on device: cuda
However, I get an error after these lines:
terminate called after throwing an instance of 'c10::Error'
what(): Error opening images file at ./mnist/train-images-idx3-ubyte (read_images at /pytorch/torch/csrc/api/src/data/datasets/mnist.cpp:66)
frame #0: std::function<std::string ()>::operator()() const + 0x11 (0x7fa06a35bb91 in /home/pbialecki/libs/libtorch_nightly/libtorch/lib/libc10.so)
Hey, thank you so much for the quick reply I have literally been biting my nails
I always get “Running on device: cpu” and that is on a machine that is giving me TRUE when I run cuda.is_available() from python interpreter AND also is recognized by running nvidia-smi. It seems I have everything setup but the application just doesn’t pick up that I have cuda installed :?
Let me know if you need any screenshots/info/output whatever… I have been struggling to get this running for a week now.
:X … I am planning on decomissioning my machine and requesting a new one to set up from scratch. Do you mind sharing the resource from which you setup your environment, because it seems the issue is with the linking on the libraries I think…
Thanks again for your time and for the quick responses I am desperate at this point.
Your Python install is not really related to this issue in libtorch.
E.g. I used my base conda environment without PyTorch installed, and could successfully build the C++ example.
Have you built PyTorch from source before?
If so, did you see any issues?
Maybe Peter Goldsborough (one of the PyTorch core devs) will have any idea about this specific issue. CC @goldsborough
Sorry to bother you again with this, but I have just got a completely new and clean machine and want to follow the steps of installing
Conda.
Pytorch from source (as you mentioned)
Do you mind providing me with resource links where I can follow the procedure you did, since I can find 50 different ones online and am nos sure which one of them will work out.
Yes I can create and run anything I want with through Python and it is working like charm, but when I run the example GAN C++ project I get false for cuda::is_available()…
That is so bizarre I have tried multiple environments with multiple versions of Cuda / Cudnn / Torch on multiple machines - they ALL work fine with Python installs and not with C++…