Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Kulecz__Walter
New Contributor I
310 Views

./demo_security_barrier_camera.sh -d GPU Problem.

Jump to solution

OpenVINO build l_openvino_toolkit_p_2019.1.144 in Intel Atom x5-Z8350 running Ubuntu-Mate 16.04 with all the latest updates.  I'm happy to report that the issues I had with build 2019.1.133 now seem fixed.

Running ./demo_security_barrier_camera.sh -d CPU worked, got 7.65 fps, 8.67 fps inference.

But trying the GPU failed.

Ran to the very end, then failed with this error:

Run ./security_barrier_camera_demo -d GPU -d_va GPU -d_lpr GPU -i /home/ai/intel/openvino/deployment_tools/demo/car_1.bmp -m /home/ai/openvino_models/ir/FP32/Security/object_detection/barrier/0106/dldt/vehicle-license-plate-detection-barrier-0106.xml -m_va /home/ai/openvino_models/ir/FP32/Security/object_attributes/vehicle/resnet10_update_1/dldt/vehicle-attributes-recognition-barrier-0039.xml -m_lpr /home/ai/openvino_models/ir/FP32/Security/optical_character_recognition/license_plate/dldt/license-plate-recognition-barrier-0001.xml 

[ INFO ] InferenceEngine: 
	API version ............ 1.6
	Build .................. custom_releases/2019/R1.1_28dfbfdd28954c4dfd2f94403dd8dfc1f411038b
[ INFO ] Parsing input parameters
[ INFO ] Capturing video streams from the video files or loading images
[ INFO ] Files were added: 1
[ INFO ]     /home/ai/intel/openvino/deployment_tools/demo/car_1.bmp
[ INFO ] Number of input image files: 1
[ INFO ] Number of input video files: 0
[ INFO ] Number of input channels: 1
[ INFO ] Display resolution: 1920x1080
[ INFO ] Loading plugin GPU

	API version ............ 1.6
	Build .................. 23780
	Description ....... clDNNPlugin
[ INFO ] Loading network files for VehicleDetection
[ INFO ] Batch size is forced to  1
[ INFO ] Checking Vehicle Detection inputs
[ INFO ] Checking Vehicle Detection outputs
[ INFO ] Loading Vehicle Detection model to the GPU plugin
[ ERROR ] failed to create engine: clGetPlatformIDs error -1001
Error on or near line 228; exiting with status 1

Any ideas what has gone wrong?  I've zero experience with openCL.

 

0 Kudos
1 Solution
nikos1
Valued Contributor I
281 Views

> I assume the GPU module won't work with an NVidia openCL, correct?

Correct GPU path only works on Intel GPU.

BTW 

wget http://registrationcenter-download.intel.com/akdlm/irc_nas/11396/SRB5.0_linux64.zip

works for me here.

For the Intel GPU + discrete gfx system please connect monitor to system DVI / HDMI port (so that Intel GPU is active) and try clinfo again.

Cheers,

nikos

 

View solution in original post

23 Replies
Shubha_R_Intel
Employee
280 Views

Dear Kulecz, Walter,

If you look at the Supported Devices document indeed FP32 should be supported on GPU, though FP16 is of course preferred. I was not able to reproduce your error. I just now tried on OpenVino 2019R1.1 for Windows. OS should not make a difference (I know you are using Ubuntu). But it looks like your OpenCL drivers may not be installed correctly, based on the error you are getting: failed to create engine: clGetPlatformIDs error -1001 or maybe your GPU device is not supported. The below command worked perfectly fine for me.

security_barrier_camera_demo.exe -d GPU -d_va GPU -d_lpr GPU -i "C:\Program Files (x86)\IntelSWTools\openvino_2019.1.148\deployment_tools\demo\car_1.bmp" -m "c:\users\sdramani\Documents\Intel\OpenVINO\openvino_models_R2\ir\FP32\Security\object_detection\barrier\0106\dldt\vehicle-license-plate-detection-barrier-0106.xml" -m_va "c:\users\sdramani\Documents\Intel\OpenVINO\openvino_models_R2\ir\FP32\Security\object_attributes\vehicle\resnet10_update_1\dldt\vehicle-attributes-recognition-barrier-0039.xml"  -m_lpr  "c:\users\sdramani\Documents\Intel\OpenVINO\openvino_models_R2\ir\FP32\Security\optical_character_recognition\license_plate\dldt\license-plate-recognition-barrier-0001.xml"

