Article ID: 000092648 Content Type: Error Messages Last Reviewed: 11/17/2022

Error: “Segmentation Fault” When Performing Inference with OpenVINO™ Runtime C++ API

BUILT IN - ARTICLE INTRO SECOND COMPONENT
Summary

Step to access a memory location when performing inference with OpenVINO™ Runtime C++ API

Description
  1. Created input tensor and performed inference with OpenVINO™ Runtime C++ API:
    ov::Tensor input_tensor = ov::Tensor(input_type, input_shape, &data);
    infer_request = compiled_model.create_infer_request();
    infer_request.set_input_tensor(input_tensor);
    infer_request.infer();
  2. Encountered error:
    Segmentation Fault
Resolution

Segmentation Fault occurs when a program attempts to access a memory location that is not allowed to access.

 

Change &data to data when creating input tensor.

Related Products

This article applies to 1 products