Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
89 Views

OpenCV has generated an error with code -2 with message > Failed to initialize Inference Engine back

Hello all,

I am trying to build a test app using OpenCV 4.4 with OpenVINO 2020.4 but when I try to load the model I'm having the error below. I'm quite stuck on this as the search doesn't return much with this error message. Thanks in advance!

 

 

OpenCV has generated an error with code -2 with message > Failed to initialize Inference Engine backend (device = GPU): Program build failed:
> 14:31707:79: warning: use of logical '||' with constant operand
> if (
xy * X_BLOCK_SIZE + X_BLOCK_SIZE <= OUTPUT_SIZE_X * OUTPUT_SIZE_Y || (OUTPUT_SIZE_X * OUTPUT_SIZE_Y) % X_BLOCK_SIZE == 0) {
> ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~
> 14:31707:79: note: use '|' for a bitwise operation
> if (xy * X_BLOCK_SIZE + X_BLOCK_SIZE <= OUTPUT_SIZE_X * OUTPUT_SIZE_Y || (OUTPUT_SIZE_X * OUTPUT_SIZE_Y) % X_BLOCK_SIZE == 0) {
>
^~
> |
> 14:36774:47: warning: use of logical '||' with constant operand
> if (x + X_BLOCK_SIZE <= OUTPUT_SIZE_X || OUTPUT_SIZE_X % X_BLOCK_SIZE == 0
) {
> ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 14:36774:47: note: use '|' for a bitwise operation
> if (x + X_BLOCK_SIZE <= OUTPUT_SIZE_X || OUTPUT_SIZE_X % X_BLOCK_SIZE == 0) {
>
^~
> |
> 14:36777:13: error: too few elements in vector initialization (expected 8 elements, have 2)
> FUSED_OPS_VEC;
> ^
> 14:33881:2: note: expanded from macro
'FUSED_OPS_VEC'
> FUSED_OP0_ACTION_VEC
> ^
> 14:33878:59: note: expanded from macro 'FUSED_OP0_ACTION_VEC'
> dst_out = ACTIVATION_FUNC_FUSED_OP0_VEC(dst_out, (float8)(0,000000),(float8)(6,000000));
>
^
> 14:36777:13: error: too few elements in vector initialization (expected 8 elements, have 2)
> 14:33881:2: note: expanded from macro 'FUSED_OPS_VEC'
> FUSED_OP0_ACTION_VEC
> ^
> 14:33878:78: note: expan
ded from macro 'FUSED_OP0_ACTION_VEC'
> dst_out = ACTIVATION_FUNC_FUSED_OP0_VEC(dst_out, (float8)(0,000000),(float8)(6,000000));
> ^
> 14:36796:17: warning: expres
sion result unused
> FUSED_OPS_SCALAR;
> ^~~~~~~~~~~~~~~~
> 14:33910:2: note: expanded from macro 'FUSED_OPS_SCALAR'
> FUSED_OP0_ACTION_SCALAR
> ^~~~~~~~~~~~~~~~~~~~~~~
> 14:33907:68: note: expanded from mac
ro 'FUSED_OP0_ACTION_SCALAR'
> dst_i__out = ACTIVATION_FUNC_FUSED_OP0_SCALAR(dst_i__out, (float)(0,000000),(float)(6,000000));
> ^
> 14:33903:98: note: expanded from macro '
ACTIVATION_FUNC_FUSED_OP0_SCALAR'
> #define ACTIVATION_FUNC_FUSED_OP0_SCALAR(input, m, n) (ACTIVATION_FUNC_FUSED_OP0_SCALAR_MAX_FUNC(m, (ACTIVATION_FUNC_FUSED_OP0_SCALAR_MIN_FUNC(n, input))))

0 Kudos
6 Replies
Highlighted
Beginner
87 Views

0 Kudos
Highlighted
Employee
66 Views

Looks like a problem with OpenCL kernel compilation. It is impossible to say more without any details: platform, OpenCL runtime, DL-model, reproducer app.

0 Kudos
Highlighted
Beginner
61 Views

Hi Maksim,

Thanks a lot for your response. Here are some more details. I attached the outputs of following commands on my Ubuntu 18.04.5 LTS (Bionic Beaver) system.

  • clinfo
  • lshw -c display

Reproducer app is just doing

    1) cv::dnn::readNetFromModelOptimizer

    2) enableFusion(true)

    3) setPreferableBackend(DNN_BACKEND_INFERENCE_ENGINE)

    4) setPreferableTarget(DNN_TARGET_OPENCL);

    5) forward()

and it's crashing at the forward() step, i.e. the first inference where I guess it initiates the OpenCL compilation.

Model is the one from the OpenVINO repository, person-detection-0102, the FP32 version.

Since I don't have any idea on what might be going wrong, could you point me to possible reasons of this? Driver? Memory? Possible clash of library linkage?

Thanks a lot!

 

0 Kudos
Highlighted
Employee
54 Views

It needs more investigation, but for now I can say that "readNetFromModelOptimizer" passes network directly to InferenceEngine and is mostly equivalent to direct usage of InferenceEngine. "enableFusion" should not affect it. Did you try to execute this model with one of native InferenceEngine samples or demos? Maybe this one: https://docs.openvinotoolkit.org/2020.4/openvino_inference_engine_samples_object_detection_sample_ss...?

0 Kudos
Highlighted
Moderator
12 Views

Greetings,


Intel will no longer monitor this thread since we have provided a solution. If you need any additional information from Intel, please submit a new question.


Sincerely,

Iffa


0 Kudos
Highlighted
Beginner
7 Views

Hi Maksim,

Thanks a lot for the response. After a few days of tests it disappeared even though we were using the same OS image on the same machine. So I still don't know what the problem was and I can reproduce. I'll consider it case closed.

Thanks again. Have a great day.

0 Kudos