Thanks for your patience and thanks for using OpenVino !

Shubha

Kulecz__Walter
New Contributor I
280 Views

Perhaps its a Windows vs. Linux issue?  I note Windows is build 2019.1.148 while Linux is 2019.1.144

As I said,  I have zero openCL experience, all I did was follow the "recipe" in the installation instructions at: https://docs.openvinotoolkit.org/latest/_docs_install_guides_installing_openvino_linux.html

It also possible the Atom x5-Z8350 is not the "correct" level of HD graphics.  I am testing what systems I can get my hands on looking for the best bang/buck system for our needs, so I've been pretty good at finding errors in the instructions :)

  As I said I've zero openCL experience.  But MYRIAD and CPU options have worked fine.  The demo give me:

CPU 7.65 fps, Inference 8.67 fps

NCS 11.35 fps Inference 11.65 fps

NCS2 17,68 fps Inference 18.87

 

nikos1
Valued Contributor I
280 Views

Hello Kulecz, Waltern

 The -1001 OpenCL error you have is CL_PLATFORM_NOT_FOUND_KHR that indicates "no valid ICDs found"

In other words OpenVino + clDNN cannot find a valid OpenCL GPU platform to execute inference when you use -d GPU.

First you need to install OpenCL so that when you ruin clinfo it will report valid OpenCL platforms and device and next try again OpenVino with -d GPU. 

Another issue you may face is that the GPU must be HD 5** or higher. When we get the clinfo output from you we can see if this is the case or not. Please run

sudo apt-get install clinfo

and then 

clinfo

Cheers,

nikos

nikos1
Valued Contributor I
280 Views

also from what I am reading the NEO OpenCL driver will not work in your system

https://software.intel.com/en-us/forums/opencl/topic/779709

Documentation so far indicates that your GPU is capable of running OpenVino.

