darknet icon indicating copy to clipboard operation
darknet copied to clipboard

Multiple GPUs

Open bobeo opened this issue 7 years ago • 5 comments

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

bobeo avatar Nov 20 '17 09:11 bobeo

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

prabindh avatar Nov 28 '17 14:11 prabindh

No, I mean when running the detector. Thanks.

bobeo avatar Nov 28 '17 14:11 bobeo

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

prabindh avatar Nov 28 '17 15:11 prabindh

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.

bobeo avatar Nov 28 '17 21:11 bobeo

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

prabindh avatar Dec 02 '17 15:12 prabindh