Intel® Distribution of OpenVINO™ Toolkit
Community support and discussions about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all things computer vision-related on Intel® platforms.
6062 Discussions

Failed to initialize Inference Engine backend: Unsupported primitive of type


I was importing face-detection-adas-0001 pretrained model. Previously i had used emotion detection model, it was working fine. But in that model, it gave error like this

Failed to initialize Inference Engine backend: Unsupported primitive of type
I found github link which is solving problem


I have done all two steps all were working fine in Developer command prompt for vs 2019. But when i came to third command

"C:\Program Files\CMake\bin\cmake.exe" ^ -G "Visual Studio 14 Win64" ^ "C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\inference_engine\samples"


It gave error and errors 

1) Error was telling vs instance not found, but it solved when i used developer prompt

2) Get error, that i was unable to solve, 

(base) C:\Users\ra\build>"C:\Program Files\CMake\bin\cmake.exe" ^
More?   -G "Visual Studio 14 Win64" ^
More?    "C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\inferenc
CMake Error at CMakeLists.txt:7 (project):
  Failed to run MSBuild command:

    C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe

  to get the value of VCTargetsPath:

    Microsoft (R) Build Engine version 14.0.25420.1
    Copyright (C) Microsoft Corporation. All rights reserved.

    Build started 2/10/2020 8:41:16 AM.
    Project "C:\Users\ra\build\CMakeFiles\3.16.4\VCTargetsPath.vcxproj" on node
1 (default targets).
    C:\Users\ra\build\CMakeFiles\3.16.4\VCTargetsPath.vcxproj(14,2): error MSB40
19: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2019\Co
mmunity\MSBuild\Microsoft\VC\v160\Microsoft.Cpp.Default.props" was not found. Co
nfirm that the path in the <Import> declaration is correct, and that the file ex
ists on disk.
    Done Building Project "C:\Users\ra\build\CMakeFiles\3.16.4\VCTargetsPath.vcx
proj" (default targets) -- FAILED.

    Build FAILED.

    "C:\Users\ra\build\CMakeFiles\3.16.4\VCTargetsPath.vcxproj" (default target)
 (1) ->
      C:\Users\ra\build\CMakeFiles\3.16.4\VCTargetsPath.vcxproj(14,2): error MSB
4019: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2019\
Community\MSBuild\Microsoft\VC\v160\Microsoft.Cpp.Default.props" was not found.
Confirm that the path in the <Import> declaration is correct, and that the file
exists on disk.

        0 Warning(s)
        1 Error(s)

    Time Elapsed 00:00:05.24

  Exit code: 1

-- Configuring incomplete, errors occurred!
See also "C:/Users/ra/build/CMakeFiles/CMakeOutput.log".

(base) C:\Users\ra\build>


I found this error answer in stack overflow , but again it is not solved,


