Ask Your Question
0

cuda optical flow : multiple gpus

asked 2019-10-21 16:06:48 -0600

eyshi gravatar image

updated 2019-10-21 16:31:43 -0600

Can we use multiple gpus to run nvidia optical flow sdk while creating

NvidiaOpticalFlow_1_0:

in

Ptr<NvidiaOpticalFlow_1_0> nvof = NvidiaOpticalFlow_1_0::create(
        frameL.size().width, frameL.size().height, perfPreset,
        enableTemporalHints, enableExternalHints, enableCostBuffer, gpuId);

if yes, then in what format does it take multiple gpu ids for eg in list [0, 1] or dict {0, 1} or something else ?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2019-10-23 05:19:18 -0600

To use multiple GPU's you would need to create two instances of the NvidiaOpticalFlow_1_0 class and process one image on each. You cannot pass multiple GPU id's and parallelize one image over them.

I would refer to this example for a guide on how to use multiple GPU's. I would also verify that the GPU is the bottleneck in your code by using nvprof etc. and not the CPU (decoding/up-scaling) and/or data transfers between the CPU and GPU, before moving to multiple GPU's

edit flag offensive delete link more

Comments

Thanx for the details. Following this , is ot also possible to do backward forward checking with nvidiaoptical flow function in OPENCV , where it is providing flow matrix for each pair of image ?

eyshi gravatar imageeyshi ( 2019-10-23 15:31:59 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2019-10-21 16:06:48 -0600

Seen: 575 times

Last updated: Oct 23 '19