Software Archive
Read-only legacy content
17061 Discussions

Two models on NCS2 stick, same input.

brian2
Beginner
351 Views

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
Reply