prabindh / darknet

Convolutional Neural Networks
http://pjreddie.com/darknet/
Other
122 stars 46 forks source link

Multiple GPUs #51

Open bobeo opened 7 years ago

bobeo commented 7 years ago

Is there anyway to change the code to run each instance on a different GPU if I have multiple GPUs on my machine?

prabindh commented 7 years ago

Is this query - for training or inference ? For training, it should be doable as it is in the original code-base.

bobeo commented 7 years ago

No, I mean when running the detector. Thanks.

prabindh commented 7 years ago

For inference, given that we operate on only one image, it is not a focus. It can be theoretically accomplished, but not done.

bobeo commented 7 years ago

Ah I meant let's say we have to run on multiple cameras, we want to run each camera on a different GPU. I've tried to use "gpu_index" of network but it doesnt work.

prabindh commented 7 years ago

You would need to do like in below gist including the cuda API setting, refer the NOTE for the usage: https://gist.github.com/prabindh/9d0c589e2eed392822c7174dde31e7d0