Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
18 Views

Two models on NCS2 stick, same input.

edit: I will try to repost this in openvino forum. Where its seems more appropriate ..

Hello.

I have two models loaded onto one myriad Movidius2 device (on a usb stick).

Both models have the same input.

Can I supply the input once? 

Now I make two nets, A and B, and assigns the same data twice, and transfers the same data twice to the usb;

executable_networkA =  core.LoadNetwork(networkA, device_name);
executable_networkB =  core.LoadNetwork(networkB, device_name);

infer_requestA = executable_networkA.CreateInferRequest();
infer_requestB = executable_networkB.CreateInferRequest();

input_blobA = infer_requestA.GetBlob(networkA.getInputsInfo().begin()->first);
input_blobB = infer_requestB.GetBlob(networkB.getInputsInfo().begin()->first);

auto *dataA = input_blobA->buffer().as<PrecisionTrait<Precision::FP16>::value_type *>();
auto *dataB = input_blobB->buffer().as<PrecisionTrait<Precision::FP16>::value_type *>();

dataA[..] = data;
dataB[..] = data;

 

Is it possible to have input_blobB to point to the internal (on the usb/vpu) memory assigned to input_blobA?

And thereby only transfer the input data once?

0 Kudos
0 Replies