I had tried all version of visual studio but all failing , some telling generator failed some telling like in error 2. :(

Help me!

0 Kudos
5 Replies

Hi paudel, Rajan,

Please provide more details about your setup (OpenVINO version, VS Studio version (w/MSBuild and C++?), CMake, Python, etc.), and any information on how you are loading the pre-trained models. Are you using a sample script or writing your own program? Which plugin are you loading the model on (i.e. CPU, GPU, MYRIAD, etc.). Anything that would help us reproduce the issue would be great.




Hi @Luis, I was running the model: Face-detection-adas-001 and also that demo_squeezenet_download_convert_run.bat from installation procedures my code is # -*- coding: utf-8 -*- import argparse import os from openvino.inference_engine import IENetwork, IECore CPU_EXTENSION ="C:/Program Files (x86)/IntelSWTools/openvino/deployment_tools/inference_engine/lib/intel64" def get_args(): parser = argparse.ArgumentParser("Load an IR into the Inference Engine") #descriptions of the arguments m_desc = "Location of the xml file" #create arguments parser.add_argument('-m', help=m_desc) args = parser.parse_args() return args def load_to_IE(model_xml): ##load the inference engine api plugin = IECore() #Load IR files into their related class model_bin = os.path.splitext(model_xml)[0] + '.bin' net = IENetwork(model=model_xml, weights=model_bin) # ### Add a CPU extension, if applicable. # plugin.add_extension(CPU_EXTENSION, "CPU") # ### Get the supported layers of the network # supported_layers = plugin.query_network(network=net, device_name="CPU") # ### Check for any unsupported layers, and let the user # ### know if anything is missing. Exit the program, if so. # unsupported_layers = [l for l in net.layers.keys() if l not in supported_layers] # if len(unsupported_layers) != 0: # print("Unsupported layers found: {}".format(unsupported_layers)) # print("Check whether extensions are available to add to IECore.") # exit(1) #load the network in the inference engine plugin.load_network(net, "CPU") print("IR loaded successfully") return load_to_IE('C:\\Users\\ra\\Desktop\\projects\\Entertainment\\age-gender-face-detection-project\\models\\face-detection-adas-0001\\FP16\\face-detection-adas-0001.xml') def main(): args = get_args() load_to_IE(args.m) if __name__ == '__main__': main() While running thrown error Traceback (most recent call last): File "", line 50, in load_to_IE('C:\\Users\\ra\\Desktop\\projects\\Entertainment\\age-gender-face -detection-project\\models\\face-detection-adas-0001\\FP16\\face-detection-adas- 0001.xml') File "", line 45, in load_to_IE plugin.load_network(net, "CPU") File "ie_api.pyx", line 134, in openvino.inference_engine.ie_api.IECore.load_n etwork File "ie_api.pyx", line 141, in openvino.inference_engine.ie_api.IECore.load_n etwork RuntimeError: Failed to create plugin C:\Program Files (x86)\IntelSWTools\openvi no\deployment_tools\inference_engine\bin\intel64\Release\MKLDNNPlugin.dll for de vice CPU Please, check your environment Cannot load library 'C:\Program Files (x86)\IntelSWTools\openvino\deployment_too ls\inference_engine\bin\intel64\Release\MKLDNNPlugin.dll': 3221225501 from cwd: C:\Users\ra\Desktop\projects\Entertainment\age-gender-face-detection-project\han dling_inference , I ran other models such as emotion detection , it was working successfully. Then i uninstalled and reinstalled latest version openvino and again ran same error, Then i ran demo_squeezenet_download_convert_run.bat from demo, It give error saying Waiting for 0 seconds, press a key to continue ... Creating Visual Studio 15 2017 x64 files in C:\Users\ra\Documents\Intel\Open \inference_engine_samples_build... CMake Error at CMakeLists.txt:7 (project): Generator Visual Studio 15 2017 could not find any instance of Visual Studio. -- Configuring incomplete, errors occurred! See also "C:/Users/ra/Documents/Intel/OpenVINO/inference_engine_samples_buil akeFiles/CMakeOutput.log". Error Because of problem i uninstalled 2019 VS studio and reinstalled 2017 version, Even it is not working my versions are listed below: cmake: 3.15 visual studio: 2017 openvino: 2020.1 (latest version now) Errors hills are coming into my productivity , help me errors that i got are 1) Unable to find VS instance for visual studio 2)failed to create plugin MKLDNNPlugin.dll 3) Failed to initialze inference engine ( This error i was getting was yesterday in old 2019.1 version, i corrected it now another problem) Found that recently , we dont have to specify the cpu version so this problem didnt solved in my openvino Please, help me. I can provide remote desktop, Its an emergency. :( MSbuild: 15.0 My cpu dont support avx, i am running Intel i3 m380 python: 3.6 windows: 7 arch: amd64 plugin: "CPU" :( Thanks for helping

Thanks for the info, based on the details you have provided I see you are using Windows 7 which is not a supported platform by the tool. With that in mind, there may be some underlying issues that we don't know.

I'd suggest to make sure your installations of Visual Studio include both Desktop development with C++, and MSBuild which looks like you have. I would strongly suggest to verify your installation with the demo scripts prior to use your program. 




I have already downloaded desktop enviroment with c++ for visual studio 15 2017. for MSBuild , i had already downloaded bundle tools of c++ and also checked that MSBuild  is available,

Weeks passed problem has not been solved.  .
Before older version of openvino says RuntimeError: unsupported primitive of type: PriorBox name: fc7_mbox_priorbox , After new installation 2020.1 , where there is no cpu extension specific,
Giving another error RuntimeError: Failed to create plugin MKLDNNPlugin.dll for device CPU . Before that , while running demo in windows installation throws error at importing demo bat file saying "
could not find any instance of Visual Studio 15 2017."
But i have properly installed many times visual studio 2017 , also 2019. Nothing working, 

How could you help me


I don't have access to Windows 7, and unfortunately this is not a platform that is supported by the toolkit. Also looking at the particular CPU you have (Intel i3 m380) its a legacy processor, this doesn't meet the Hardware requirements (6th-10th Generation Intel® Core™ processors). 

I don't have anything else to suggest besides:

  • Initialize environment variables (setupvars.bat) prior to running the demo (or permanently set them as mentioned in doc)
  • Install all SW dependencies and add them to PATH (Python* & CMake 3.4 or higher 64-bit, unless using VS2019 CMake 3.14 is required)
  • Remove/rename any samples/demos build folders in Documents (C:\Users\ra\Documents\Intel\Open\inference_engine_samples_build)
  • Re-install Visual Studio* 2017 (reboot once that is completed) with both components previously mentioned
  • When building the demos/samples specify the Visual Studio* version: 
"C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\inference_engine\demos\build_demos_msvc.bat" VS2017

If the issue persists its most likely due to the usage of an unsupported Operating System and a legacy CPU. Please take a look at the requirements for Windows* here.