Summary
Steps to properly link OpenVINO with Visual Studio (VS) and correctly format the "ie_infer_request_set_blob" function
Description
- Loaded an Intermediate Representation (IR) using OpenVINO C API by referring to Hello Classification C Sample.
- Received status as -1 (General Error) when using ie_infer_request_set_blob function.
Resolution
The issue is related to the MKLDNN plugin which usually happens when the OpenVINO environment is not set up properly. Automate the OpenVINO setupvars.bat by creating a batch file as follow:
- Write the script below in the .bat file:
@echo on
cd <OpenVINO location>\bin
CALL setupvars.bat
cd <Microsoft Visual Studio location>\2019\Community\Common7\IDE
CALL devenv.exe
- Run the .bat file as administrator
- After the VS2019 opens, select Hello Query Device Python Sample from OpenVINO folder
- Create backup file if necessary
- Set Hello Query Device Python Sample as startup item
- Run the sample application
Use these suggested method as written in Inference Engine C* API:
- IEStatusCode ie_infer_request_set_blob(ie_infer_request_t *infer_request, ie_blob_t *blob)
- Description: Sets the blob in a inference request.
- Parameters:
- infer_request : A pointer to ie_infer_request_t instance.
- blob: A pointer to ie_blob_t instance.
- Return value: Status code of the operation: OK(0) for success.