manuelruder / artistic-videos

Torch implementation for the paper "Artistic style transfer for videos"
Other
1.75k stars 252 forks source link

How can I confirm I'm using GPU/CUDA? #28

Open samyk opened 8 years ago

samyk commented 8 years ago

I've been running th artistic_video.lua -backend cudnn for about 30 minutes now and it's still going. I installed cudnn and cudnn.torch so assume it's being used but am not sure. Luajit is taking 100% CPU of one of my cores but I'd like to verify that I am in fact using the GPU and not just CPU in this case.

Is there a trivial way to determine this?

Thanks!

ghost commented 8 years ago

Hey, (hoping to alleviate some qa from the dev)

Pretty sure the script is calculating the flow right now, check the directory where your script is and you should see forward and backward files showing what frame its on right now. Takes soooo long to do the deepflow calculations.

samyk commented 8 years ago

I see, thanks, however is there a way to determine whether GPU or CPU is being used? I assume it will be slow either way :)

ghost commented 8 years ago

the cudnn flag should make it use the gpu cudnn library. However, you'll have to look at the script to see if it checks for the cudnn library before it starts the flow calculations.

I like to comment out the part after the flow and make sure those files are done. Then afterwards I'll play with the stylize part. I like to do that to make sure the first few images look ok and see what the run times and memory bounds are of the gpu part, not to mention path issues with cudnn and whatnot.

edit: the nice part btw is that once the deepflow calculations are done, you can reuse them again for different styles