Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: avx instruction inside libopenvino_intel_npu_plugin.so leads to crash on system without AVX instruction #26715

Open
3 tasks done
LeptonWu opened this issue Sep 20, 2024 · 6 comments
Assignees
Labels
bug Something isn't working category: NPU OpenVINO NPU plugin
Milestone

Comments

@LeptonWu
Copy link

LeptonWu commented Sep 20, 2024

OpenVINO Version

2024.4.0

Operating System

Other (Please specify in description)

Device used for inference

CPU

Framework

None

Model used

No response

Issue description

By following
https://www.intel.com/content/www/us/en/developer/tools/openvino-toolkit/download.html?PACKAGE=OPENVINO_BASE&VERSION=v_2024_4_0&OP_SYSTEM=LINUX&DISTRIBUTION=PIP

install openvino 2024.4.0 in virtual env. then run this test, it crashed with illegal instruction on my pentium g4600 CPU.
dmegs shows that it's from libopenvino_intel_npu_plugin.so.

traps: pt_main_thread[34059] trap invalid opcode ip:7f5863245f57 sp:7ffd467020c0 error:0 in libopenvino_intel_npu_plugin.so[7f586322b000+1c1000]

My question is: from the plugin name it looks like it's for NPU and why it runs avx instruction when trying init it? I
don't even have NPU. If it's from cpu_plugin.so, I can somehow understand the point. Maybe we don't need to compile with avx optimazation for npu plugin? at least for the init part?

BTW, I just manually deleted the libopenvino_intel_npu_plugin.so from the disk and then the same code runs fine and can show there are 2 devices, one CPU, one GPU.

import openvino as ov

core = ov.Core()
for device in core.available_devices:
  print(device)

Step-by-step reproduction

No response

Relevant log output

No response

Issue submission checklist

  • I'm reporting an issue. It's not a question.
  • I checked the problem with the documentation, FAQ, open issues, Stack Overflow, etc., and have not found a solution.
  • There is reproducer code and related data files such as images, videos, models, etc.
@LeptonWu LeptonWu added bug Something isn't working support_request labels Sep 20, 2024
@ilya-lavrenov ilya-lavrenov added this to the 2024.5 milestone Sep 21, 2024
@kennorsdb
Copy link

I confirm I had the same problem. The workaround works as well.

@avitial avitial added the category: NPU OpenVINO NPU plugin label Sep 23, 2024
@RyanMetcalfeInt8
Copy link

Just to point out here, that many users of our OpenVINO-based Audacity plugins are regularly reporting this issue:

https://forum.audacityteam.org/t/how-to-fix-unable-to-load-the-mod-openvino-module-error/116996/

intel/openvino-plugins-ai-audacity#295

https://forum.audacityteam.org/t/cant-install-openvino-correctly-need-help-with-installation/118089/2

(and many more)

@RyanMetcalfeInt8
Copy link

By the way, this issue is also present in 2024.3.

@ilya-lavrenov
Copy link
Contributor

@dmatveev it's a regression after https://github.com/openvinotoolkit/openvino/pull/24989/files#diff-fab2995529c22d419387ce6a5a141c41cb4195f5e617f50f7281a7819d52966c
Could you please fix it?

Proper solution is to check in runtime that AVX2 is available and run function compiled with AVX2 in runtime.
You can use CPU's approach https://github.com/openvinotoolkit/openvino/blob/master/src/plugins/intel_cpu/CMakeLists.txt#L282-L288 to compile the same function for multiple instruction sets and accompanied runtime dispatching.

@dmatveev
Copy link
Contributor

dmatveev commented Oct 2, 2024

@ilya-lavrenov please see CVS-147126, it seems the issue is not related to stepping into ours hand-written AVX2 code (as it is not used during the loading), but is related to AVX2 found in std structures which may have it was the plugin was compiled with AVX2.

Anyways added E-141652

@avitial
Copy link
Contributor

avitial commented Oct 4, 2024

Ref. 154085

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working category: NPU OpenVINO NPU plugin
Projects
None yet
Development

No branches or pull requests

7 participants