However you need to find another way to install OpenCL. Probably something like this ( reference https://gist.github.com/cmey/a2b2223e7947b62bd94d405e290c9293 )

wget http://registrationcenter-download.intel.com/akdlm/irc_nas/11396/SRB5.0_linux64.zip
unzip SRB5.0_linux64.zip -d SRB5.0_linux64
cd SRB5.0_linux64
sudo apt-get install xz-utils
mkdir intel-opencl
tar -C intel-opencl -Jxf intel-opencl-r5.0-63503.x86_64.tar.xz
tar -C intel-opencl -Jxf intel-opencl-devel-r5.0-63503.x86_64.tar.xz
tar -C intel-opencl -Jxf intel-opencl-cpu-r5.0-63503.x86_64.tar.xz
sudo cp -R intel-opencl/* /
sudo ldconfig

keep trying until clinfo reports your OpenCL GPU device.

Good Luck!

nikos

 

Kulecz__Walter
New Contributor I
280 Views

nikos wrote:

also from what I am reading the NEO OpenCL driver will not work in your system

https://software.intel.com/en-us/forums/opencl/topic/779709

Documentation so far indicates that your GPU is capable of running OpenVino.

However you need to find another way to install OpenCL. Probably something like this ( reference https://gist.github.com/cmey/a2b2223e7947b62bd94d405e290c9293 )

wget http://registrationcenter-download.intel.com/akdlm/irc_nas/11396/SRB5.0_linux64.zip
unzip SRB5.0_linux64.zip -d SRB5.0_linux64
cd SRB5.0_linux64
sudo apt-get install xz-utils
mkdir intel-opencl
tar -C intel-opencl -Jxf intel-opencl-r5.0-63503.x86_64.tar.xz
tar -C intel-opencl -Jxf intel-opencl-devel-r5.0-63503.x86_64.tar.xz
tar -C intel-opencl -Jxf intel-opencl-cpu-r5.0-63503.x86_64.tar.xz
sudo cp -R intel-opencl/* /
sudo ldconfig

keep trying until clinfo reports your OpenCL GPU device.

Good Luck!

nikos

 

clinfo reports 0 platforms.

The wget command fails:

wget http://registrationcenter-download.intel.com/akdlm/irc_nas/11396/SRB5.0_lir
--2019-06-12 12:50:09--  http://registrationcenter-download.intel.com/akdlm/irc_nas/11396/SRB5.0_lir
Resolving registrationcenter-download.intel.com (registrationcenter-download.intel.com)... 23.218.88.7, 2600:1404:13:181::b, 2600:1404:13:190::b
Connecting to registrationcenter-download.intel.com (registrationcenter-download.intel.com)|23.218.88.7|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: /en/irc_nas/11396/srb5.0_lir/ [following]
--2019-06-12 12:50:10--  http://registrationcenter-download.intel.com/en/irc_nas/11396/srb5.0_lir/
Reusing existing connection to registrationcenter-download.intel.com:80.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://www-ssl.intel.com/content/www/us/en/404.html?aspxerrorpath=/en/irc_nas/11396/srb5.0_lir/ [following]
--2019-06-12 12:50:10--  https://www-ssl.intel.com/content/www/us/en/404.html?aspxerrorpath=/en/irc_nas/11396/srb5.0_lir/
Resolving www-ssl.intel.com (www-ssl.intel.com)... 23.218.88.7
Connecting to www-ssl.intel.com (www-ssl.intel.com)|23.218.88.7|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2019-06-12 12:50:10 ERROR 404: Not Found.

Reading your other links, it sure looks not worth the effort.  Its just I've yet to find a system with a" correct" integrated graphics chip.

The desktop   I'm typing this one has integrated graphics, its enable in the BIOS but I use an Nvidia card for my two attached  4K displays.

Just for grins I installed clinfo and it reports one platform:

$ clinfo
Number of platforms                               1
  Platform Name                                   NVIDIA CUDA
  Platform Vendor                                 NVIDIA Corporation
  Platform Version                                OpenCL 1.2 CUDA 9.0.368
  Platform Profile                                FULL_PROFILE
  Platform Extensions                             cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_fp64 cl_khr_byte_addressable_store cl_khr_icd cl_khr_gl_sharing cl_nv_compiler_options cl_nv_device_attribute_query cl_nv_pragma_unroll cl_nv_copy_opts cl_nv_create_buffer
  Platform Extensions function suffix             NV

  Platform Name                                   NVIDIA CUDA
Number of devices                                 1
  Device Name                                     GeForce GTX 950
  Device Vendor                                   NVIDIA Corporation
  Device Vendor ID                                0x10de
  Device Version                                  OpenCL 1.2 CUDA
  Driver Version                                  384.130
  Device OpenCL C Version                         OpenCL C 1.2 
  Device Type                                     GPU
  Device Profile                                  FULL_PROFILE
  Device Topology (NV)                            PCI-E, 01:00.0
  Max compute units                               6
  Max clock frequency                             1190MHz
  Compute Capability (NV)                         5.2
  Device Partition                                (core)
    Max number of sub-devices                     1
    Supported partition types                     None
  Max work item dimensions                        3
  Max work item sizes                             1024x1024x64
  Max work group size                             1024
  Preferred work group size multiple              32
  Warp size (NV)                                  32
  Preferred / native vector sizes                 
    char                                                 1 / 1       
    short                                                1 / 1       
    int                                                  1 / 1       
    long                                                 1 / 1       
    half                                                 0 / 0        (n/a)
    float                                                1 / 1       
    double                                               1 / 1        (cl_khr_fp64)
  Half-precision Floating-point support           (n/a)
  Single-precision Floating-point support         (core)
    Denormals                                     Yes
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 Yes
    Round to infinity                             Yes
    IEEE754-2008 fused multiply-add               Yes
    Support is emulated in software               No
    Correctly-rounded divide and sqrt operations  Yes
  Double-precision Floating-point support         (cl_khr_fp64)
    Denormals                                     Yes
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 Yes
    Round to infinity                             Yes
    IEEE754-2008 fused multiply-add               Yes
    Support is emulated in software               No
    Correctly-rounded divide and sqrt operations  No
  Address bits                                    64, Little-Endian
  Global memory size                              2090270720 (1.947GiB)
  Error Correction support                        No
  Max memory allocation                           522567680 (498.4MiB)
  Unified memory for Host and Device              No
  Integrated memory (NV)                          No
  Minimum alignment for any data type             128 bytes
  Alignment of base address                       4096 bits (512 bytes)
  Global Memory cache type                        Read/Write
  Global Memory cache size                        98304
  Global Memory cache line                        128 bytes
  Image support                                   Yes
    Max number of samplers per kernel             32
    Max size for 1D images from buffer            134217728 pixels
    Max 1D or 2D image array size                 2048 images
    Max 2D image size                             16384x16384 pixels
    Max 3D image size                             4096x4096x4096 pixels
    Max number of read image args                 256
    Max number of write image args                16
  Local memory type                               Local
  Local memory size                               49152 (48KiB)
  Registers per block (NV)                        65536
  Max constant buffer size                        65536 (64KiB)
  Max number of constant args                     9
  Max size of kernel argument                     4352 (4.25KiB)
  Queue properties                                
    Out-of-order execution                        Yes
    Profiling                                     Yes
  Prefer user sync for interop                    No
  Profiling timer resolution                      1000ns
  Execution capabilities                          
    Run OpenCL kernels                            Yes
    Run native kernels                            No
    Kernel execution timeout (NV)                 Yes
  Concurrent copy and kernel execution (NV)       Yes
    Number of async copy engines                  2
  printf() buffer size                            1048576 (1024KiB)
  Built-in kernels                                
  Device Available                                Yes
  Compiler Available                              Yes
  Linker Available                                Yes
  Device Extensions                               cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_fp64 cl_khr_byte_addressable_store cl_khr_icd cl_khr_gl_sharing cl_nv_compiler_options cl_nv_device_attribute_query cl_nv_pragma_unroll cl_nv_copy_opts cl_nv_create_buffer

NULL platform behavior
  clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...)  NVIDIA CUDA
  clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...)   Success [NV]
  clCreateContext(NULL, ...) [default]            Success [NV]
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU)  No platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL)  No platform

ICD loader properties
  ICD loader Name                                 OpenCL ICD Loader
  ICD loader Vendor                               OCL Icd free software
  ICD loader Version                              2.2.8
  ICD loader Profile                              OpenCL 1.2
	NOTE:	your OpenCL library declares to support OpenCL 1.2,
		but it seems to support up to OpenCL 2.1 too.

I haven't installed OpenVINO on this yet, as its the one system I can't risk breaking.  Its a pretty low end graphics card, I used the integrated graphics initially but found it lacking when I went multi-monitor, so I got this card, ~3 years ago.

I assume the GPU module won't work with an NVidia openCL, correct?

 

Shubha_R_Intel
Employee
280 Views

If the GPU is a supported Intel GPU  security_barrier_camera_demo on GPU (using command-line specified above) should work fine, I tried it recently on OpenVino 2019R1.1. 

Thanks,

Shubha

nikos1
Valued Contributor I
282 Views

> I assume the GPU module won't work with an NVidia openCL, correct?

Correct GPU path only works on Intel GPU.

BTW 

wget http://registrationcenter-download.intel.com/akdlm/irc_nas/11396/SRB5.0_linux64.zip

works for me here.

For the Intel GPU + discrete gfx system please connect monitor to system DVI / HDMI port (so that Intel GPU is active) and try clinfo again.

Cheers,

nikos

 

View solution in original post

Kulecz__Walter
New Contributor I
280 Views

nikos wrote:

> I assume the GPU module won't work with an NVidia openCL, correct?

Correct GPU path only works on Intel GPU.

For the Intel GPU + discrete gfx system please connect monitor to system DVI / HDMI port (so that Intel GPU is active) and try clinfo again.

Cheers,

nikos

Thanks,  I'll try again later with that zip file link.

I have a relatively new laptop with Nvidia graphics and Intel HD graphics.  When I have a 4K monitor plugged into the external HDMI port it looks like the LCD panel can remain active as a "second" monitor and it appears to be then using the integrated graphics as the Nvidia "control panel" doesn't see it.  I will try the openCL installation on this system when I upgrade it from 2019.1.133 to 2019.1.144 and see what clinfo says.  Right now its running my NCS v1 SDK code to "stress test" an rstp to mqtt program as a way to add AI to existing stand-alone security DVR systems, I want the test to run at least through tomorrow if no problems are uncovered, its about at the 24 hour mark now.

 

Kulecz__Walter
New Contributor I
280 Views

nikos wrote:

wget http://registrationcenter-download.intel.com/akdlm/irc_nas/11396/SRB5.0_...

Thanks so much for this.  This download worked and using your earlier instructions I now have clinfo reporting 1 platform.

Running the demo with -d GPU I get 8.53 fps, 9.9 fps Inference.

CPU was 7.65 fps, 8.67 fps Inference

MYRIAD NCS was 11.35 fps, 11.65 fps Inference

MYRIAD NCS2 was 17.68 fps, 18.87 fps Inference

Thanks again, since you seem to have quite a lot of openCL knowledge, are there packages like this one available for other low-end integrated graphics systems?

 

I have:

i3-4025U

i5-4200U

i7-4500U

None of these worked with the NEO-OCL driver.

I think we can mark this thread as solved.

 

nikos1
Valued Contributor I
280 Views

Hello Walter,

> Running the demo with -d GPU I get 8.53 fps, 9.9 fps Inference.

This is great news!

> for other low-end integrated graphics systems?

There are a few more packages from Intel we used earlier before NEO was born. I think the package above should cover most pre-NEO cases. There are older OpenCL installation documents from Intel that point to other packages too but the one mentioned here is the first I try on older GPUs. In some cases you need kernel patching but should be fine with new kernels now.

Unfortunately all Core i3-4025U, i5-4200U, and i7-4500U CPUs you have fall under the same category of 4th Generation Intel Core Processors that have Intel HD 4xx graphics that are not supported and they cannot run clDNN as we found after long investigation in this

therad https://software.intel.com/comment/1931157 

 

Rule of thumb : your Intel GPU must be HD5xx or higher

More specifically it has to support 

Queue properties:   

    Out-of-order execution - Yes (it can be found as one of the entries in clinfo)

Cheers,

nikos

Kulecz__Walter
New Contributor I
280 Views

Seems like solving this problem created another.  After installing this openCL it seem my openVINO cv2 installation is now broken.

$ printenv PYTHONPATH
/home/ai/intel/openvino_2019.1.144/python/python3.5:/home/ai/intel/openvino_2019.1.144/deployment_tools/model_optimizer:

$ python3
Python 3.5.2 (default, Nov 12 2018, 13:43:14) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: /home/ai/intel/openvino_2019.1.144/deployment_tools/inference_engine/lib/intel64/libinference_engine.so: undefined symbol: _ZN3tbb10interface78internal15task_arena_base24internal_max_concurrencyEPKNS0_10task_arenaE
>>>

I'm stuck.

Thanks for confirming what I thought was the situation for those older GPUs.

 

nikos1
Valued Contributor I
280 Views

Interesting issue!

Is this on the older atom x5-Z8350 system?  Probably need to compile opencv from source.

 

nikos1
Valued Contributor I
280 Views

btw this does not look like an opencl issue - could it be a tbb issue?

tbb = intel-threading-building-blocks

please make sure you source the setupvars script to set LDLIBRARY and other paths correctly

Kulecz__Walter
New Contributor I
280 Views

nikos wrote:

Interesting issue!

Is this on the older atom x5-Z8350 system?  Probably need to compile opencv from source.

 

Yes its the old Atom x5-Z8350.

I'd used the Python cv2 just before I did the opencl installation.  I cloned the system with dd before I did the opencl installation, so I can restore it pretty fast if poking around the librariy path doesn't give me any ideas.

 

Kulecz__Walter
New Contributor I
280 Views

nikos wrote:

btw this does not look like an opencl issue - could it be a tbb issue?

tbb = intel-threading-building-blocks

please make sure you source the setupvars script to set LDLIBRARY and other paths correctly

I source setupvars in .bashrc.  here is my library path:

LD_LIBRARY_PATH=/home/ai/intel/openvino_2019.1.144/opencv/lib:/opt/intel/opencl:/home/ai/intel/openvino_2019.1.144/deployment_tools/inference_engine/external/hddl/lib:/home/ai/intel/openvino_2019.1.144/deployment_tools/inference_engine/external/gna/lib:/home/ai/intel/openvino_2019.1.144/deployment_tools/inference_engine/external/mkltiny_lnx/lib:/home/ai/intel/openvino_2019.1.144/deployment_tools/inference_engine/external/tbb/lib:/home/ai/intel/openvino_2019.1.144/deployment_tools/inference_engine/lib/intel64:/home/ai/intel/openvino_2019.1.144/openvx/lib:

 

nikos1
Valued Contributor I
280 Views

Looks good. Sorry never had this issue but I am mainly using C++ not python.

Kulecz__Walter
New Contributor I
280 Views

nikos wrote:

Looks good. Sorry never had this issue but I am mainly using C++ not python.

Thanks for your help, I've learned a few things. 

Restored the eEMC from my dd backup and Python OpenCV is working fine again. 

Its somewhat distressing that installing openCL drivers/libraries can break something else, but the interlocking dependencies among all the pieces is getting close to being impossibly complex.

nikos1
Valued Contributor I
280 Views

Glad to hear! 

Yes it gets complex. I try to control all components manually and build most of them from source to avoid issues like that. It is fun :-)

Kulecz__Walter
New Contributor I
280 Views

If you don't mind, I've a new opencl issue on a different system.

I've installed 2019.1.144 on my i8750H Ubuntu-Mate 16.04 laptop.  All the CPU and MYRIAD tests went fast and smooth.

This system has Nvidia graphics hooked to a 4K display on the external hdmi port and the laptop 1920x1080 LCD panel.  I've the 4K as "primary" and the laptop display works or not depending on if its enabled or not in the Ubuntu-Mate "Display" tool.  The NVidia control panel only "sees" one display -- the 4K monitor.

When I try the ./install_NEO_OCL_driver.sh script (after sudo -E su)

# ./install_NEO_OCL_driver.sh
Intel OpenCL graphics driver installer
Looking for previously installed user-mode driver...
dpkg-query: no packages found matching intel-opencl
dpkg-query: no packages found matching intel-ocloc
dpkg-query: no packages found matching intel-gmmlib
Found intel-igc-core installed, uninstalling...
dpkg: dependency problems prevent removal of intel-igc-core:
 intel-igc-opencl depends on intel-igc-core.

dpkg: error processing package intel-igc-core (--purge):
 dependency problems - not removing
Errors were encountered while processing:
 intel-igc-core
ERROR: unable to remove intel-igc-core
       please resolve it manually and try to launch the script again.

Results are the same with the laptop screen enabled or disabled.  I've no idea how to "resolve it manually"

 

I had planned to wipe the NVMe drive and install Linux, but it came with an Western Digital NVMe that the installer and the installed system just can't "see"  so it still has the Windows10 it came with.  So I just got a 1TB SATA SSD and installed Linux to that and moved on.  Someday I might try the OpenVINO install on Windows, but definitely not a priority as I got off the Windows bus at Windows 8.

 

 

Reply