jiupinjia / stylized-neural-painting

Official Pytorch implementation of the preprint paper "Stylized Neural Painting", in CVPR 2021.
https://jiupinjia.github.io/neuralpainter/
Creative Commons Zero v1.0 Universal
1.56k stars 262 forks source link

Using Cpu instead of GPU? #28

Closed giodude12 closed 3 years ago

giodude12 commented 3 years ago

Hi, when i run the program it uses 80 percent of my cpu and almost no gpu. Renders take forever too. Is there a way that i can check to see if it's using my 2080ti? Can i force it to use my gpu? Thanks.

jiupinjia commented 3 years ago

Hi @giodude12, thanks for your feedback. Did you install your pytorch-gpu and the cuda/drivers correctly? If they are correctly installed, you should be able to use your GPU for rendering under the default setting. If the rendering takes too long, it seems that you were using CPU for computation.

To check your GPU states, you may try the following command while running the code: $nvidia-smi

Also, an alternative way is to install software like GPUZ to monitor the states of your GPU.

Please tell me whether it helps. Thanks.

xmlv commented 3 years ago

Hi, same issue with me. I got a 'true' when call torch.cuda.is_available(). and feedback after type "nvidia-smi" +-----------------------------------------------------------------------------+ | NVIDIA-SMI 456.43 Driver Version: 456.43 CUDA Version: 11.1 | |-------------------------------+----------------------+----------------------+ | GPU Name TCC/WDDM | Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | |===============================+======================+======================| | 0 Quadro T1000 WDDM | 00000000:01:00.0 Off | N/A | | N/A 43C P8 3W / N/A | 153MiB / 4096MiB | 0% Default | +-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=============================================================================| | 0 N/A N/A 1452 C+G Insufficient Permissions N/A | | 0 N/A N/A 8532 C+G ...w5n1h2txyewy\SearchUI.exe N/A | | 0 N/A N/A 10232 C+G ...bbwe\Microsoft.Photos.exe N/A | | 0 N/A N/A 11048 C+G ...es.TextInput.InputApp.exe N/A | | 0 N/A N/A 12392 C+G ...w5n1h2txyewy\SearchUI.exe N/A | | 0 N/A N/A 16768 C+G ...cw5n1h2txyewy\LockApp.exe N/A | | 0 N/A N/A 18636 C+G ...wekyb3d8bbwe\Video.UI.exe N/A | +-----------------------------------------------------------------------------+

xmlv commented 3 years ago

resolved.

jiupinjia commented 3 years ago

I'm closing this thread. Please let me know if you have any problems.