-
Notifications
You must be signed in to change notification settings - Fork 62
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
Is it possible enable multithreading in deepdream function? #34
Comments
bump |
The deepdream process is inherently serialized. You have a stack of layers that the image gets fed through. The image goes into layer one, gets processed, then moves on to layer two, gets processed, gets moved to layer three, etc. You can't work on layers 1, 2, 3, and 4 simultaneously, as 4 requires the output from 3, 3 requires the output from 2, and so on. You could work on 4 different images concurrently if you wanted, but I'm not sure that is what you were getting at. If you did want to work on 4 images concurrently, given that you have 4 cores, you would want multiprocessing, not multithreading, as CPU bound threading in python is gimped due to the GIL. |
Thanks-- I implemented multiprocessing already, the problem is I run into memory constraints so it's not great. I read about an alternate caffe build that enabled multi cores, but I haven't explored it yet. On Mon, Aug 17, 2015 at 6:03 PM, ihaventkilledanybodysince1984
|
"Too bad there isn't some API that could distribute workload across GPU processors and do the same thing on CPUs depending on what was available" I'm no expert, but I believe both CUDA and OpenCL are capable of this. I believe OpenCL can even manage it by default. |
I've noticed that the actual deepdream function that does the work actually runs on a single thread. So no matter how powerful multicore processor you got, it will only use a very small portion of it.
I am a newbie in this field, can someone tell if its possible to have a multithreaded function ?
I executed htop inside the compute container and i got this... notice only core 1 is used and others are idle.
The text was updated successfully, but these errors were encountered: