openvinotoolkit / openvino

OpenVINO™ is an open-source toolkit for optimizing and deploying AI inference
https://docs.openvino.ai
Apache License 2.0
6.88k stars 2.19k forks source link

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

Open LeptonWu opened 2 days ago

LeptonWu commented 2 days ago

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

kennorsdb commented 14 hours ago

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