Closed Bleach665 closed 4 years ago
@Bleach665, Try to rebuild OpenVINO from source - CPU features should be detected automatically.
Extension lib is no longer provided by OpenVINO binary and you don't need to provide it. All layers were moved to CPU (MKLDNN) plugin to increase out of the box coverage of the topologies. Can you describe setup that you have? e.g. do you continue using extension lib or just rely on distribution?
@dkurt. Previously, from time to time I tried to build Inference engine from sources, but there was always some error on one or several platforms (Win, Linux, Mac). Therefore, it was easier to use prebuilt lib from OpenVINO. Now I will probably do as you wrote - to build from sources.
@yury-gorbachev. I just built demos, and use prebuilt lib from distribution.
UPD. In previous version OpenVINO (<2020) to use with SSE CPU it was necessary to rename cpu_extension_avx2. to cpu_extension.. Cpu_extension was provided in
../OpenVINO/openvino/deployment_tools/inference_engine/bin/intel64/{Configuration}
or was built from
.../OpenVINO/openvino/deployment_tools/inference_engine/samples/ie_cpu_extension
Nevertheless, look like that now easiest solution is fix issues and build inference engine from sources.
@Bleach665 true, but I'm wondering why you're experiencing problems now when extension lib is not longer needed. Things should be simpler at least in theory.
In my case seems like the problem is that prebuilt lib in OpenVINO distribution are built with AXV baseline. Unfortunately I can't check this, because don't have a pc with a processor with AVX in touch.
Failed to create plugin [my path to]\MKLDNNPlugin.dll for device CPU
There are several lines in this error message. So you should dump all of them.
IMHO, This message has zero correlation with "cpu_extension" file. Check your environment settings (like message says), especially PATH variable.
{Configuration}
Start investigation from "Release" configuration.
You should see the same "Release" in your [my path to]
. Mess of Debug/Release would not work.
Additionally, you can investigate libraries loading attempts with help of Process Monitor.
This means that CPU without AVX instruction set will no longer be supported by OpenVINO inference engine
Check system requirements section - at least, Atom CPUs are still here.
There are several lines in this error message. So you should dump all of them.
Full command and output:
security_barrier_camera_demo.exe -i car_1.bmp -m "C:\Users\bleach\Documents\Intel\OpenVINO\openvino_models\ir\FP32\Security\object_detection\barrier\0106\dldt\vehicle-license-plate-detection-barrier-0106.xml" -m_va "C:\Users\bleach\Documents\Intel\OpenVINO\openvino_models\ir\FP32\Security\object_attributes\vehicle\resnet10_update_1\dldt\vehicle-attributes-recognition-barrier-0039.xml" -m_lpr "C:\Users\bleach\Documents\Intel\OpenVINO\openvino_models\ir\FP32\Security\optical_character_recognition\license_plate\dldt\license-plate-recognition-barrier-0001.xml" -d CPU -d_va CPU -d_lpr CPU
[ INFO ] InferenceEngine: 00007FFC273DB740
[ INFO ] Files were added: 1
[ INFO ] car_1.bmp
[ INFO ] Loading device CPU
[ ERROR ] Failed to create plugin e:\Lib_prebuild\OpenVINO2020\TestIE2020\MKLDNNPlugin.dll for device CPU
Please, check your environment
Cannot load library 'e:\Lib_prebuild\OpenVINO2020\TestIE2020\MKLDNNPlugin.dll': 1114 from cwd: e:\Lib_prebuild\OpenVINO2020\TestIE2020
Check your environment settings (like message says), especially PATH variable.
For this test, I
-renamed the folder with my libraries where environment variable PATH point to
-put demo exe, all Release dll, opencv dll (from OpenVINO distribution) tbb, ngraph to one folder to prevent build configuration and dll version mixture.
The list of this directory:
In the near future I will try to reproduce this on a clean virtual machine.
1114
It is GetLastError()
result and it means ERROR_DLL_INIT_FAILED.
BTW, do you have installed some version of Intel compiler runtime? (setupvars
should warn if it is missing)
Intel compiler runtime not installed now, but as far as I remember it was installed earlier. setupvars does not produce any warn:
setupvars.bat
Python 3.7.6
ECHO is off.
PYTHONPATH=e:\Lib_prebuild\OpenVINO2020\openvino_2020.1.033\deployment_tools\open_model_zoo\tools\accuracy_checker;e:\Lib_prebuild\OpenVINO2020\openvino_2020.1.033\python\python3.7;e:\Lib_prebuild\OpenVINO2020\openvino_2020.1.033\python\python3;e:\Lib_prebuild\OpenVINO2020\openvino_2020.1.033\deployment_tools\model_optimizer;
[setupvars.bat] OpenVINO environment initialized
Result of test on clean virtual machine: VBox used; OS windows10_x64_1909; host PC CPU - 2 x x5660 Xeon. Install:
Open console, run c:\Program Files (x86)\IntelSWTools\openvino\bin\setupvars.bat
.
After run demo_security_barrier_camera.bat
from
C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\demo
Final output:
"C:\Users\Bel\Documents\Intel\OpenVINO\inference_engine_demos_build\intel64\Release\security_barrier_camera_demo.exe" -i "c:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\demo\car_1.bmp" -m "C:\Users\Bel\Documents\Intel\OpenVINO\openvino_models\ir\intel\vehicle-license-plate-detection-barrier-0106\FP16\vehicle-license-plate-detection-barrier-0106.xml" -m_lpr "C:\Users\Bel\Documents\Intel\OpenVINO\openvino_models\ir\intel\license-plate-recognition-barrier-0001\FP16\license-plate-recognition-barrier-0001.xml" -m_va "C:\Users\Bel\Documents\Intel\OpenVINO\openvino_models\ir\intel\vehicle-attributes-recognition-barrier-0039\FP16\vehicle-attributes-recognition-barrier-0039.xml" -d CPU -d_va CPU -d_lpr CPU
[ INFO ] InferenceEngine: 00007FFCBE98B740
[ INFO ] Files were added: 1
[ INFO ] c:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\demo\car_1.bmp
[ INFO ] Loading device CPU
[ ERROR ] Failed to create plugin c:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\inference_engine\bin\intel64\Release\MKLDNNPlugin.dll for device CPU
Please, check your environment
Cannot load library 'c:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\inference_engine\bin\intel64\Release\MKLDNNPlugin.dll': 1114 from cwd: C:\Users\Bel\Documents\Intel\OpenVINO\inference_engine_demos_build\intel64\Release
Error
Also install_prerequisites.bat terminated with errors:
Thank you for double check and detailed steps!
I tested Win10 under QEMU/KVM with Westmere CPU emulation (without AVX/AVX2). I'm observing the same error message.
Windbg shows "illegal instruction" error with AVX command:
MKLDNNPlugin+0x9746d:
00007ffa`dbad746d c5fdefc0 vpxor ymm0,ymm0,ymm0
There are no debug symbols, so CreatePluginEngine
symbol misleading here.
MKLDNN plugin is crashed during initialization of global variables (initterm
) before DllMain() call.
Looks like some code near cpuid
instruction was compiled with incorrect flags.
Similar illegal instruction can be observed using Intel® Software Development Emulator (SDE) on any Windows machine (using -wsm
platform parameter).
Looks like it is Windows-specific problem. Linux binaries passes SDE check.
/cc @ilya-lavrenov
I can't suggest work around to bypass this problem.
Try to build and use DLDT from sources from here: https://github.com/opencv/dldt/tree/2020.1 (see build-instruction.md
file)
Just want to chime in -- seeing the same behavior. Previous releases (2019) work on a i5-3470 machine, while 2020R1 fails (but does work on newer CPUs). From the library loading perspective, I see both versions look for (and fail to find) libmalloc.dll, but in case of success lookup of tbbmalloc.dll is then successfully performed. In case of failure it never happens.
Any updates on this, guys? Is there a workaround, or waiting for the next release is the only way (and will the next release fix this)?
@Bleach665 I'm also facing the very same issue, linking against the debug libraries (MKLDNNPlugin**d**.dll
, the likes) work for me (kind of W/A)
UPD. Everything written below was tested on a CPU without AVX support. Same issue with DLDT built from source. DLDT rev. a347375d0188b58056887f382161c6ed6fc3dcb3, Windows 10, CMake GUI 3.17.0, VS 2017 15.9.21. As @mosdav wrote, with debug build all work fine, both DLDT sample app/bench and IE as OpenCV backend. In release build we have errors, same as described above: benchmark_app:
e:\Lib_prebuild\DLDT\dldt\bin\intel64\Release>benchmark_app.exe -i e:\q\lena.jpg -m e:\Lib_prebuild\DLDT\dldt\model-optimizer\alexnet.xml -d CPU -api sync
[Step 1/11] Parsing and validating input arguments
[ INFO ] Parsing input parameters
[ INFO ] Files were added: 1
[ INFO ] e:\q\lena.jpg
[ WARNING ] -nstreams default value is determined automatically for a device. Although the automatic selection usually provides a reasonable performance,but it still may be non-optimal for some cases, for more information look at README.
[Step 2/11] Loading Inference Engine
[ INFO ] InferenceEngine:
API version ............ 2.1
Build .................. custom_2020_a347375d0188b58056887f382161c6ed6fc3dcb3
Description ....... API
[ INFO ] Device info:
[ ERROR ] Failed to create plugin e:\Lib_prebuild\DLDT\dldt\bin\intel64\Release\MKLDNNPlugin.dll for device CPU
Please, check your environment
Cannot load library 'e:\Lib_prebuild\DLDT\dldt\bin\intel64\Release\MKLDNNPlugin.dll': 1114 from cwd: e:\Lib_prebuild\DLDT\dldt\bin\intel64\Release
built IE as backend in Opencv:
OpenCV(4.3.0-pre) E:\Lib_prebuild\opencv\source\opencv\modules\dnn\src\op_inf_engine.cpp:881: error: (-2:Unspecified error) in function 'cv::dnn::InfEngineBackendNet::initPlugin'
> Failed to initialize Inference Engine backend (device = CPU): Failed to create plugin c:\lib\path\MKLDNNPlugin.dll for device CPU
> Please, check your environment
> Cannot load library 'c:\lib\path\MKLDNNPlugin.dll': 1114 from cwd: C:\00CurWork\ImProcQCV\ImProcQCV
>
Code with problem looks like this.
@Bleach665 To workaround that you can try to comment out these lines:
REG_FACTORY_FOR_TYPE(avx512_common, ...
REG_FACTORY_FOR_TYPE(avx2, ...
These files should be processed: argmax.cpp
proposal.cpp
resample.cpp
This is not a proper fix but should allow to run application on non-AVX CPU.
Problem is that cross-compiled dispatched code (mkldnn_plugin_layers_avx2
and mkldnn_plugin_layers_avx512
targets) has global dynamic initializers.
These "dispatched" binary files should not have global dynamic initializers at all:
/arch:AVX2
or similar flags).@alalek, thanks. With this changes IE work fine on non AVX CPU. I tested it on the benchmark_app and IE as backend in OpenCV.
However, after fix, .CRT$XCU
section in argmax.obj
has no zero size.
Before fix:
.CRT$XCU name
0 physical address
0 virtual address
10 size of raw data
324E2 file pointer to raw data (000324E2 to 000324F1)
324F2 file pointer to relocation table
0 file pointer to line numbers
2 number of relocations
0 number of line numbers
40400040 flags
Initialized Data
8 byte align
Read Only
After:
.CRT$XCU name
0 physical address
0 virtual address
8 size of raw data
11AE file pointer to raw data (000011AE to 000011B5)
11B6 file pointer to relocation table
0 file pointer to line numbers
1 number of relocations
0 number of line numbers
40400040 flags
Initialized Data
8 byte align
Read Only
@yury-gorbachev, @w3sip, @mosdav, it might interest you.
Is this issue still present with just released 2020.2?
This issue is not fixed in 2020.2
My cpu core is i7 8750, still has this problem, anybody can help?
@andeyeluguo, not sure that current issue is your case. This is about non-AVX configurations.
Hi guys am a newbie programmer in OpenVINO environment. I went through the whole thread I couldn't figure out what should be done to run the latest OpenVINO toollkit on my i5-3320M (HP EliteBook 8470p) Could someone write a script or some sort of program for people for like to me to use the Toolkit on older CPU version OR should I download OpenVINO 2019?
@AJV009 can you describe your environment, please? Do you use MS-WIN or Linux or MacOS? I use OpenVINO 2020.1 also on an Intel ATOM "ApolloLake", which doesn't have AVX CPU instructions. I'm mainly using OpenVINO in a Docker container - as it installs quite a lot which clashes with some of my packages on my HOST. OpenVINO comes with a lot of samples and demos - many of them could be used with Python and no need for cmake/make compilation. However, many samples&demos are C or C++ and need to be compiled. Which steps have you tried to far, where are you stuck?
In this GitHub repo there are several threads about AVX and CPU-Extension. You might find additional information there.
Okay I use MS-WIN with Anaconda as my package/project manager. somewhere here -> https://docs.openvinotoolkit.org/2020.2/_docs_install_guides_installing_openvino_windows.html#model_optimizer_configuration_steps Should I really reproduce the errors? (let me try again!) I faced a TON of warnings which I ignored, but then ended up with a error while running the samples mentioned in the installation guide. (so I thought maybe my CPU wasn't supported, cause they already mentioned about CPUs >= 6th gen)
I did a clean install this time it worked don't know what happened before! BUT yeah I faced a new error -
###############|| Run Inference Engine classification sample ||###############
Waiting for 1 seconds, press a key to continue ...
1 file(s) copied.
classification_sample_async.exe -i "C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\demo\car.png" -m "C:\Users\XeonAJ\Documents\Intel\OpenVINO\openvino_models\ir\public\squeezenet1.1\FP16\squeezenet1.1.xml" -d CPU
[ INFO ] InferenceEngine:
API version ............ 2.1
Build .................. 42025
Description ....... API
[ INFO ] Parsing input parameters
[ INFO ] Parsing input parameters
[ INFO ] Files were added: 1
[ INFO ] C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\demo\car.png
[ INFO ] Creating Inference Engine
[ ERROR ] Failed to create plugin C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\inference_engine\bin\intel64\Release\MKLDNNPlugin.dll for device CPU
Please, check your environment
Cannot load library 'C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\inference_engine\bin\intel64\Release\MKLDNNPlugin.dll': 1114 from cwd: C:\Users\XeonAJ\Documents\Intel\OpenVINO\inference_engine_samples_build\intel64\Release
Error
Is there any quick fixes that I should do?
Update: the issue addressed in the latest master. Could you please try?
Now, we have a special cmake macro to safely compile sources for different ISAs (see https://github.com/openvinotoolkit/openvino/blob/master/inference-engine/src/mkldnn_plugin/CMakeLists.txt#L172-L187)
CC @AlexPeskov
@ilya-lavrenov Did this fix missed the 2020.3 release? I see that the known issues mentions
28747 | CPU plugin does not work on Windows system with CPUs less then AVX2 instruction set (Intel Atom® processors) Manually rebuild the CPU plugin from sources available in the public repository with CMake feature flags ENABLE_AVX2=OFF and ENABLE_AVX512=OFF.
The fix is big enough and it was decided (by @dmitry-gorokhov @AlexPeskov) not to port it to 2020.3 release.
So when is the 2020.4 scheduled for? Considering it's a regression from 2019 releases, it's unfortunate to see it pushed back.
As a suggestion -- maybe it's worth having default distribution shipping all flavors of the CPU plugin; the client app could then evaluate CPU caps, and generate plugins.xml to load the suitable version.
@w3sip you can build CPU plugin and Inference Engine libraries from sources using current master branch. Does this way work for you? This check from your side would be very helpful.
Unfortunately, our current CI workflow is to ingest the Intel versioned binary distribution. Switch to building from source is under consideration at the moment (and definitely best avoided, if possible). If we do go that route, are there any guidelines regarding the toolchain? Versions of clang/cmake, etc?
@w3sip Build toolchains for OpenVINO are described here: https://github.com/openvinotoolkit/openvino/blob/master/build-instruction.md
@ilya-lavrenov. You may be interested in this. I built OpenVINO from branch releases/2020/4, rev ae9e0510f008220a297130c45e30bfc7fcf27b04 and it work fine on non-AVX CPU. I tested on classification_sample_async
, object_detection_sample_ssd
and IE as OpenCV backend.
@Bleach665 thanks! Does it means that the original issue has gone?
@ilya-lavrenov As you see fit. But I think it's better to wait for the release OpenVINO v.2020.4, test it, and if it works well at non-AVX CPU, then close this issue.
@w3sip Build toolchains for OpenVINO are described here: https://github.com/openvinotoolkit/openvino/blob/master/build-instruction.md
I'm about to try to compile it on my Windows machine. Instructions mentions an extra download: Intel Graphics Drivers https://github.com/openvinotoolkit/openvino/blob/master/build-instruction.md#software-requirements-1 However my build machine does not have an Intel GPU. Do you confirm this driver is not required for compilation, only for execution of the GPU plugin?
Do you confirm this driver is not required for compilation, only for execution of the GPU plugin?
Absolutely right, driver is not required for compilation.
@Bleach665 Can you confirm this is solved in 2020.4? Thanks a lot
@JulienMaille Unfortunately, I can't confirm this now - I don't have a suitable PC on hand. I can check this only in a few days.
I have just installed openvino 2020.4 on a Windows 10 computer with a Ryzen 7 1700 CPU and 32 GB of RAM. That CPU suports AVX and AVX2. It failed on the two demo's with the same error as above i.e.
[ ERROR ] Failed to create plugin MKLDNNPlugin.dll for device CPU
My three previous versions all worked (2019.1.087, 2019.2.242, 2019.3.334) and I had installed 2020.2.117 but never tested it.
@ilya-lavrenov. You may be interested in this. I built OpenVINO from branch releases/2020/4, rev ae9e051 and it work fine on non-AVX CPU. I tested on
classification_sample_async
,object_detection_sample_ssd
and IE as OpenCV backend.
The GitHub master contains corresponding fix since 20/05/2020 update. So all inherited branches (2020.4 as well) have no such issue. And your local result confirms that.
I've just check it with 2020.4 binaries with Intel SDE emulation tool. The crash is gone.
I just finished testing. OpenVINO 2020.4 work perfect on non-AVX CPU. Win10, VS 2017; OpenCV build with OpenVINO 2020.4, TBB and MKL. Tested on security_barrier_camera_demo and IE as OpenCV backend.
Hey, I have a intel atom x5 z8500 cpu, I use debian and i keep getting "illegal instruction" after building whisper.cpp using openvino 2023.0.0, i tried building openvino from source with -DENABLE_AVX512F=OFF and -DENABLE_AVX2=OFF but i kept getting "illegal instruction".
I use OpnVINO as OpenCV backend. Among the computers that use my software are quite old, but still powerful machines like 2x CPU Xeon x5660, 2x CPU Xeon e-2603, etc. with 64-180 Gb RAM. Unfortunately they not support avx instruction set, only sse4. Previous versions OpenVINO including 2019.3.379 allow use this old cpu on Windows, Linux and MacOS (I played with cpu_extension.* file and it works fine). In last OpenVINO release 2020.1.033 I receive error:
Failed to create plugin [my path to]\MKLDNNPlugin.dll for device CPU
on demo executing. Also I dont find solution hove to rebuild some path of OpenVino lib (like cpu_extension.*) to use with sse cpu. This means that CPU without AVX instruction set will no longer be supported by OpenVINO inference engine?