Article ID: 000089266 Content Type: Troubleshooting Last Reviewed: 09/08/2022

Unable to Accelerate Inferencing Time When Inferencing with Two Intel® Neural Compute Stick 2 (NCS2s) Using MULTI Plugin

BUILT IN - ARTICLE INTRO SECOND COMPONENT
Summary

Best way to infer model with two NCS2s using MULTI plugin

Description
  • Inferenced custom YOLOv4 model with two NCS2s using MULTI plugin, MULTI:MYRIAD.3.1-ma2480,MYRIAD.3.3-ma2480.
  • The inferencing time didn't accelerate.
Resolution

The best way to use Multi plugin with multiple NCS2s is to configure each NCS2 and create the Multi-Device on top.

from openvino.inference_engine import IECore

ie = IECore()

myriad1_config = {}
myriad2_config = {}
ie.set_config(config=myriad1_config, device_name="MYRIAD.3.1-ma2480")
ie.set_config(config=myriad2_config, device_name="MYRIAD.3.3-ma2480")
# Load the network to the multi-device, specifying the priorities
exec_net = ie.load_network(
network=net, device_name="MULTI", config={"MULTI_DEVICE_PRIORITIES": "MYRIAD.3.1-ma2480,MYRIAD.3.3-ma2480"}
)
# Query the optimal number of requests

#Use -nireq 10 to get maximum FPS.
nireq = exec_net.get_metric("OPTIMAL_NUMBER_OF_INFER_REQUESTS")

Related Products

This article applies to 2 products