Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.

What is the proper way to detect OpenVino devices (particularly CPU and VPU) in 2019 in Linux and in Windows?

New Contributor I

Hi Intel team,

In OpenVino 2018 we used mkldnn_engine_create/mkldnn_engine_destroy APIs of to check Intel CPU presence and ncDeviceCreate/ncDeviceDestroy API of to check VPU devices presence.

In OpenVino 2019 these APIs are missing for outside usage.

So What is the proper way now to detect OpenVino devices (particularly CPU and VPU) in 2019 in Linux and in Windows?

P.S. The API CreatePluginEngine of e.g. can't be used actually for this purpose. It's always ok, even if there is no VPU attached to USB.

0 Kudos
3 Replies

Dear om77:

Please study this code :

In particular, look at the code snippet below:

ExecutableNetworkInternal::Ptr clDNNEngine::LoadExeNetworkImpl(InferenceEngine::ICNNNetwork &network,
                                                               const std::map<std::string, std::string> &config) {
    auto specifiedDevice = network.getTargetDevice();
    auto supportedDevice = InferenceEngine::TargetDevice::eGPU;
    if (specifiedDevice != InferenceEngine::TargetDevice::eDefault && specifiedDevice != supportedDevice) {
        THROW_IE_EXCEPTION << "The plugin doesn't support target device: " << getDeviceName(specifiedDevice) << ".\n" <<
                           "Supported target device: " << getDeviceName(supportedDevice);


If specifiedDevice doesn't have the correct device, then the device is not found.

Hope it helps !

Thanks for using OpenVino !


0 Kudos
New Contributor I

Hi Shubha,

thank you for reply!

I can't check your solution for GPU mode actually since can't change this hardware on my laptop :)

For GPU mode we perform sanity check through (API clGetPlatformInfo, clGetPlatformIDs) and checking e.g. vendor "intel".


I tried your approach for VPU (Myriad) and it's not working so far. Looks like something other should be done.

For VPU mode actually my target here is to remove these lines from runtime log:


in the case of unplugged Myriad.

The lines above are part of std::exception x.what() which is triggered during LoadNetwork in the case of missing VPU (Myriad).

The full description of exception includes "Can not init USB device: NC_DEVICE_NOT_FOUND" before.

So again to be short :)

How the missing VPU device can be checked before LoadNetwork in 2019 with


0 Kudos

Dearest om77,

The API improvement discussions are going on as we speak. But in the meantime, you can try this (check response of LoadNetwork):

If LoadNetwork fails, then that's a good indicator that your device is not being detected. LoadNetwork will give an error.

Hope it helps,


0 Kudos